[U-Boot] errno confusion for fw_env?
Detlev Zundel
dzu at denx.de
Mon Nov 8 19:33:06 CET 2010
Hi,
with current master I tried to cross-compile a fw_env tool for the
da850evm configuration. So I tried the "standard scheme" (means it worked a
few years ago)
make distclean
make da850evm_config
make env
Doing this I noticed that commit
abd315a1357ab05e82f0d61ebad666bc0d5378c3 disabled cross-compilation. So
I reverted the commit locally on my tree to enable cross-compilation
again, but now I get:
[dzu at pollux u-boot-testing (master)]$ make env
make -C tools/env all MTD_VERSION=
make[1]: Entering directory `/work/dzu/git/u-boot-testing/tools/env'
arm-linux-gcc -Wall -DUSE_HOSTCC -I/work/dzu/git/u-boot-testing/include crc32.c fw_env.c fw_env_main.c -o fw_printenv
/opt/eldk-4.2-2008-11-24/usr/bin/../lib/gcc/arm-linux-gnueabi/4.2.2/../../../../arm-linux-gnueabi/bin/ld: errno: TLS definition in /opt/eldk-4.2-2008-11-24/usr/../arm/lib/libc.so.6 section .tbss mismatches non-TLS reference in /tmp/cc45c402.o
/opt/eldk-4.2-2008-11-24/usr/../arm/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [fw_printenv] Error 1
make[1]: Leaving directory `/work/dzu/git/u-boot-testing/tools/env'
make: *** [env] Error 2
The cross-compilation and the "-DUSE_HOSTCC" doesn't look right
somehow. And moreover we now pull in the "U-Boot errno" stuff for a
regular user-space tool through "-I$(SRCTREE)/include".
The latter comes from this commit:
commit f3b6d528e4dd719640a4bfcd954f4e4c7f5db0d6
Author: Grant Erickson <gerickson at nuovations.com>
Date: Tue May 6 16:18:00 2008 -0700
Fix Compilation Errors with 'tools/env/fw_printenv'
In the current top-of-tree, 1.3.3.-rc2, the optional tool
'tools/env/fw_printenv' fails to compile for two reasons:
1) The header watchdog.h cannot be found.
2) The header zlib.h is picked up from the tool chain rather than the
project causing a prototype conflict for crc32.
This patch addresses both of these issues.
Platforms Tested On:
- AMCC "Kilauea"
Signed-off-by: Grant Erickson <gerickson at nuovations.com>
It was probably not anticipated that this now picks up errno.h from the
project as well.
Does anybody have a good idea on how to tackle this?
Thanks
Detlev
--
These days, even the most pure and abstract mathematics is in danger
to be applied.
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the U-Boot
mailing list