libplist: Explicitly link with zlib
authorFlorian Fainelli <redacted>
Mon, 5 Jun 2017 20:36:33 +0000 (13:36 -0700)
committerFlorian Fainelli <redacted>
Tue, 6 Jun 2017 00:18:51 +0000 (17:18 -0700)
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 <redacted>
libs/libplist/Makefile

index bb61336c4c1b97e5a44b6d875aff677b5d16aa09..2a787f29627fb0fd9dc980ff4af570b4acbaf5e4 100644 (file)
@@ -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/
git clone https://git.99rst.org/PROJECT