mkimage: cross compile fix: pass HOST_*FLAGS in to uboot's makefile
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 19 Jul 2015 14:59:26 +0000 (14:59 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 19 Jul 2015 14:59:26 +0000 (14:59 +0000)
The HOST_*FLAGS are for compiling programs which will run on the machine that is
running the build.  Setting these flags is frequently required for unusual
cross-compiles.

Signed-off-by: Lawrence D'Anna <larry@elder-gods.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46424 3c298f89-4303-0410-b956-a3cf2f4a3e73

tools/mkimage/Makefile

index a65eedf..f73cc56 100644 (file)
@@ -31,8 +31,8 @@ define Host/Prepare
 endef
 
 define Host/Compile
-       $(MAKE) -C $(HOST_BUILD_DIR) defconfig
-       $(MAKE) -C $(HOST_BUILD_DIR) tools-only
+       $(MAKE) -C $(HOST_BUILD_DIR) defconfig   HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)"
+       $(MAKE) -C $(HOST_BUILD_DIR) tools-only  HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)"
 endef
 
 define Host/Install