Message ID | 20210225031006.1204774-3-dja@axtens.net (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Series | WIP support for the LLVM integrated assembler | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (626a6c3d2e20da80aaa710104f34ea6037b28b33) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 10 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
Excerpts from Daniel Axtens's message of February 25, 2021 1:10 pm: > LLVM's integrated assembler does not like either -Wa,-mpower4 > or -Wa,-many. So just don't pass them if they're not supported. > > Signed-off-by: Daniel Axtens <dja@axtens.net> > --- > arch/powerpc/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 08cf0eade56a..3e2c72d20bb8 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -252,7 +252,9 @@ cpu-as-$(CONFIG_E500) += -Wa,-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 > +# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675 > +# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway... > +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) I'm wondering why we even have this now. Kbuild's "AS" command goes through the C compiler now with relevant options like -mcpu. I assume it used to be useful for cross compiling when as was called directly but I'm not sure. Thanks, Nick
Nicholas Piggin <npiggin@gmail.com> writes: > Excerpts from Daniel Axtens's message of February 25, 2021 1:10 pm: >> LLVM's integrated assembler does not like either -Wa,-mpower4 >> or -Wa,-many. So just don't pass them if they're not supported. >> >> Signed-off-by: Daniel Axtens <dja@axtens.net> >> --- >> arch/powerpc/Makefile | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> index 08cf0eade56a..3e2c72d20bb8 100644 >> --- a/arch/powerpc/Makefile >> +++ b/arch/powerpc/Makefile >> @@ -252,7 +252,9 @@ cpu-as-$(CONFIG_E500) += -Wa,-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 >> +# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675 >> +# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway... >> +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) > > I'm wondering why we even have this now. Kbuild's "AS" command goes > through the C compiler now with relevant options like -mcpu. It uses $(CC) but it doesn't pass it $CFLAGS AFAIK. So it would use whatever the compiler default is for -mcpu etc. I think. > I assume it used to be useful for cross compiling when as was called > directly but I'm not sure. We still use it directly in vdso32/Makefile. cheers
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 08cf0eade56a..3e2c72d20bb8 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -252,7 +252,9 @@ cpu-as-$(CONFIG_E500) += -Wa,-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 +# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675 +# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway... +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)
LLVM's integrated assembler does not like either -Wa,-mpower4 or -Wa,-many. So just don't pass them if they're not supported. Signed-off-by: Daniel Axtens <dja@axtens.net> --- arch/powerpc/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)