From c6f813df2ba8ced9e3289efc87ccb61360d41d84 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 5 Jun 2017 13:36:33 -0700 Subject: [PATCH] libplist: Explicitly link with zlib Fixes build errors with external toolchains that don't automatically append STAGING_DIR to the library search path: /opt/toolchains/stbgcc-4.8-1.5/lib/gcc/mipsel-linux-gnu/4.8.5/../../../../mipsel-linux-gnu/bin/ld: warning: libz.so.1, needed by /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so, not found (try using -rpath or -rpath-link) /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzopen64' /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzdirect' /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzclose' /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzwrite' /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzdopen' /local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/lib/libxml2.so: undefined reference to `gzread' collect2: error: ld returned 1 exit status make[5]: *** [plistutil] Error 1 make[5]: Leaving directory `/local/users/fainelli/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/libplist-1.13/tools' Signed-off-by: Florian Fainelli --- libs/libplist/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libplist/Makefile b/libs/libplist/Makefile index bb61336c4..2a787f296 100644 --- a/libs/libplist/Makefile +++ b/libs/libplist/Makefile @@ -76,6 +76,8 @@ endef CONFIGURE_ARGS += \ --without-cython +TARGET_LDFLAGS += -lz + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/plist $(1)/usr/include/