RESOLVED FIXED 31477
[V8] Fix V8Bindings link error in Linux+GCC 4.4
https://bugs.webkit.org/show_bug.cgi?id=31477
Summary [V8] Fix V8Bindings link error in Linux+GCC 4.4
Jens Alfke
Reported 2009-11-13 09:59:00 PST
Craig Schlenter alerted me that my patch in r50846 (bug 31383) caused a link error building Chromium on Linux with GCC 4.4: undefined reference to `WebCore::AtomicString WebCore::v8StringToWebCoreString<WebCore::AtomicString>(v8::Handle<v8::String>, WebCore::ExternalMode)' He tracked it down to an issue with the compiler not knowing which instantiations of the template to create, since the template body is in a .cpp file, as described here: http://stackoverflow.com/questions/1639797/template-issue-causes-linker-error-c The fix is to explicitly instantiate both the String and AtomicString versions in the .cpp file. This isn't a serious issue because we haven't moved up to GCC 4.4 for Chromium's Linux build yet, but it's a good idea to fix this now. I'm preparing a patch.
Attachments
patch (1.31 KB, patch)
2009-11-13 10:33 PST, Jens Alfke
dglazkov: review+
Jens Alfke
Comment 1 2009-11-13 10:33:24 PST
Created attachment 43168 [details] patch Here's the patch. Waiting to set 'review?' flag till after I make sure it builds on Win/Linux.
Jens Alfke
Comment 2 2009-11-13 12:50:53 PST
Comment on attachment 43168 [details] patch OK, this has passed the trybots, so requesting a review.
Eric Seidel (no email)
Comment 3 2009-11-13 13:13:15 PST
Comment on attachment 43168 [details] patch Wrong mime type on the attachment. :) Tools like "bugzilla-tool post-diff" will take care of all the silly check-boxes and mime types for you if you like.
Eric Seidel (no email)
Comment 4 2009-11-13 13:14:00 PST
This looks sane to me, but I'm really not enough of a c++ expert to comment here.
Dimitri Glazkov (Google)
Comment 5 2009-11-13 13:18:28 PST
Comment on attachment 43168 [details] patch I am not teh expert, but I believe jens! :)
Jens Alfke
Comment 6 2009-11-13 13:27:50 PST
Committed revision 50967.
Note You need to log in before you can comment on or make changes to this bug.