From 8dcd941d8b934891676a8d4bbef1ee78e89a4bf7 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 15 Apr 2018 19:24:02 +0200 Subject: tools/zlib: move zlib build to tools This allows us to link the other tools against our libz and we do not need the system zlib any more. Only the static linked library is copied to the staging directory so we have a statically linked library on all systems and not only on Linux. This also adds the new dependencies of the packages which are depending on zlib. Signed-off-by: Hauke Mehrtens Tested-by: Koen Vandeputte --- tools/make-ext4fs/Makefile | 8 +------- tools/make-ext4fs/patches/100-add-ldflags.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 tools/make-ext4fs/patches/100-add-ldflags.patch (limited to 'tools/make-ext4fs') diff --git a/tools/make-ext4fs/Makefile b/tools/make-ext4fs/Makefile index f140101c8e..97f9e6369c 100644 --- a/tools/make-ext4fs/Makefile +++ b/tools/make-ext4fs/Makefile @@ -17,13 +17,7 @@ PKG_MIRROR_HASH:=d7ccd5e426b1d15331ff000a37dc15161f6eef594453e970fd584fcde5a2507 include $(INCLUDE_DIR)/host-build.mk -ifeq ($(HOST_OS),Linux) - MAKE_STATIC := STATIC=1 -endif - -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) make_ext4fs $(MAKE_STATIC) -endef +HOST_MAKE_FLAGS += STATIC=1 define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/make_ext4fs $(STAGING_DIR_HOST)/bin/ diff --git a/tools/make-ext4fs/patches/100-add-ldflags.patch b/tools/make-ext4fs/patches/100-add-ldflags.patch new file mode 100644 index 0000000000..d9ce47bb80 --- /dev/null +++ b/tools/make-ext4fs/patches/100-add-ldflags.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -27,7 +27,7 @@ OBJ := \ + $(CC) $(CFLAGS) -c -o $@ $^ + + make_ext4fs: $(OBJ) libsparse/libsparse.a +- $(CC) -o $@ $^ $(ZLIB) ++ $(CC) $(LDFLAGS)-o $@ $^ $(ZLIB) + + libsparse/libsparse.a: + $(MAKE) -C libsparse/ libsparse.a -- cgit v1.2.3