Kaydet (Commit) 5f27719e authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst b0cc4844
...@@ -5558,10 +5558,17 @@ if test "$GCC" = "yes"; then ...@@ -5558,10 +5558,17 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi 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]) 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 # This should check libstdc++ version, not gcc, but clang has incidentally C++11 support
# disabled in this case by the __float128 case below. # 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.]) AC_MSG_NOTICE([Not using -std=gnu++0x on $CXX version 4.7.0/4.7.1 due to libstdc++ ABI breakage.])
else else
save_CXXFLAGS=$CXXFLAGS save_CXXFLAGS=$CXXFLAGS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment