llvm.org GIT mirror llvm / 070764e
Use a heavier hammer when --enable-libcpp is passed to bypass the tests which catch buggy versions of libstdc++. While libc++ would pass them, we don't actually update the state in the configure script to use libc++ when we pass --enable-libcpp, the logic for that is in the Makefiles. So just completely skip the library test when that configure flag is passed. Hopefully this will be enough to fix the darwin bots at last, and thanks to Duncan Smith for getting things set up so I can watch the bots myself on lab.llvm.org and see any failures! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199334 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 6 years ago
2 changed file(s) with 22 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
537537 dnl Note that libstdc++4.6 is known broken for C++11 builds. The errors
538538 dnl are sometimes deeply confusing though. Here we test for an obvious
539539 dnl incomplete feature in 4.6's standard library that was completed in
540 dnl 4.7's.
541 AC_MSG_CHECKING([whether Clang will select a modern C++ standard library])
542 llvm_cv_old_cxxflags="$CXXFLAGS"
543 CXXFLAGS="$CXXFLAGS -std=c++0x"
544 AC_LINK_IFELSE([AC_LANG_SOURCE([[
540 dnl 4.7's. We also have to disable this test if 'ENABLE_LIBCPP' is set
541 dnl because the enable flags don't actually fix CXXFLAGS, they rely on
542 dnl that happening in the Makefile.
543 if test "$ENABLE_LIBCPP" -eq 0 ; then
544 AC_MSG_CHECKING([whether Clang will select a modern C++ standard library])
545 llvm_cv_old_cxxflags="$CXXFLAGS"
546 CXXFLAGS="$CXXFLAGS -std=c++0x"
547 AC_LINK_IFELSE([AC_LANG_SOURCE([[
545548 #include
546549 std::atomic x(0.0f);
547550 int main() { return (float)x; }
548551 ]])],
549 [AC_MSG_RESULT([yes])],
550 [AC_MSG_RESULT([no])
551 AC_MSG_ERROR([
552 [AC_MSG_RESULT([yes])],
553 [AC_MSG_RESULT([no])
554 AC_MSG_ERROR([
552555 We detected a missing feature in the standard C++ library that was known to be
553556 missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
554557 C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
557560
558561 If this error is incorrect or you need to force things to work, you may pass
559562 '--disable-compiler-version-checks' to configure to bypass this test.])])
560 CXXFLAGS="$llvm_cv_old_cxxflags"
563 CXXFLAGS="$llvm_cv_old_cxxflags"
564 fi
561565 ;;
562566 gcc)
563567 AC_MSG_CHECKING([whether GCC is new enough])
46194619
46204620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46214621
4622 { echo "$as_me:$LINENO: checking whether Clang will select a modern C++ standard library" >&5
4622 if test "$ENABLE_LIBCPP" -eq 0 ; then
4623 { echo "$as_me:$LINENO: checking whether Clang will select a modern C++ standard library" >&5
46234624 echo $ECHO_N "checking whether Clang will select a modern C++ standard library... $ECHO_C" >&6; }
4624 llvm_cv_old_cxxflags="$CXXFLAGS"
4625 CXXFLAGS="$CXXFLAGS -std=c++0x"
4626 cat >conftest.$ac_ext <<_ACEOF
4625 llvm_cv_old_cxxflags="$CXXFLAGS"
4626 CXXFLAGS="$CXXFLAGS -std=c++0x"
4627 cat >conftest.$ac_ext <<_ACEOF
46274628 /* confdefs.h. */
46284629 _ACEOF
46294630 cat confdefs.h >>conftest.$ac_ext
46774678
46784679 { echo "$as_me:$LINENO: result: no" >&5
46794680 echo "${ECHO_T}no" >&6; }
4680 { { echo "$as_me:$LINENO: error:
4681 { { echo "$as_me:$LINENO: error:
46814682 We detected a missing feature in the standard C++ library that was known to be
46824683 missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
46834684 C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
47004701
47014702 rm -f core conftest.err conftest.$ac_objext \
47024703 conftest$ac_exeext conftest.$ac_ext
4703 CXXFLAGS="$llvm_cv_old_cxxflags"
4704 CXXFLAGS="$llvm_cv_old_cxxflags"
4705 fi
47044706 ;;
47054707 gcc)
47064708 { echo "$as_me:$LINENO: checking whether GCC is new enough" >&5
1066010662 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1066110663 lt_status=$lt_dlunknown
1066210664 cat > conftest.$ac_ext <
10663 #line 10664 "configure"
10665 #line 10666 "configure"
1066410666 #include "confdefs.h"
1066510667
1066610668 #if HAVE_DLFCN_H