[U-Boot] tools/Makefile broken?

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Jan 19 14:18:18 CET 2010


Not sure what is going on but my build broke. I suspect commit
d984fed068b3bec8a7edaf7a3de71479abde080a
 makefiles: fixes for building build tools

    Currently, some of the tools instead set CC to be HOSTCC in order to re-use
    some pattern rules -- but this fails when the user overrides CC on the make
    command line.  Also, the HOSTCFLAGS in tools/Makefile are currently not
    being used because config.mk overwrites them.

    This patch adds static pattern rules for files that have been requested to
    be built with the native compiler using $(HOSTSRCS) and $(HOSTOBJS), and
    converts the tools to use them.

    It restores easylogo to using the host compiler, which was broken by commit
    38d299c2db81bd889c601b5dfc12c4e83ef83333 (if this was an intentional change,
    please let me know -- but it seems to be a build tool).

    It restores -pedantic and the special flags for darwin and cygwin that were
    requested in tools/makefile (but keeps the flags added by config.mk) --
    hopefully someone can test this on those platforms.  It no longer
    conditionalizes -pedantic on not being darwin; it wasn't clear that that was
    intentional, and unless there's a real problem it's just inviting people to
    contribute non-pedantic patches to those files (I'm not a fan of -pedantic
    personally, but if it's on for one platform it should be on for all).

    HOST_LDFLAGS is renamed HOSTLDFLAGS for consistency with the previous
    HOST_CFLAGS to HOSTCFLAGS rename.  A new HOSTCFLAGS_NOPED is made available
    for those files which currently cannot be built with -pedantic, and replaces
    the old FIT_CFLAGS.

    imls now uses the cross compiler properly, rather than by trying to
    reconstruct CC using the typoed $(CROSS_COMPILER).

    envcrc.c is now dependency-processed unconditionally -- previously it would
    be built without being on (HOST)SRCS if CONFIG_ENV_IS_EMBEDDED was not
    selected.

    Signed-off-by: Scott Wood <scottwood at freescale.com>
gmake -C tools all
gmake[1]: Entering directory `/usr/local/src/cutu2uboot/tools'
powerpc-softfloat-linux-gnu-gcc  -g  -Os   -mrelocatable -fPIC -meabi -DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"  -D__KERNEL__ -DTEXT_BASE=0xF8020000 -I/usr/local/src/cutu2uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/powerpc-softfloat-linux-gnu/3.4.6/include
-pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83xx -DCONFIG_E300 -ffixed-r2 -msoft-float  -Wall -Wstrict-prototypes -fno-stack-protector   -o crc32.o crc32.c -c
powerpc-softfloat-linux-gnu-gcc  -g  -Os   -mrelocatable -fPIC -meabi -DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"  -D__KERNEL__ -DTEXT_BASE=0xF8020000 -I/usr/local/src/cutu2uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/powerpc-softfloat-linux-gnu/3.4.6/include
-pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83xx -DCONFIG_E300 -ffixed-r2 -msoft-float  -Wall -Wstrict-prototypes -fno-stack-protector   -o env_embedded.o env_embedded.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/local/src/cutu2uboot/include -idirafter /usr/local/src/cutu2uboot/include2 -idirafter /usr/local/src/cutu2uboot/include -I /usr/local/src/cutu2uboot/libfdt -I /usr/local/src/cutu2uboot/tools -DTEXT_BASE=0xF8020000 -DUSE_HOSTCC
-D__KERNEL_STRICT_NAMES -pedantic   -o envcrc.o envcrc.c -c
powerpc-softfloat-linux-gnu-gcc  -g  -Os   -mrelocatable -fPIC -meabi -DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"  -D__KERNEL__ -DTEXT_BASE=0xF8020000 -I/usr/local/src/cutu2uboot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/powerpc-softfloat-linux-gnu/3.4.6/include
-pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83xx -DCONFIG_E300 -ffixed-r2 -msoft-float  -Wall -Wstrict-prototypes -fno-stack-protector   -o sha1.o sha1.c -c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /usr/local/src/cutu2uboot/include -idirafter /usr/local/src/cutu2uboot/include2 -idirafter /usr/local/src/cutu2uboot/include -I /usr/local/src/cutu2uboot/libfdt -I /usr/local/src/cutu2uboot/tools -DTEXT_BASE=0xF8020000 -DUSE_HOSTCC
-D__KERNEL_STRICT_NAMES -pedantic  -o envcrc crc32.o env_embedded.o envcrc.o sha1.o
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
crc32.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
gmake[1]: *** [envcrc] Error 1
gmake[1]: Leaving directory `/usr/local/src/cutu2uboot/tools'
gmake: *** [tools] Error 2



More information about the U-Boot mailing list