From: Markos Chandras Date: Thu, 20 Jun 2013 14:14:10 +0000 (+0100) Subject: wvstreams: Pass -fPIC to CFLAGS when building PIC objects X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31d72937cf17e9e476e956986030e93f8fd2ce56;p=buildroot.git wvstreams: Pass -fPIC to CFLAGS when building PIC objects The argp bundled dependency which is linked to the libwvutils.so shared library, wasn't built with -fPIC. MIPS will refuce to link a non-PIC library with a shared one. We fix this problem by appending -fPIC to CFLAGS and build all the shared objects with -fPIC. [Peter: use +=] Signed-off-by: Markos Chandras Signed-off-by: Peter Korsgaard --- diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk index 65f48d4037..b4f7d89297 100644 --- a/package/wvstreams/wvstreams.mk +++ b/package/wvstreams/wvstreams.mk @@ -27,6 +27,10 @@ WVSTREAMS_CONF_OPT += \ # needed for openssl detection when statically linking (as ssl needs lz) WVSTREAMS_CONF_ENV += LIBS=-lz +ifneq ($(BR2_PREFER_STATIC_LIB),y) + WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC" +endif + ifeq ($(BR2_PACKAGE_DBUS),y) WVSTREAMS_DEPENDENCIES += dbus WVSTREAMS_CONF_OPT += --with-dbus