Make sure we save CXXFLAGS before setting it as pedantic and regenerate
authorEric Christopher <echristo@apple.com>
Tue, 2 Mar 2010 05:06:54 +0000 (05:06 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 2 Mar 2010 05:06:54 +0000 (05:06 +0000)
configure.

Fixes PR6388.

Patch by Yann Droneaud!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97548 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/m4/huge_val.m4
configure

index fd94c11c86e06fa97e066e3d8287edd629018d55..5fffbfc8d37c24fc6e16ea4c46e274481f864cf8 100644 (file)
@@ -5,6 +5,7 @@
 AC_DEFUN([AC_HUGE_VAL_CHECK],[
   AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
     AC_LANG_PUSH([C++])
+    ac_save_CXXFLAGS=$CXXFLAGS
     CXXFLAGS=-pedantic
     AC_RUN_IFELSE(
       AC_LANG_PROGRAM(
@@ -12,6 +13,7 @@ AC_DEFUN([AC_HUGE_VAL_CHECK],[
         [double x = HUGE_VAL; return x != x; ]),
       [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
       [ac_cv_huge_val_sanity=yes])
+    CXXFLAGS=$ac_save_CXXFLAGS
     AC_LANG_POP([C++])
     ])
   AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
index 62b8fc9b396ac4e17205ee6dcd4f4a20949cdf75..b3f16034cba7ca207c7d5f5ff084fcf4c0cf95bc 100755 (executable)
--- a/configure
+++ b/configure
@@ -16544,6 +16544,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
+    ac_save_CXXFLAGS=$CXXFLAGS
     CXXFLAGS=-pedantic
     if test "$cross_compiling" = yes; then
   ac_cv_huge_val_sanity=yes
@@ -16596,6 +16597,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
+    CXXFLAGS=$ac_save_CXXFLAGS
     ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'