[Webkit-unassigned] [Bug 86835] New: Webkit fails to build on sparc64/gcc, missing implementation of atomic{In, De}crement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 18 02:55:03 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86835

           Summary: Webkit fails to build on sparc64/gcc, missing
                    implementation of atomic{In,De}crement
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: landry at openbsd.org


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list