u-boot: add CROSS_COMPILE/ARCH when building host tools
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 5 Dec 2010 20:53:13 +0000 (21:53 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 16 Dec 2010 14:06:45 +0000 (15:06 +0100)
Even when building the host tools, for some reason U-Boot tries to
execute the cross-compiler, so tell it which cross-compiler to use in
order to avoid failure such as:

/usr/bin/make -j12 -C /home/test/outputs/test-253-mini2440_defconfig/build/u-boot-custom tools
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/home/test/outputs/test-253-mini2440_defconfig/build/u-boot-custom'
for dir in tools examples api_examples ; do /usr/bin/make -C $dir _depend ; done
Generating include/autoconf.mk
/bin/sh: line 3: arm-linux-gcc: command not found

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
boot/u-boot/u-boot.mk

index 971920751492c9865f006ee099753a681df1127d..93825e125546740dabb3cda8b616e2d3d0eacad2 100644 (file)
@@ -144,7 +144,7 @@ $(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN)
 # uImage.
 $(MKIMAGE): $(U_BOOT_DIR)/.patched
        mkdir -p $(@D)
-       $(MAKE) -C $(U_BOOT_DIR) tools
+       $(MAKE) -C $(U_BOOT_DIR) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) tools
        cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D)
 
 # Build manually mkimage for the target