Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects
@ 2013-06-20 14:14 Markos Chandras
  2013-06-20 14:28 ` Markos Chandras
  2013-06-20 15:06 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Markos Chandras @ 2013-06-20 14:14 UTC (permalink / raw)
  To: buildroot

From: Markos Chandras <markos.chandras@imgtec.com>

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.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/wvstreams/wvstreams.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk
index 65f48d4..fddaad7 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
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-20 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 14:14 [Buildroot] [PATCH v2] wvstreams: Pass -fPIC to CFLAGS when building PIC objects Markos Chandras
2013-06-20 14:28 ` Markos Chandras
2013-06-20 15:06 ` Peter Korsgaard
2013-06-20 20:21   ` Markos Chandras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox