llvm.org GIT mirror llvm / c771850
Make sure we save CXXFLAGS before setting it as pedantic and regenerate configure. Fixes PR6388. Patch by Yann Droneaud! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97548 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 9 years ago
2 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
44 AC_DEFUN([AC_HUGE_VAL_CHECK],[
55 AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
66 AC_LANG_PUSH([C++])
7 ac_save_CXXFLAGS=$CXXFLAGS
78 CXXFLAGS=-pedantic
89 AC_RUN_IFELSE(
910 AC_LANG_PROGRAM(
1112 [double x = HUGE_VAL; return x != x; ]),
1213 [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
1314 [ac_cv_huge_val_sanity=yes])
15 CXXFLAGS=$ac_save_CXXFLAGS
1416 AC_LANG_POP([C++])
1517 ])
1618 AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
1654316543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1654416544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1654516545
16546 ac_save_CXXFLAGS=$CXXFLAGS
1654616547 CXXFLAGS=-pedantic
1654716548 if test "$cross_compiling" = yes; then
1654816549 ac_cv_huge_val_sanity=yes
1659516596 fi
1659616597
1659716598
16599 CXXFLAGS=$ac_save_CXXFLAGS
1659816600 ac_ext=c
1659916601 ac_cpp='$CPP $CPPFLAGS'
1660016602 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'