configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 5f27719e4e501506b82bf095aa1b2b1aac5eb390 Author: Miklos Vajna <vmik...@suse.cz> Date: Wed Jan 30 21:04:28 2013 +0100 configure: better libstdc++ ABI breakage check The old code expected that gcc -dumpversion outputs x.y.z, but just x.y is also a valid output. Use the preprocessor defines instead, this way SUSE 4.7.2 gcc will use -std=gnu++0x as well. Change-Id: I9871b05953ab255c66dd152c0befd29037522902 diff --git a/configure.ac b/configure.ac index eb0a434..e49cc38 100644 --- a/configure.ac +++ b/configure.ac @@ -5558,10 +5558,17 @@ if test "$GCC" = "yes"; then AC_MSG_RESULT([no]) fi + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#if __GNUC__ == 4 && __GNUC_MINOR__ == 7 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) +#else +abi ok +#endif +]])],[HAVE_BROKEN_ABI=TRUE],[HAVE_BROKEN_ABI=FALSE]) + AC_MSG_CHECKING([whether $CXX supports C++11 without Language Defect 757]) # This should check libstdc++ version, not gcc, but clang has incidentally C++11 support # disabled in this case by the __float128 case below. - if test "$GCCVER" -ge 040700 -a "$GCCVER" -lt 040702; then + if test "$HAVE_BROKEN_ABI" = "TRUE"; then AC_MSG_NOTICE([Not using -std=gnu++0x on $CXX version 4.7.0/4.7.1 due to libstdc++ ABI breakage.]) else save_CXXFLAGS=$CXXFLAGS _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits