summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-11 11:02:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-11 11:04:55 +0200
commit4b758c52955e1931850938bf70764ee6376616a0 (patch)
tree7c63f626c0cd549f96a0efc42f4414ba85b8fcec
parent380a4618dd8205c56a5c6622e01e88ae8911fe5e (diff)
Fix check for ABI-broken GCC 4.7.{0,1} libstdc++
...to avoid mis-clasification of e.g. GCC 4.6 libstdc++ on Ubuntu 12.04 as witnessed at <http://ci.libreoffice.org/job/buildbot/2461/consoleFull> Change-Id: Ia754a8d847e7af4e0e25b4bf82e17214f7212894
-rw-r--r--configure.ac16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5b5ad1d1a5bc..711983973f52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6136,17 +6136,23 @@ elif test "$GCC" = "yes"; then
fi
fi
+dnl Test for temporarily incompatible libstdc++ 4.7.{0,1}, where
+dnl <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=179528> introduced
+dnl an additional member _M_size into C++11 std::list towards 4.7.0 and
+dnl <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=189186> removed it
+dnl again towards 4.7.2:
if test $CPP_LIBRARY = GLIBCXX -a "$HAVE_CXX11" = TRUE; then
AC_MSG_CHECKING([whether using C++11 causes libstdc++ 4.7.0/4.7.1 ABI breakage])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <list>
-#if !defined(__GLIBCXX__)
+#if !defined __GLIBCXX__ || (__GLIBCXX__ != 20120322 && __GLIBCXX__ != 20120614)
+ // according to <https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html>:
+ // GCC 4.7.0: 20120322
+ // GCC 4.7.1: 20120614
+ // and using a range check is not possible as the mapping between
+ // __GLIBCXX__ values and GCC versions is not monotonic
/* ok */
-#elif __GLIBCXX__ < 20111004
-/* before breakage */
-#elif __GLIBCXX__ > 20120703
-/* after breakage */
#else
abi broken
#endif