Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS
authorH.J. Lu <hongjiu.lu@intel.com>
Sun, 31 May 2015 12:06:06 +0000 (12:06 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sun, 31 May 2015 12:06:06 +0000 (05:06 -0700)
* configure.ac (NO_PIE_CFLAGS): Check CXXFLAGS instead of CFLAGS.
* configure: Regenerated.

From-SVN: r223899

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index 5625750e3a6e2203751fd635d419a406c55a47b3..0394d19e017c8cb2fdfd143e916e3bd60829832a 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * configure.ac (NO_PIE_CFLAGS): Check CXXFLAGS instead of CFLAGS.
+       * configure: Regenerated.
+
 2015-05-31  Mikhail Maltsev  <maltsevm@gmail.com>
 
        * config/cris/cris.h (CRIS_ARCH_CPP_DEFAULT): Fix C++11 compatibility
index f70f2d308137832af507fcbd33a3aa4cd54b5edc..b26a86f4802dd775868795a274775c5b65067f9a 100755 (executable)
@@ -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; }
index b27433ef126ddfdff3b08e6a7bb9c88880d9d846..c09f3ae5454a497e6b262dea280709311fe6f409 100644 (file)
@@ -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