[CC Wolfgang because he's the ppc maintainer]

Hi,

I've build a powerpc64 cross compile toolchain with multilib support (using http://crosstool-ng.org/). Eg. the default one is 64bit and you can choose a 32 bit compile with "-m32". I can compile the bootloader but linking fails with "libgcc not found". The (correct) 32-bit libgcc.a is skipped because it is incompatible.

I've debugged the issue and found, that the linker scripts are responsible for this. OUTPUT_ARCH is set to powerpc. But "powerpc" can either be the 32 bit BFD or the 64 bit BFD (see [1]). This depends on which cross compiler you've build. Eg. a "multilib powerpc" or a "multilib powerpc64". The default linker scripts all use the printable BFD name for the OUTPUT_ARCH, which has a fixed mapping. "powerpc:common" for 32 bit and "powerpc:common64" for 64 bit.

Now if I set the OUTPUT_ARCH to "powerpc:common" everything works fine. But I want to make sure this change is correct and there are no objections before commiting a patch for all powerpc linker scripts. So please comment :)

-michael

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/cpu-powerpc.c#l51
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to