Skip to content

Commit ca3d3aa

Browse files
chleroympe
authored andcommitted
powerpc: Remove cpu-as-y completely
cpu-as-y is there to force assembler building options. But there is no need for that. GCC is passed the necessary options and it automatically pass the appropriate option to GAS. GCC is given -maltivec when relevant, so no need for -Wa,-maltivec either. And -Wa,-many is wrong as it will hide innapropriate instructions. Better to detect them and handle them on a case by case basis. The setting of -Wa,-many was added by commit 960e300 ("powerpc/Makefile: Fix PPC_BOOK3S_64 ASFLAGS") in order to fix an issue with clang and the passed -Wa,-mpower4 option. But we have now removed it expecting the compiler to automatically pass the proper options and instructions based on -mcpu=power4. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240229122521.762431-5-mpe@ellerman.id.au
1 parent f01dbd7 commit ca3d3aa

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

arch/powerpc/Makefile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
219219
# often slow when they are implemented at all
220220
KBUILD_CFLAGS += $(call cc-option,-mno-string)
221221

222-
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
223-
224-
# When using '-many -mpower4' gas will first try and find a matching power4
225-
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
226-
# about. GCC will pass -many to GAS when assembling, clang does not.
227-
# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
228-
# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
229-
cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
230-
231-
KBUILD_AFLAGS += $(cpu-as-y)
232-
KBUILD_CFLAGS += $(cpu-as-y)
233-
234222
KBUILD_AFLAGS += $(aflags-y)
235223
KBUILD_CFLAGS += $(cflags-y)
236224

0 commit comments

Comments
 (0)