New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unsupported argument '-m405' to option 'Wa,' #675
Comments
Is this important to have in Clang? |
In my opinion just changing this line to |
altivec has that option, so I guess it's ok. If anyone has the hardware to test on, or cares, and this results in a bug, we can fix this then. Otherwise please send the diff you describe. |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 83522c9fc..1efa99f6c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -244,15 +244,16 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
# often slow when they are implemented at all
KBUILD_CFLAGS += $(call cc-option,-mno-string)
-cpu-as-$(CONFIG_4xx) += -Wa,-m405
+cpu-as-$(CONFIG_4xx) += $(call as-option,-Wa$(comma)-m405)
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
-cpu-as-$(CONFIG_E200) += -Wa,-me200
-cpu-as-$(CONFIG_E500) += -Wa,-me500
+cpu-as-$(CONFIG_E200) += $(call as-option,-Wa$(comma)-me200)
+cpu-as-$(CONFIG_E500) += $(call as-option,-Wa$(comma)-me500)
# When using '-many -mpower4' gas will first try and find a matching power4
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
# about. GCC will pass -many to GAS when assembling, clang does not.
-cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4 -Wa,-many
+cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-mpower4) \
+ $(call as-option,-Wa$(comma)-many)
cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
KBUILD_AFLAGS += $(cpu-as-y) This patch also addresses #672 as it's a very similar issue with ppc64. Not sure if my padding and newlines are okay. |
still reproducible with: |
perhaps we can wrap all |
We should also test if this flag produces changes in the resulting disassembly of the object files that are created with this flag. |
cc @aik |
Reminiscent of #1771 but not fixed by llvm/llvm-project@de8deb5. |
Sorry about the delay! I was mostly offline during the Christmas break. Thanks for relaying the issue! I took a quick look at how clang parses the integrated assembler option (https://github.com/llvm/llvm-project/blob/fa715e2dad4adfe7f8922c299250b4463e1253c9/clang/lib/Driver/ToolChains/Clang.cpp#L2428), and experimented a bit myself. It seems that For example,
However,
So it seems to me that we will need to add support to the |
bump |
The |
This should be fixed in v6.3-rc as of torvalds/linux@bfb03af. |
I'm trying to compile ppc32 kernel using
AS=clang
(integrated-as in being used). The following error messages are produced when compiling scripts/mod/empty.o:This arguments are added here:
linux/arch/powerpc/Makefile
Line 247 in 45824fc
The compilation continues without error if the option is removed:
The text was updated successfully, but these errors were encountered: