blob: fe3130e3369210b2b6275c8f4f70d1bce2887c50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 4604a80b052456f20187d89e5c3e115ef0bb7251 Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@gentoo.org>
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 <anarchy@gentoo.org>
---
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
|