aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorKarol Ostrovsky <[email protected]>2017-03-16 17:14:13 +0100
committerKarol Ostrovsky <[email protected]>2017-03-16 20:27:00 +0100
commitbaabfad325f6d2de4cfd33be49ca5511cfa548ea (patch)
treea76416ae428478d0d7db363524296fccb265db3f /erts
parent6a0ca45bb465150ba47d057ecd6c75681b790aab (diff)
downloadotp-baabfad325f6d2de4cfd33be49ca5511cfa548ea.tar.gz
otp-baabfad325f6d2de4cfd33be49ca5511cfa548ea.tar.bz2
otp-baabfad325f6d2de4cfd33be49ca5511cfa548ea.zip
Improve no-pie solution from bug report ERL-294
Some linkers, for example on Gentoo Hardened, do not accept the -no-pie flag but require the -fno-PIE flag instead.
Diffstat (limited to 'erts')
-rw-r--r--erts/configure.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 1c4a3e90ef..7c6f4b163c 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2836,9 +2836,10 @@ if test X${enable_hipe} = Xyes && test X$ARCH = Xamd64; then
saved_LDFLAGS=$LDFLAGS
LDFLAGS="-no-pie $LDFLAGS"
AC_TRY_LINK(,, [],
- [AC_MSG_WARN([Linked does not accept option -no-pie])
- LDFLAGS=$saved_LDFLAGS])])
-
+ [LDFLAGS="-fno-PIE $saved_LDFLAGS"
+ AC_TRY_LINK(,, [],
+ [AC_MSG_WARN([Linked does not accept option -no-pie nor -fno-PIE])
+ LDFLAGS=$saved_LDFLAGS])])])
fi