WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126325
[GTK] Use libc++ for C++11 on darwin
https://bugs.webkit.org/show_bug.cgi?id=126325
Summary
[GTK] Use libc++ for C++11 on darwin
Jeremy Huddleston Sequoia
Reported
2013-12-30 21:15:24 PST
webkit-gtk tries to use libstdc++ for C++11 even though OS X's libstdc++ doesn't support C++11. What is the point of this? The comment makes it look intentional. # Use the C++11 standard. Do not warn about C++11 incompatibilities. CXXFLAGS="$CXXFLAGS -pthread -std=c++11 -Wno-c++11-compat" ... # libstdc++ is at the moment the only option as the C++ standard library when compiling with Clang. # -Wno-c++11-extensions, currently only usable with Clang, suppresses warnings of C++11 extensions in use. # Suppress unused arguments warnings for C++ files as well. if test "$cxx_compiler" = "clang++"; then CXXFLAGS="$CXXFLAGS -stdlib=libstdc++ -Wno-c++11-extensions -Qunused-arguments" fi --- /usr/bin/clang++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -I./Source -I./Source/WTF -I./Source/WTF/wtf -DGTEST_USE_OWN_TR1_TUPLE=1 -fno-rtti -fstrict-aliasing -O3 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -Wno-c++11-extensions -arch x86_64 -pthread -std=c++11 -Wno-c++11-compat -stdlib=libstdc++ -Wno-c++11-extensions -Qunused-arguments -O2 -MT Source/WTF/wtf/libWTF_la-Compression.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-Compression.Tpo -c Source/WTF/wtf/Compression.cpp -fno-common -DPIC -o Source/WTF/wtf/.libs/libWTF_la-Compression.o In file included from Source/WTF/wtf/Compression.cpp:28: In file included from ./Source/WTF/wtf/Compression.h:30: In file included from ./Source/WTF/wtf/Vector.h:31: In file included from ./Source/WTF/wtf/VectorTraits.h:26: ./Source/WTF/wtf/RefPtr.h:149:27: error: no member named 'move' in namespace 'std' RefPtr ptr = std::move(o); ~~~~~^ ./Source/WTF/wtf/RefPtr.h:156:27: error: no member named 'move' in namespace 'std' RefPtr ptr = std::move(o); ~~~~~^ 2 errors generated. $ sudo /usr/bin/clang++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -I./Source -I./Source/WTF -I./Source/WTF/wtf -DGTEST_USE_OWN_TR1_TUPLE=1 -fno-rtti -fstrict-aliasing -O3 -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -Wno-c++11-extensions -arch x86_64 -pthread -std=c++11 -Wno-c++11-compat -stdlib=libc++ -Wno-c++11-extensions -Qunused-arguments -O2 -MT Source/WTF/wtf/libWTF_la-Compression.lo -MD -MP -MF Source/WTF/wtf/.deps/libWTF_la-Compression.Tpo -c Source/WTF/wtf/Compression.cpp -fno-common -DPIC -o Source/WTF/wtf/.libs/libWTF_la-Compression.o --- We're using libc++ for webkit-gtk-2.2.x in MacPorts without any issues reported.
Attachments
Patch
(1.74 KB, patch)
2014-01-05 01:39 PST
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Patch
(1.73 KB, patch)
2014-01-05 05:07 PST
,
Zan Dobersek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2013-12-31 01:22:20 PST
I think we can switch to libc++ on all platforms when compiling with Clang.
Michael Catanzaro
Comment 2
2013-12-31 08:38:42 PST
Some distributions (e.g. Fedora) ship Clang but not libc++.
Jeremy Huddleston Sequoia
Comment 3
2014-01-03 10:28:32 PST
Related to
https://bugs.webkit.org/show_bug.cgi?id=126431
Zan Dobersek
Comment 4
2014-01-05 01:24:07 PST
I think we could default to libc++ on Darwin and stop passing the -stdlib option to the Clang compiler on other platforms. The option could still be enforced manually through the CXXFLAGS env.
Zan Dobersek
Comment 5
2014-01-05 01:39:54 PST
Created
attachment 220392
[details]
Patch
Jeremy Huddleston Sequoia
Comment 6
2014-01-05 03:03:58 PST
My one suggestion is that you don't add -stdlib=libc++ if CXXFLAGS already contains "-stdlib="
Zan Dobersek
Comment 7
2014-01-05 05:07:21 PST
Created
attachment 220396
[details]
Patch
Martin Robinson
Comment 8
2014-01-05 09:58:12 PST
Comment on
attachment 220396
[details]
Patch I'm actually a bit surprised we need the standard library.
Zan Dobersek
Comment 9
2014-01-06 00:52:51 PST
Comment on
attachment 220396
[details]
Patch Clearing flags on attachment: 220396 Committed
r161333
: <
http://trac.webkit.org/changeset/161333
>
Zan Dobersek
Comment 10
2014-01-06 00:52:57 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug