summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-15 21:21:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-15 21:21:48 +0000
commit070764ee855463a2c9224138bc056fa4f2ef06da (patch)
tree4b16f9574fd785466a44ede989d57e5b28c0233e
parent36280bde5808460b0a41df4de9f382bfd70cbe09 (diff)
downloadllvm-070764ee855463a2c9224138bc056fa4f2ef06da.tar.gz
llvm-070764ee855463a2c9224138bc056fa4f2ef06da.tar.bz2
llvm-070764ee855463a2c9224138bc056fa4f2ef06da.tar.xz
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
-rw-r--r--autoconf/configure.ac22
-rwxr-xr-xconfigure16
2 files changed, 22 insertions, 16 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 243b2ceec9..7e710080ea 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -538,18 +538,21 @@ bypass these sanity checks.])])
dnl Note that libstdc++4.6 is known broken for C++11 builds. The errors
dnl are sometimes deeply confusing though. Here we test for an obvious
dnl incomplete feature in 4.6's standard library that was completed in
- dnl 4.7's.
- AC_MSG_CHECKING([whether Clang will select a modern C++ standard library])
- llvm_cv_old_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++0x"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
+ dnl 4.7's. We also have to disable this test if 'ENABLE_LIBCPP' is set
+ dnl because the enable flags don't actually fix CXXFLAGS, they rely on
+ dnl that happening in the Makefile.
+ if test "$ENABLE_LIBCPP" -eq 0 ; then
+ AC_MSG_CHECKING([whether Clang will select a modern C++ standard library])
+ llvm_cv_old_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include <atomic>
std::atomic<float> x(0.0f);
int main() { return (float)x; }
]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
@@ -558,7 +561,8 @@ standard library.
If this error is incorrect or you need to force things to work, you may pass
'--disable-compiler-version-checks' to configure to bypass this test.])])
- CXXFLAGS="$llvm_cv_old_cxxflags"
+ CXXFLAGS="$llvm_cv_old_cxxflags"
+ fi
;;
gcc)
AC_MSG_CHECKING([whether GCC is new enough])
diff --git a/configure b/configure
index 0f03eace1e..066a34cf76 100755
--- a/configure
+++ b/configure
@@ -4620,11 +4620,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: checking whether Clang will select a modern C++ standard library" >&5
+ if test "$ENABLE_LIBCPP" -eq 0 ; then
+ { echo "$as_me:$LINENO: checking whether Clang will select a modern C++ standard library" >&5
echo $ECHO_N "checking whether Clang will select a modern C++ standard library... $ECHO_C" >&6; }
- llvm_cv_old_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++0x"
- cat >conftest.$ac_ext <<_ACEOF
+ llvm_cv_old_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4678,7 +4679,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
- { { echo "$as_me:$LINENO: error:
+ { { echo "$as_me:$LINENO: error:
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
@@ -4701,7 +4702,8 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CXXFLAGS="$llvm_cv_old_cxxflags"
+ CXXFLAGS="$llvm_cv_old_cxxflags"
+ fi
;;
gcc)
{ echo "$as_me:$LINENO: checking whether GCC is new enough" >&5
@@ -10661,7 +10663,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10664 "configure"
+#line 10666 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H