Mass-building defconfigs: many fail with assembler errors

Christophe Leroy christophe.leroy at csgroup.eu
Thu Dec 15 17:49:08 AEDT 2022



Le 14/12/2022 à 15:45, Jan-Benedict Glaw a écrit :
> On Tue, 2022-12-13 14:49:20 +1100, Michael Ellerman <mpe at ellerman.id.au> wrote:
> [...]
>> Both treeboot-akebono.c and treeboot-currituck.c are for 476 so should
>> probably be built with -mcpu=476. eg:
>>
>> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
>> index d32d95aea5d6..acb6eddace8f 100644
>> --- a/arch/powerpc/boot/Makefile
>> +++ b/arch/powerpc/boot/Makefile
>> @@ -88,8 +88,8 @@ $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
>>   $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
>>   $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
>>   $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
>> -$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405
>> -$(obj)/treeboot-akebono.o: BOOTCFLAGS += -mcpu=405
>> +$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=476
>> +$(obj)/treeboot-akebono.o: BOOTCFLAGS += -mcpu=476
>>   
>>   # The pre-boot decompressors pull in a lot of kernel headers and other source
>>   # files. This creates a bit of a dependency headache since we need to copy
> 
> With this patch applied, it seems this fixes these asm-related builds:
> 
> linux-powerpc-bamboo_defconfig
> linux-powerpc-cell_defconfig
> linux-powerpc-ebony_defconfig
> linux-powerpc-katmai_defconfig
> linux-powerpc-ppc44x_defconfig
> linux-powerpc-rainier_defconfig
> linux-powerpc-sam440ep_defconfig
> linux-powerpc-sequoia_defconfig
> linux-powerpc-taishan_defconfig
> 
> ...while three remain unresolved:
> 
> linux-powerpc-asp8347_defconfig
> linux-powerpc-mvme5100_defconfig
> linux-powerpc-ppc64e_defconfig
> 

Can you try with below changes (you may have to apply manually as I'm 
not sure my mail client preserves text integrity):

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index bf5f0a998273..3245eec95627 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -201,18 +201,15 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
  # often slow when they are implemented at all
  KBUILD_CFLAGS		+= $(call cc-option,-mno-string)

-cpu-as-$(CONFIG_40x)		+= -Wa,-m405
-cpu-as-$(CONFIG_44x)		+= -Wa,-m440
  cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
-cpu-as-$(CONFIG_PPC_E500)		+= -Wa,-me500
+cpu-as-$(CONFIG_TARGET_CPU_BOOL)	+= -Wa,-m$(CONFIG_TARGET_CPU)

  # 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.
  # 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)
+cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= $(call as-option,-Wa$(comma)-many)

  KBUILD_AFLAGS += $(cpu-as-y)
  KBUILD_CFLAGS += $(cpu-as-y)



More information about the Linuxppc-dev mailing list