https://bugs.webkit.org/show_bug.cgi?id=126325
Reviewed by Martin Robinson.
* Source/autotools/SetupCompilerFlags.m4: Don't default to libstdc++ when compiling with Clang.
Instead, the compiler should determine itself what standard library to use, except on Darwin,
where libc++ should be enforced. The standard library of user's choosing can still be enforced
through the CXXFLAGS environment variable.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161333
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-01-06 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Use libc++ for C++11 on darwin
+ https://bugs.webkit.org/show_bug.cgi?id=126325
+
+ Reviewed by Martin Robinson.
+
+ * Source/autotools/SetupCompilerFlags.m4: Don't default to libstdc++ when compiling with Clang.
+ Instead, the compiler should determine itself what standard library to use, except on Darwin,
+ where libc++ should be enforced. The standard library of user's choosing can still be enforced
+ through the CXXFLAGS environment variable.
+
2014-01-05 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Ensure that the autotools build and the CMake install the same files
CFLAGS="$CFLAGS -Qunused-arguments"
fi
-# libstdc++ is at the moment the only option as the C++ standard library when compiling with Clang.
# Suppress unused arguments warnings for C++ files as well.
if test "$cxx_compiler" = "clang++"; then
- CXXFLAGS="$CXXFLAGS -stdlib=libstdc++ -Qunused-arguments"
+ CXXFLAGS="$CXXFLAGS -Qunused-arguments"
+
+ # Default to libc++ as the standard library on Darwin, if it isn't already enforced through CXXFLAGS.
+ if test "$os_darwin" = "yes"; then
+ AS_CASE([$CXXFLAGS], [*-stdlib=*], [], [CXXFLAGS="$CXXFLAGS -stdlib=libc++"])
+ fi
fi
if test "$host_cpu" = "sh4"; then