Title: [161359] trunk
Revision
161359
Author
[email protected]
Date
2014-01-06 12:03:05 -0800 (Mon, 06 Jan 2014)

Log Message

[GTK] configure errors out when building with libc++
https://bugs.webkit.org/show_bug.cgi?id=126431

Reviewed by Martin Robinson.

Ease up the Clang and libstdc++ combination test to only fail if libstdc++ < 4.8.1 is actually used.
This allows for libc++ to be used as well. The test is moved into SetupCompilerFlags.m4 and is done
after the CXXFLAGS variable is properly set up, that is when all the C++ compiler options are determined.

* Source/autotools/CheckSystemAndBasicDependencies.m4:
* Source/autotools/SetupCompilerFlags.m4:

Modified Paths

Diff

Modified: trunk/ChangeLog (161358 => 161359)


--- trunk/ChangeLog	2014-01-06 19:44:32 UTC (rev 161358)
+++ trunk/ChangeLog	2014-01-06 20:03:05 UTC (rev 161359)
@@ -1,3 +1,17 @@
+2014-01-06  Zan Dobersek  <[email protected]>
+
+        [GTK] configure errors out when building with libc++
+        https://bugs.webkit.org/show_bug.cgi?id=126431
+
+        Reviewed by Martin Robinson.
+
+        Ease up the Clang and libstdc++ combination test to only fail if libstdc++ < 4.8.1 is actually used.
+        This allows for libc++ to be used as well. The test is moved into SetupCompilerFlags.m4 and is done
+        after the CXXFLAGS variable is properly set up, that is when all the C++ compiler options are determined.
+
+        * Source/autotools/CheckSystemAndBasicDependencies.m4:
+        * Source/autotools/SetupCompilerFlags.m4:
+
 2014-01-06  Martin Robinson  <[email protected]>
 
         [CMake] [GTK] Fix the build for the WebKitGTK+ developer configuration

Modified: trunk/Source/autotools/CheckSystemAndBasicDependencies.m4 (161358 => 161359)


--- trunk/Source/autotools/CheckSystemAndBasicDependencies.m4	2014-01-06 19:44:32 UTC (rev 161358)
+++ trunk/Source/autotools/CheckSystemAndBasicDependencies.m4	2014-01-06 20:03:05 UTC (rev 161359)
@@ -119,20 +119,6 @@
 
 if test "$cxx_compiler" = "unknown"; then
     AC_MSG_ERROR([Compiler GCC >= 4.7 or Clang >= 3.2 is required for C++ compilation])
-elif test "$cxx_compiler" = "clang++"; then
-    OLD_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="-std=c++11"
-    AC_LANG_PUSH([C++])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-#include <type_traits>
-#if defined(__GLIBCXX__) && __GLIBCXX__ >= 20130531
-bool libstdcxxTest = std::is_trivially_destructible<bool>::value;
-#else
-#error libstdc++ >= 4.8.1 is required
-#endif
-])], [], [AC_MSG_ERROR([libstdc++ >= 4.8.1 is required as the standard library used with the Clang compiler.])])
-    AC_LANG_POP([C++])
-    CXXFLAGS="$OLD_CXXFLAGS"
 fi
 
 # C/C++ Headers

Modified: trunk/Source/autotools/SetupCompilerFlags.m4 (161358 => 161359)


--- trunk/Source/autotools/SetupCompilerFlags.m4	2014-01-06 19:44:32 UTC (rev 161358)
+++ trunk/Source/autotools/SetupCompilerFlags.m4	2014-01-06 20:03:05 UTC (rev 161359)
@@ -16,6 +16,16 @@
     if test "$os_darwin" = "yes"; then
         AS_CASE([$CXXFLAGS], [*-stdlib=*], [], [CXXFLAGS="$CXXFLAGS -stdlib=libc++"])
     fi
+
+    # If Clang will be using libstdc++ as the standard library, version >= 4.8.1 should be in use.
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#if defined(__GLIBCXX__) && __GLIBCXX__ >= 20130531
+#include <type_traits>
+bool libstdcxxTest = std::is_trivially_destructible<bool>::value;
+#endif
+])], [], [AC_MSG_ERROR([libstdc++ >= 4.8.1 is required as the standard library used with the Clang compiler.])])
+    AC_LANG_POP([C++])
 fi
 
 if test "$host_cpu" = "sh4"; then
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to