[U-Boot] buildman: using wrong libgcc.a

Steve Rae
2014-10-30T20:42:14Z

Hmmmm -- maybe it would be better to specify the entire path for the
CROSS_COMPILE, and not rely on the PATH to find the cross compile tools:

diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 27dc318..58c7b1f 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -33,6 +33,7 @@ class Toolchain:
self.cross = os.path.basename(fname)[:-3]
pos = self.cross.find('-')
self.arch = self.cross[:pos] if pos != -1 else 'sandbox'
+ self.cross = fname[:-3]

env = self.MakeEnvironment()

@@ -82,7 +83,6 @@ class Toolchain:
"""
env = dict(os.environ)
env['CROSS_COMPILE'] = self.cross
- env['PATH'] += (':' + self.path)
return env

On 14-10-30 09:57 AM, Steve Rae wrote:
> Hi Simon,
>
> In my environment, buildman and MAKEALL are not producing the same results.
>
> It seems that buildman is accidentally picking up the wrong libgcc.a ...
>
>
> *** buildman ***
>
> $ cat ~/.buildman
> [toolchain]
> eldk:
> /opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi
>
>
> [toolchain-alias]
> $
>
>
> $ tools/buildman/buildman --list-tool-chains
> No section: 'make-flags'
> Scanning for tool chains
> - scanning path
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi'
>
> - looking in
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/.'
>
> - found
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/./armv7a-gcc'
>
> Tool chain test: OK
> - found
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/./arm-linux-gnueabi-gcc'
>
> Tool chain test: OK
> - looking in
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/bin'
>
> - looking in
> '/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/usr/bin'
>
> List of available toolchains (2):
> arm :
> /opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/./arm-linux-gnueabi-gcc
>
> armv7a :
> /opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/./armv7a-gcc
>
> $
>
>
> $ tools/buildman/buildman bcm28155_ap -x bcm28155_w1d -fk
> No section: 'make-flags'
> WARNING: no status info for 'Ippo_q8h'
> WARNING: no maintainers for 'Ippo_q8h'
> Building current source for 1 boards (1 thread, 8 jobs per thread)
> 1 0 0 /1 bcm28155_ap
> $
>
>
> $ head -14 ../current/current/bcm28155_ap/u-boot.map
> Archive member included because of file (symbol)
>
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_udivsi3.o)
> arch/arm/cpu/armv7/bcm281xx/built-in.o
> (__aeabi_uidiv)
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_divsi3.o)
> common/built-in.o (__aeabi_idiv)
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_lshrdi3.o)
> lib/built-in.o (__aeabi_llsr)
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_ashldi3.o)
> drivers/mmc/built-in.o (__aeabi_llsl)
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_dvmd_lnx.o)
>
> /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc.a(_udivsi3.o) (__aeabi_idiv0)
>
> Discarded input sections
> $
>
>
> *** MAKEALL ***
>
> $
> CROSS_COMPILE_ARM=/opt/eldk-5.4/armv7a/sysroots/i686-eldk-linux/usr/bin/armv7a-vfp-neon-linux-gnueabi/arm-linux-gnueabi-
> ./MAKEALL -b bcm28155_ap
> $
>
>
> $ head -14 u-boot.map
> Archive member included because of file (symbol)
>
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_udivsi3.o)
>
> arch/arm/cpu/armv7/bcm281xx/built-in.o
> (__aeabi_uidiv)
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_divsi3.o)
>
> common/built-in.o (__aeabi_idiv)
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_lshrdi3.o)
>
> lib/built-in.o (__aeabi_llsr)
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_ashldi3.o)
>
> drivers/mmc/built-in.o (__aeabi_llsl)
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_dvmd_lnx.o)
>
>
> /opt/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a(_udivsi3.o)
> (__aeabi_idiv0)
>
> Discarded input sections
> $