Patchwork [08/15] argp-standlone: build position independent code

login
register
mail settings
Submitter Thomas Petazzoni
Date Jan. 6, 2013, 3:22 p.m.
Message ID <49ea89bd0f8704ba32554477c679bf3f959d5938.1357485747.git.thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/209768/
State Accepted
Commit eb6cf3003366864aa29cc56eab88c26c3d8baedf
Headers show

Comments

Thomas Petazzoni - Jan. 6, 2013, 3:22 p.m.
Even though argp-standalone is built as a static library, it might get
linked in a shared library, so we must built it as
position-independent code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/argp-standalone/argp-standalone.mk |    3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/package/argp-standalone/argp-standalone.mk b/package/argp-standalone/argp-standalone.mk
index 47c09b2..ba7f757 100644
--- a/package/argp-standalone/argp-standalone.mk
+++ b/package/argp-standalone/argp-standalone.mk
@@ -8,6 +8,9 @@  ARGP_STANDALONE_VERSION = 1.3
 ARGP_STANDALONE_SITE = http://www.lysator.liu.se/~nisse/archive
 ARGP_STANDALONE_INSTALL_STAGING = YES
 
+ARGP_STANDALONE_CONF_ENV = \
+	CFLAGS="$(TARGET_CFLAGS) -fPIC"
+
 define ARGP_STANDALONE_INSTALL_STAGING_CMDS
 	$(INSTALL) -D $(@D)/libargp.a $(STAGING_DIR)/usr/lib/libargp.a
 	$(INSTALL) -D $(@D)/argp.h $(STAGING_DIR)/usr/include/argp.h