Bug 86835
Summary: | Webkit fails to build on sparc64/gcc, missing implementation of atomic{In,De}crement | ||
---|---|---|---|
Product: | WebKit | Reporter: | Landry Breuil <landry> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | CC: | gnome |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Other | ||
OS: | Unspecified |
Landry Breuil
WebkitGtk 1.8.0 built fine on OpenBSD/sparc64/gcc 4.2.1, 1.8.1 started failing with the following :
Source/WebCore/platform/network/DNSResolveQueue.h: In member function 'void WebCore::DNSResolveQueue::decrementRequestCount()':
Source/WebCore/platform/network/DNSResolveQueue.h:49: error: 'atomicDecrement' was not declared in this scope
Source/WebCore/platform/network/DNSResolveQueue.cpp: In member function 'void WebCore::DNSResolveQueue::add(const WTF::String&)':
Source/WebCore/platform/network/DNSResolveQueue.cpp:57: error: 'atomicIncrement' was not declared in this scope
Source/WebCore/platform/network/DNSResolveQueue.cpp:61: error: 'atomicDecrement' was not declared in this scope
Source/WebCore/platform/network/DNSResolveQueue.cpp: In member function 'virtual void WebCore::DNSResolveQueue::fired()':
Source/WebCore/platform/network/DNSResolveQueue.cpp:83: error: 'atomicIncrement' was not declared in this scope
I traced it back to WTF/Atomics.h not providing an implem for atomicIncrement/atomicDecrement on sparc64/gcc.
Providing a simple implementation based on builtin __sync_fetch_and_add() allows me to build WebkitGtk 1.8.1 on sparc64.
See http://www.openbsd.org/cgi-bin/cvsweb/ports/www/webkit/patches/patch-Source_JavaScriptCore_wtf_Atomics_h?rev=1.1
inline int atomicIncrement(int volatile* addend) { return __sync_fetch_and_add(addend, 1) + 1; }
inline int atomicDecrement(int volatile* addend) { return __sync_fetch_and_add(addend, -1) - 1; }
If this can be considered a valid solution i'll provide a patch for trunk.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Landry Breuil
Still apparently needed for webkitgtk 2.0.0, even if code moved to Source/WTF/wtf/Atomics.h
Landry Breuil
Starting with webkit 2.2, i also need to provide int64_t based atomicImplement/Decrement ops..