more strict and this time correct nopie check

This commit is contained in:
cathugger 2019-05-05 22:50:10 +00:00
parent 6454595206
commit 565c2a968f
No known key found for this signature in database
GPG key ID: 9BADDA2DAF6F01A8

View file

@ -30,9 +30,9 @@ fi
nopie=""
oldcflags="$CFLAGS"
CFLAGS="-nopie"
CFLAGS="-nopie -Werror"
AC_MSG_CHECKING([whether CC supports -nopie])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-nopie"],
[AC_MSG_RESULT([no])]
@ -42,9 +42,9 @@ CFLAGS="$oldcflags"
if test "x$nopie" = "x"
then
oldcflags="$CFLAGS"
CFLAGS="-no-pie"
CFLAGS="-no-pie -Werror"
AC_MSG_CHECKING([whether CC supports -no-pie])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-no-pie"],
[AC_MSG_RESULT([no])]