From: H.J. Lu Date: Sun, 31 May 2015 12:06:06 +0000 (+0000) Subject: Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fee22a8053fb34a220f6bcc6bec6b016fe248696;p=gcc.git Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS * configure.ac (NO_PIE_CFLAGS): Check CXXFLAGS instead of CFLAGS. * configure: Regenerated. From-SVN: r223899 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5625750e3a6..0394d19e017 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-05-31 H.J. Lu + + * configure.ac (NO_PIE_CFLAGS): Check CXXFLAGS instead of CFLAGS. + * configure: Regenerated. + 2015-05-31 Mikhail Maltsev * config/cris/cris.h (CRIS_ARCH_CPP_DEFAULT): Fix C++11 compatibility diff --git a/gcc/configure b/gcc/configure index f70f2d30813..b26a86f4802 100755 --- a/gcc/configure +++ b/gcc/configure @@ -28728,8 +28728,8 @@ $as_echo_n "checking for -fno-PIE option... " >&6; } if test "${gcc_cv_c_no_fpie+set}" = set; then : $as_echo_n "(cached) " >&6 else - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-PIE" + saved_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fno-PIE" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) {return 0;} @@ -28740,7 +28740,7 @@ else gcc_cv_c_no_fpie=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$saved_CFLAGS" + CXXFLAGS="$saved_CXXFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_c_no_fpie" >&5 $as_echo "$gcc_cv_c_no_fpie" >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index b27433ef126..c09f3ae5454 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5834,12 +5834,12 @@ AC_SUBST([enable_default_pie]) # Check if -fno-PIE works. AC_CACHE_CHECK([for -fno-PIE option], [gcc_cv_c_no_fpie], - [saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fno-PIE" + [saved_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fno-PIE" AC_COMPILE_IFELSE([int main(void) {return 0;}], [gcc_cv_c_no_fpie=yes], [gcc_cv_c_no_fpie=no]) - CFLAGS="$saved_CFLAGS"]) + CXXFLAGS="$saved_CXXFLAGS"]) if test "$gcc_cv_c_no_fpie" = "yes"; then NO_PIE_CFLAGS="-fno-PIE" fi