Hi Michael,

On Tue, 2022-12-13 14:49:20 +1100, Michael Ellerman <[email protected]> wrote:
> Jan-Benedict Glaw <[email protected]> writes:
> > Is anybody else routinely building current Binutils + GCC, to try to
> > build all the Linux defconfigs?
> 
> I did for several years, but eventually stopped because it was taking
> too much time I needed to spend on other things.

I've got one system at my hands to let it build stuff all day. So I'm
trying to extend that as far as possible.

> > For PPC, a good number of those fail,
> > and I probably don't understand PPC well enough to propose patches. Or
> > did I pick wrongly targeted toolchains? Most of the time, my suspicion
> > is that we're not giving the correct -m<cpu> flags in
> > ./arch/powerpc/boot/?  (My setup for doing test builds is fairly automated, 
> > I
> > can easily throw in patches for testing.)
> 
> All the results against <something>.config are invalid or at least
> dubious. Those files are not standalone defconfigs, they're fragments of
> defconfigs that are assembled together by arch/powerpc/Makefile using
> merge_config.sh.
> 
> So your script should exclude all files that end in ".config".

Thanks!  Will just drop those.

> To find the names of the generated configs you can use something like:
> 
>  $ awk '/PHONY \+= .*config/ {print $3}' arch/powerpc/Makefile

...and integrate these instead. Thanks a lot!

> > 64-bit.config
> >       powerpc64-linux-gcc -Wp,-MD,arch/powerpc/boot/.opal-calls.o.d 
> > -D__ASSEMBLY__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
> > -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx   -pipe 
> > -fomit-frame-pointer -fno-builtin -fPIC -nostdinc -I./arch/powerpc/include 
> > -I./arch/powerpc/include/generated  -I./include 
> > -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi 
> > -I./include/uapi -I./include/generated/uapi -include 
> > ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -m32 
> > -mcpu=powerpc -isystem 
> > /var/lib/laminar/run/linux-powerpc-64-bit.config/12/toolchain/bin/../lib/gcc/powerpc64-linux/13.0.0/include
> >  -mbig-endian -nostdinc -c -o arch/powerpc/boot/opal-calls.o 
> > arch/powerpc/boot/opal-calls.S
> >     arch/powerpc/boot/opal-calls.S: Assembler messages:
> >     arch/powerpc/boot/opal-calls.S:20: Error: unrecognized opcode: `ld'
> >     arch/powerpc/boot/opal-calls.S:21: Error: unrecognized opcode: `ld'
> >     arch/powerpc/boot/opal-calls.S:32: Error: unrecognized opcode: `std'
> >     arch/powerpc/boot/opal-calls.S:49: Error: unrecognized opcode: `ld'
> >     arch/powerpc/boot/opal-calls.S:50: Error: unrecognized opcode: `ld'
> >     arch/powerpc/boot/opal-calls.S:52: Error: unrecognized opcode: `hrfid'
> >     arch/powerpc/boot/opal-calls.S:55: Error: unrecognized opcode: `tdi'
> >     arch/powerpc/boot/opal-calls.S:58: Error: unrecognized opcode: `ld'
> >     make[1]: *** [arch/powerpc/boot/Makefile:232: 
> > arch/powerpc/boot/opal-calls.o] Error 1
> >     make: *** [arch/powerpc/Makefile:247: zImage] Error 2
> 
> ...
> 
> > bamboo_defconfig
> >       powerpc-linux-gcc -Wp,-MD,arch/powerpc/boot/.treeboot-akebono.o.d 
> > -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -O2 
> > -msoft-float -mno-altivec -mno-vsx   -pipe -fomit-frame-pointer 
> > -fno-builtin -fPIC -nostdinc -I./arch/powerpc/include 
> > -I./arch/powerpc/include/generated  -I./include 
> > -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi 
> > -I./include/uapi -I./include/generated/uapi -include 
> > ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -m32 
> > -mcpu=powerpc -isystem 
> > /var/lib/laminar/run/linux-powerpc-bamboo_defconfig/12/toolchain/bin/../lib/gcc/powerpc-linux/13.0.0/include
> >  -mbig-endian -fno-stack-protector -include 
> > ./include/linux/compiler_attributes.h -I./arch/powerpc/boot 
> > -I./arch/powerpc/boot -mcpu=405 -c -o arch/powerpc/boot/treeboot-akebono.o 
> > arch/powerpc/boot/treeboot-akebono.c
> >     {standard input}: Assembler messages:
> >     {standard input}:94: Error: unrecognized opcode: `mtdcrx'
> >     {standard input}:101: Error: unrecognized opcode: `mfdcrx'
> >     {standard input}:107: Error: unrecognized opcode: `mtdcrx'
> >     {standard input}:306: Error: unrecognized opcode: `mfdcrx'
> >     make[1]: *** [arch/powerpc/boot/Makefile:229: 
> > arch/powerpc/boot/treeboot-akebono.o] Error 1
> >     make: *** [arch/powerpc/Makefile:247: zImage] Error 2
> 
> 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

I'll update my scripts to pick up this different config set and drop
in this patch.

MfG, JBG

-- 

Attachment: signature.asc
Description: PGP signature

Reply via email to