summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/fp_gcc_supports_no_pie.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/fp_gcc_supports_no_pie.m4 b/m4/fp_gcc_supports_no_pie.m4
index 880a1e4cfa..d86cf3590e 100644
--- a/m4/fp_gcc_supports_no_pie.m4
+++ b/m4/fp_gcc_supports_no_pie.m4
@@ -5,10 +5,10 @@
AC_DEFUN([FP_GCC_SUPPORTS_NO_PIE],
[
AC_REQUIRE([AC_PROG_CC])
- AC_MSG_CHECKING([whether GCC supports -no-pie])
+ AC_MSG_CHECKING([whether CC supports -no-pie])
echo 'int main() { return 0; }' > conftest.c
# Some GCC versions only warn when passed an unrecognized flag.
- 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
+ if $CC -no-pie -Werror -x c conftest.c -o conftest > 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