[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann sbergman at redhat.com
Thu Sep 11 02:05:32 PDT 2014


 configure.ac |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 4b758c52955e1931850938bf70764ee6376616a0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Sep 11 11:02:13 2014 +0200

    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

diff --git a/configure.ac b/configure.ac
index 5b5ad1d..7119839 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


More information about the Libreoffice-commits mailing list