Patchwork [WIP,3/5] libiconv: disable preloadable for static builds

login
register
mail settings
Submitter Gustavo Zacarias
Date May 25, 2014, 10:12 p.m.
Message ID <1401055980-28742-4-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/352303/
State Accepted
Headers show

Comments

Gustavo Zacarias - May 25, 2014, 10:12 p.m.
Disable the preloadable libiconv variant when building for static
targets since that's not possible.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/libiconv/libiconv.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/package/libiconv/libiconv.mk b/package/libiconv/libiconv.mk
index ee313ce..d2209bc 100644
--- a/package/libiconv/libiconv.mk
+++ b/package/libiconv/libiconv.mk
@@ -8,6 +8,14 @@  LIBICONV_VERSION = 1.14
 LIBICONV_SITE = $(BR2_GNU_MIRROR)/libiconv
 LIBICONV_INSTALL_STAGING = YES
 
+# Preloadable libiconv is for dynamic targets only
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+define LIBICONV_DISABLE_PRELOAD
+	$(SED) '/preload/d' $(@D)/Makefile.in
+endef
+endif
+LIBICONV_PRE_CONFIGURE_HOOKS += LIBICONV_DISABLE_PRELOAD
+
 # Remove not used preloadable libiconv.so
 define LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS
 	rm -f $(TARGET_DIR)/usr/lib/preloadable_libiconv.so