mkimage: cross compile fix: pass HOST_*FLAGS in to uboot's makefile
authorFelix Fietkau <[email protected]>
Thu, 26 Nov 2015 10:39:41 +0000 (10:39 +0000)
committerFelix Fietkau <[email protected]>
Thu, 26 Nov 2015 10:39:41 +0000 (10:39 +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 <[email protected]>
Backport of r46424

SVN-Revision: 47651

tools/mkimage/Makefile

index a65eedfcc64d30ae78785f526ed6b7d10eb9a845..f73cc5631843f6825e23f1db32f58db304877f54 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