diff mbox

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

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

Commit Message

Bill Fischofer Sept. 23, 2016, 4:15 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>

---
Changes for v3:
- Correct test directionality to make --enable-shared=yes the default

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

-- 
2.7.4
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 983b221..f33422a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -189,6 +189,14 @@  fi
 AC_SUBST(_ODP_INLINES)
 
 ##########################################################################
+# Generate PCI if sharing not supported
+##########################################################################
+if test x$enable_shared == xno;
+then
+	CFLAGS="$CFLAGS -fPIC"
+fi
+
+##########################################################################
 # Setup doxygen documentation
 ##########################################################################
 DX_HTML_FEATURE(ON)