Commit cc0d5d30 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

configure: Verify that GCC recognizes -no-pie flag

It seems like GCC versions prior to 4.8 exit with code 0 when faced with
an unrecognized flag. Silly compilers.

Test Plan: Validate

Reviewers: hvr, austin, ggreif

Reviewed By: ggreif

Subscribers: thomie, erikd

Differential Revision:

GHC Trac Issues: #12759

(cherry picked from commit 011af2bf)
parent 4639ce6d
......@@ -1269,7 +1269,8 @@ AC_DEFUN([FP_GCC_SUPPORTS_NO_PIE],
AC_MSG_CHECKING([whether GCC supports -no-pie])
echo 'int main() { return 0; }' > conftest.c
if ${CC-cc} -o conftest -no-pie conftest.c > /dev/null 2>&1; then
# 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment