aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-11-11 16:26:05 +0100
committerSverker Eriksson <[email protected]>2016-11-11 16:26:05 +0100
commitfc020db74ae4a27ee0b64251a29fdf306f1f4e5d (patch)
tree4503df262ee7098f292c824225de580185ba0513 /erts/configure.in
parentcc45e36d1fb0b288ca534fa72fde772b62225e93 (diff)
parentb4c76edc46f82a4d09d9f569e1d4e6013b265389 (diff)
downloadotp-fc020db74ae4a27ee0b64251a29fdf306f1f4e5d.tar.gz
otp-fc020db74ae4a27ee0b64251a29fdf306f1f4e5d.tar.bz2
otp-fc020db74ae4a27ee0b64251a29fdf306f1f4e5d.zip
Merge branch 'maint'
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 4bff2ebf3d..50f8c3b429 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2783,6 +2783,23 @@ if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then
fi
fi
+dnl Check to disable -fPIE and friends for HiPE on amd64
+if test X${enable_hipe} = Xyes && test X$ARCH = Xamd64; then
+ AC_TRY_COMPILE(, [#if defined(__pie__) || defined(__PIE__)
+ #error -fPIE is enabled by default
+ #endif],
+ [AC_MSG_NOTICE([No -fPIE enabled by default])],
+ [AC_MSG_WARN([Security feature -fPIE will be disabled for HiPE])
+ STATIC_CFLAGS="-fno-PIE $STATIC_CFLAGS"
+ saved_LDFLAGS=$LDFLAGS
+ LDFLAGS="-no-pie $LDFLAGS"
+ AC_TRY_LINK(,, [],
+ [AC_MSG_WARN([Linked does not accept option -no-pie])
+ LDFLAGS=$saved_LDFLAGS])])
+
+fi
+
+
if test X${enable_fp_exceptions} = Xauto ; then
case $host_os in
*linux*)