summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-04-19 15:05:50 -0400
committerBen Gamari <ben@smart-cactus.org>2018-04-19 18:06:15 -0400
commitcbd73bbbb7df080d5204098aa02e5f5d0d48823c (patch)
tree444ad64033e36ca256ce6917fc5a343d3d0a726b /aclocal.m4
parent3c3e73103a45c9acee1682300727bad7b6a62d30 (diff)
downloadhaskell-cbd73bbbb7df080d5204098aa02e5f5d0d48823c.tar.gz
configure: Use -Werror to check for existence of -no-pie
Clang throws a warning instead of an error when it is passed -no-pie, clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument] Consequently configure concludes that it supports -no-pie. However, this will fail when used with -Werror. The solution is to simply use -Werror in the configure check. Thanks to @goldfire for reporting this. Reviewers: hvr Subscribers: thomie, carter, goldfire Differential Revision: https://phabricator.haskell.org/D4557
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index a48a5af238..1cef8427fc 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1294,7 +1294,7 @@ AC_DEFUN([FP_GCC_SUPPORTS_NO_PIE],
AC_MSG_CHECKING([whether GCC supports -no-pie])
echo 'int main() { return 0; }' > conftest.c
# Some GCC versions only warn when passed an unrecognized flag.
- if $CC -no-pie -x c /dev/null -dM -E > conftest.txt 2>&1 && ! grep -i unrecognized conftest.txt > /dev/null 2>&1; then
+ if $CC -no-pie -Werror -x c /dev/null -dM -E > conftest.txt 2>&1 && ! grep -i unrecognized conftest.txt > /dev/null 2>&1; then
CONF_GCC_SUPPORTS_NO_PIE=YES
AC_MSG_RESULT([yes])
else