Blob Blame History Raw
diff -up webkitgtk-2.0.4/GNUmakefile.in.libatomic webkitgtk-2.0.4/GNUmakefile.in
--- webkitgtk-2.0.4/GNUmakefile.in.libatomic	2013-07-19 14:12:04.000000000 +0200
+++ webkitgtk-2.0.4/GNUmakefile.in	2013-10-01 13:29:45.078869244 +0200
@@ -20865,6 +20865,7 @@ libWTF_la_CXXFLAGS = \
 	$(libWTF_la_CFLAGS)
 
 libWTF_la_CFLAGS = \
+    -latomic \
 	-fstrict-aliasing \
 	-O3 \
 	$(global_cflags) \
@@ -22244,6 +22245,7 @@ Programs_WebKitPluginProcess_SOURCES = \
 
 Programs_WebKitPluginProcess_LDADD = \
 	-lpthread \
+	-latomic \
 	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
 	WebCoreLayerGtk2.a \
 	$(CAIRO_LIBS) \
diff -up webkitgtk-2.0.4/Source/WebKit2/GNUmakefile.am.libatomic webkitgtk-2.0.4/Source/WebKit2/GNUmakefile.am
diff -up webkitgtk-2.0.4/Source/WTF/GNUmakefile.am.libatomic webkitgtk-2.0.4/Source/WTF/GNUmakefile.am
--- webkitgtk-2.0.4/Source/WTF/GNUmakefile.am.libatomic	2012-07-19 12:02:14.000000000 +0200
+++ webkitgtk-2.0.4/Source/WTF/GNUmakefile.am	2013-10-01 13:26:50.971876621 +0200
@@ -25,6 +25,7 @@ libWTF_la_CXXFLAGS = \
 	$(libWTF_la_CFLAGS)
 
 libWTF_la_CFLAGS = \
+   -latomic \
 	-fstrict-aliasing \
 	-O3 \
 	$(global_cflags) \
diff -up webkitgtk-2.0.4/Source/WTF/wtf/Atomics.h.libatomic webkitgtk-2.0.4/Source/WTF/wtf/Atomics.h
--- webkitgtk-2.0.4/Source/WTF/wtf/Atomics.h.libatomic	2013-07-19 09:03:53.000000000 +0200
+++ webkitgtk-2.0.4/Source/WTF/wtf/Atomics.h	2013-10-01 13:26:50.971876621 +0200
@@ -107,6 +107,17 @@ inline int atomicDecrement(int volatile*
 inline int atomicIncrement(int volatile* addend) { return __atomic_inc(addend) + 1; }
 inline int atomicDecrement(int volatile* addend) { return __atomic_dec(addend) - 1; }
 
+#elif COMPILER(GCC) && (__GNUC__ > 4 || (__GNUC__ == 4 \
+                    && (__GNUC_MINOR__ > 8 || (__GNUC_MINOR__ == 8 \
+                    && (__GNUC_PATCHLEVEL__ > 0 || (__GNUC_PATCHLEVEL__ == 0)))))) \
+                    && CPU(PPC)
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+inline int atomicIncrement(int volatile* addend) { return __atomic_fetch_add(addend, 1, __ATOMIC_ACQ_REL); }
+inline int atomicDecrement(int volatile* addend) { return __atomic_fetch_sub(addend, 1, __ATOMIC_ACQ_REL); }
+
+inline int64_t atomicIncrement(int64_t volatile* addend) { return __atomic_fetch_add(addend, 1, __ATOMIC_ACQ_REL); }
+inline int64_t atomicDecrement(int64_t volatile* addend) { return __atomic_fetch_sub(addend, 1, __ATOMIC_ACQ_REL); }
+
 #elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
 #define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1