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.fischo...@linaro.org> --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 58c6a16..8659c40 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 != xno; -- 2.7.4