diff mbox

[PATCHv2,2/2] config: share: use relocatable code if --enable-shared=no is specified

Message ID 1474641904-4769-2-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Sept. 23, 2016, 2:45 p.m. UTC
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2510 by adding
CFLAGS=-fPIC when --enable-shared=no is in effect to force generation of
relocatable code.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.7.4
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 1835f80..f86d017 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,6 +178,14 @@  AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
 AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
 
 ##########################################################################
+# Generate PIC if sharing not supported
+##########################################################################
+if test $enable_shared != xyes;
+then
+	CFLAGS="$CFLAGS -fPIC"
+fi
+
+##########################################################################
 # Setup for ABI compatibility
 ##########################################################################
 if test x$enable_abi_compat != xyes;