uboot-fritz4040: Add host flags for host compiler
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 17 May 2019 19:32:50 +0000 (21:32 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 19 May 2019 10:29:24 +0000 (12:29 +0200)
This adds the host staging directory to the include path to make it use
the zlib.h files from the staging include directory and also link
against the zlib version from the staging directory.

This fixes a compile problem when the zlib header were not installed on
the build host.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[picked from openwrt-18.06]

package/boot/uboot-fritz4040/Makefile

index c6f0cab8c499b17a179ff0cac102a9517d7c0f9a..df9c685c954fe6b52b9f21f8997d32edeabc9e5c 100644 (file)
@@ -46,8 +46,8 @@ export DTC
 
 define Build/Configure
        $(Build/Configure/U-Boot)
-       $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c
-       $(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
+       $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c -lz
+       $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
        ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz
 endef