libzdb: fix uclibc build issue
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 8 Jul 2018 10:02:48 +0000 (12:02 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 8 Jul 2018 10:02:51 +0000 (12:02 +0200)
libmariadb 10.2 needs to be linked in together with iconv. On musl and
glibc iconv is part of libc. That's not the case for uclibc, where
libiconv-full needs to be used. This commit adds -liconv to the linker
flags and aids libzdb in finding libiconv.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/libzdb/Makefile
libs/libzdb/patches/010-cross-compile-fixes.patch

index 1034d041d58f650f8d9f9fbcbf18223541b6591d..8c0f9c5a2dc642d7eeef055839c757d9ed826b6a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libzdb
 PKG_VERSION:=3.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -23,6 +23,14 @@ PKG_BUILD_DEPENDS:=libzdb/host
 
 include $(INCLUDE_DIR)/package.mk
 
+# Help libzdb find libiconv.so when using uClibc.
+ifneq ($(CONFIG_USE_UCLIBC),)
+TARGET_CPPFLAGS+= \
+       -I$(STAGING_DIR)/usr/lib/libiconv-full/include
+TARGET_LDFLAGS += \
+       -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
+endif
+
 define Package/libzdb
     SECTION:=libs
     CATEGORY:=Libraries
index e765da80ec60d06bb49455e6f50c030af8e5a4f7..6b6b7d3f040cb6f14d342ef28ff7802aca8e8a1c 100644 (file)
@@ -40,7 +40,7 @@ diff -rupN libzdb-3.1.orig/configure.ac libzdb-3.1/configure.ac
 -                DBCPPFLAGS="$DBCPPFLAGS `$MYSQLCONFIG --include`"
 -                DBLDFLAGS="$DBLDFLAGS `$MYSQLCONFIG --libs`"
 +                DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/mysql"
-+                DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -lz -lcrypt -lm"
++                DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -liconv -lz -lcrypt -lm"
                  AC_DEFINE([HAVE_LIBMYSQLCLIENT], 1, [Define to 1 to enable mysql])
          else
                  CPPFLAGS=$svd_CPPFLAGS