[packages/gtk-webkit3] - workaround for missing atomic 64bit builtins in gcc on i486 - rel 2

baggins baggins at pld-linux.org
Fri Apr 12 08:34:30 CEST 2013


commit cf17c47d26ea8bd02448b9aaedba96c405e26514
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Apr 12 08:34:00 2013 +0200

    - workaround for missing atomic 64bit builtins in gcc on i486
    - rel 2

 gtk-webkit3.spec    |  4 +++-
 sync-builtins.patch | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/gtk-webkit3.spec b/gtk-webkit3.spec
index 7c759e0..7df2c18 100644
--- a/gtk-webkit3.spec
+++ b/gtk-webkit3.spec
@@ -11,11 +11,12 @@ Summary:	Port of WebKit embeddable web component to GTK+ 3
 Summary(pl.UTF-8):	Port osadzalnego komponentu WWW WebKit do GTK+ 3
 Name:		gtk-webkit3
 Version:	2.0.0
-Release:	1
+Release:	2
 License:	BSD-like
 Group:		X11/Libraries
 Source0:	http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
 # Source0-md5:	fa231ba8c9cd33575b9692614324be21
+Patch0:		sync-builtins.patch
 URL:		http://webkitgtk.org/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	OpenGLES-devel
@@ -109,6 +110,7 @@ Dokumentacja API WebKita.
 
 %prep
 %setup -q -n webkitgtk-%{version}
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/sync-builtins.patch b/sync-builtins.patch
new file mode 100644
index 0000000..c60f1dc
--- /dev/null
+++ b/sync-builtins.patch
@@ -0,0 +1,39 @@
+--- webkitgtk-2.0.0/configure.ac.orig	2013-04-12 08:25:14.896829422 +0200
++++ webkitgtk-2.0.0/configure.ac	2013-04-12 08:27:21.244776999 +0200
+@@ -32,6 +32,18 @@
+ AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
+ m4_include([Source/autotools/SetupAutomake.m4])
+ 
++dnl Check whether the target supports 64-bit __sync_*_compare_and_swap.
++AC_TRY_LINK([#include <stdint.h>],
++    [uint64_t foo, bar;
++     bar = __sync_val_compare_and_swap(&foo, 0, 1);],
++     wtf_cv_have_64bit_sync_builtins=yes,
++     wtf_cv_have_64bit_sync_builtins=no)
++
++if test $wtf_cv_have_64bit_sync_builtins = yes; then
++    AC_DEFINE(HAVE_64BIT_SYNC_BUILTINS, 1,
++              [Define to 1 if the target supports 64-bit __sync_*_compare_and_swap])
++fi
++
+ ######################################################################################
+ # Processing of configuration files
+ ######################################################################################
+--- webkitgtk-2.0.0/Source/WTF/wtf/Atomics.h~	2013-04-12 08:05:55.951740895 +0200
++++ webkitgtk-2.0.0/Source/WTF/wtf/Atomics.h	2013-04-12 08:22:46.701992338 +0200
+@@ -113,8 +113,15 @@
+ inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
+ inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
+ 
++#ifdef HAVE_64BIT_SYNC_BUILTINS
+ inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_add_and_fetch(addend, 1); }
+ inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
++#else
++static pthread_mutex_t global_wtf_lock = PTHREAD_MUTEX_INITIALIZER;
++
++inline int64_t atomicIncrement(int64_t volatile* addend) { pthread_mutex_lock(&global_wtf_lock); addend++; pthread_mutex_unlock(&global_wtf_lock); return addend; }
++inline int64_t atomicDecrement(int64_t volatile* addend) { pthread_mutex_lock(&global_wtf_lock); addend--; pthread_mutex_unlock(&global_wtf_lock); return addend; }
++#endif
+ 
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtk-webkit3.git/commitdiff/cf17c47d26ea8bd02448b9aaedba96c405e26514



More information about the pld-cvs-commit mailing list