Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <markos.chandras@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC
Date: Wed, 5 Jun 2013 15:02:36 +0100	[thread overview]
Message-ID: <1370440956-8000-1-git-send-email-markos.chandras@gmail.com> (raw)

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

Fixes linking problems on MIPS.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/wvstreams/wvstreams-0006-argp-fpic.patch | 28 ++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/wvstreams/wvstreams-0006-argp-fpic.patch

diff --git a/package/wvstreams/wvstreams-0006-argp-fpic.patch b/package/wvstreams/wvstreams-0006-argp-fpic.patch
new file mode 100644
index 0000000..b4cf1d2
--- /dev/null
+++ b/package/wvstreams/wvstreams-0006-argp-fpic.patch
@@ -0,0 +1,28 @@
+Build argp object files with -fPIC.
+
+The argp bundled dependency is linked to the libwvutils.so shared library.
+MIPS will refuce to link a non-PIC library with a shared one.
+
+We fix this problem by building the argp source files using -fPIC since
+the libargp static library will only be used to link to libwvutils.so
+as instructed by the following rule in the root Makefile:
+
+ifeq ($(USE_WVSTREAMS_ARGP),1)
+  utils/wvargs.o-CPPFLAGS += -Iargp
+  libwvutils.so-LIBS += -Largp -largp
+
+Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
+
+Index: wvstreams-4.6.1/argp/Makefile.in
+===================================================================
+--- wvstreams-4.6.1.orig/argp/Makefile.in
++++ wvstreams-4.6.1/argp/Makefile.in
+@@ -137,7 +137,7 @@ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ -fPIC
+ CPP = @CPP@
+ CPPFLAGS = @CPPFLAGS@
+ CYGPATH_W = @CYGPATH_W@
-- 
1.8.2.1

             reply	other threads:[~2013-06-05 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 14:02 Markos Chandras [this message]
2013-06-06 13:09 ` [Buildroot] [PATCH] wvstreams: Build bundled argp library with -fPIC Markos Chandras
2013-06-12  8:22   ` Markos Chandras
2013-06-19  8:23     ` Markos Chandras
2013-06-20  8:00 ` Peter Korsgaard
2013-06-20  9:05   ` Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370440956-8000-1-git-send-email-markos.chandras@gmail.com \
    --to=markos.chandras@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox