From 4604a80b052456f20187d89e5c3e115ef0bb7251 Mon Sep 17 00:00:00 2001 From: "Jory A. Pratt" Date: Mon, 24 Jul 2017 06:10:11 -0500 Subject: [PATCH] CFLAGS must contain -fPIC when checking the linker https://bugs.gentoo.org/show_bug.cgi?id=607350 Signed-off-by: Jory A. Pratt --- mozilla/build/autoconf/compiler-opts.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/build/autoconf/compiler-opts.m4 b/mozilla/build/autoconf/compiler-opts.m4 index c12d400..639e99e 100644 --- a/mozilla/build/autoconf/compiler-opts.m4 +++ b/mozilla/build/autoconf/compiler-opts.m4 @@ -268,6 +268,8 @@ MOZ_ARG_ENABLE_BOOL(pie, if test "$GNU_CC" -a -n "$MOZ_PIE"; then AC_MSG_CHECKING([for PIE support]) + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -fPIC" _SAVE_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -pie" AC_TRY_LINK(,,AC_MSG_RESULT([yes]) @@ -275,6 +277,8 @@ if test "$GNU_CC" -a -n "$MOZ_PIE"; then AC_MSG_RESULT([no]) AC_MSG_ERROR([--enable-pie requires PIE support from the linker.])) LDFLAGS=$_SAVE_LDFLAGS + CFLAGS=$_SAVE_CFLAGS + fi AC_SUBST(MOZ_PROGRAM_LDFLAGS) -- 2.13.3