summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-11-11 12:05:21 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-11 12:05:40 -0500
commitd421a7e22e0be3de32376970b8c38ec308f959da (patch)
tree80e298beed878f74532e46d2249c78ab0a8e3630 /configure.ac
parentec0bf8117d1aefd20711a6152ebbca63f3bd0774 (diff)
downloadhaskell-d421a7e22e0be3de32376970b8c38ec308f959da.tar.gz
Pass -no-pie to GCC
Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be default in their GCC packaging. This breaks our abuse of GCC as a linker which requires that we pass -Wl,-r, which is incompatible with PIE (since the former implies that we are generating a relocatable object file and the latter an executable). This is a second attempt at D2691. This attempt constrasts with D2691 in that it preserves the "does gcc support -no-pie" flag in settings, allowing this to be reconfigured by `configure` during installation of a binary distribution. Thanks for @rwbarton for drawing attention to this issue. Test Plan: Validate Reviewers: austin, hvr, erikd Reviewed By: erikd Subscribers: thomie, rwbarton, erikd Differential Revision: https://phabricator.haskell.org/D2693 GHC Trac Issues: #12759
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 70c4447bb9..678fa2e609 100644
--- a/configure.ac
+++ b/configure.ac
@@ -608,6 +608,9 @@ dnl If gcc, make sure it's at least 3.0
dnl
FP_GCC_VERSION
+dnl ** See whether gcc supports -no-pie
+FP_GCC_SUPPORTS_NO_PIE
+
dnl ** look to see if we have a C compiler using an llvm back end.
dnl
FP_CC_LLVM_BACKEND