From owner-svn-ports-head@FreeBSD.ORG Fri Sep 6 23:18:54 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B35AAF81; Fri, 6 Sep 2013 23:18:54 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9279C2422; Fri, 6 Sep 2013 23:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86NIsdG065604; Fri, 6 Sep 2013 23:18:54 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86NIsbo065602; Fri, 6 Sep 2013 23:18:54 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201309062318.r86NIsbo065602@svn.freebsd.org> From: Raphael Kubo da Costa Date: Fri, 6 Sep 2013 23:18:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r326562 - in head/devel/qt4-script: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:18:54 -0000 Author: rakuco Date: Fri Sep 6 23:18:53 2013 New Revision: 326562 URL: http://svnweb.freebsd.org/changeset/ports/326562 Log: Import my upstream commit to fix the build with libc++. I was going to get this in with Qt 4.8.5, but this is holding back some exp-runs with libc++. Increment PORTREVISION because the code atomic{Decrement,Increment} has changed. Added: head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__wtf__Threading.h (contents, props changed) Modified: head/devel/qt4-script/Makefile Modified: head/devel/qt4-script/Makefile ============================================================================== --- head/devel/qt4-script/Makefile Fri Sep 6 23:17:34 2013 (r326561) +++ head/devel/qt4-script/Makefile Fri Sep 6 23:18:53 2013 (r326562) @@ -3,6 +3,7 @@ PORTNAME= script DISTVERSION= ${QT4_VERSION} +PORTREVISION= 1 CATEGORIES?= devel PKGNAMEPREFIX= qt4- Added: head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__wtf__Threading.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__wtf__Threading.h Fri Sep 6 23:18:53 2013 (r326562) @@ -0,0 +1,91 @@ +From 0de22e80ac645afc3793419300d6271d95809196 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Tue, 11 Jun 2013 19:25:08 +0300 +Subject: [PATCH] Bring in WebKit revisions 139553 and 139921. + +They are primarily useful for getting rid of some libstdc++-specific +includes which break the build with libc++, and also for simplifying the +code and removing a Darwin-specific code path. + +r139553 by ossy@webkit.org: + Use sync_add_and_fetch instead of gnu_cxx::exchange_and_add + https://bugs.webkit.org/show_bug.cgi?id=106729 + + After r139514 we need atomicIncrement(int64_t volatile*) for all + platform. Now the GCC implementation of atomicIncrement() is based on + gnu_cxx::exchange_and_add, which doesn't support int64_t type, but + sync_add_and_fetch does. + + Reviewed by Benjamin Poulain. + +r139921 by benjamin@webkit.org: + Use GCC's implementation of atomicIncrement/Decrement on Mac + https://bugs.webkit.org/show_bug.cgi?id=106976 + + Reviewed by Filip Pizlo. + + wtf/Atomics.h: GCC and LLVM have builtin for atomic ADD and SUB: + sync_add_and_fetch, sync_sub_and_fetch. + + Using them let the compiler just generate the atomic operations inline + instead of generating a function call to LibC. It also simplify the + code a bit. + +Cherry-picked from qtscript/184fc178f4c753727445694c4830c250f53da588. + +Change-Id: Id785e35944682691725947e0f329668d17ff6903 +Reviewed-by: Thiago Macieira +--- + .../javascriptcore/JavaScriptCore/wtf/Threading.h | 18 ++---------------- + 1 file changed, 2 insertions(+), 16 deletions(-) + +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +index 8b76c0f..b3ea7d2 100644 +--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h ++++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +@@ -71,18 +71,10 @@ + + #if OS(WINDOWS) && !OS(WINCE) + #include +-#elif OS(DARWIN) +-#include + #elif OS(ANDROID) + #include + #elif OS(QNX) + #include +-#elif COMPILER(GCC) && !OS(SYMBIAN) +-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) +-#include +-#else +-#include +-#endif + #endif + + #if USE(PTHREADS) +@@ -230,12 +222,6 @@ inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r + inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast(addend)); } + #endif + +-#elif OS(DARWIN) +-#define WTF_USE_LOCKFREE_THREADSAFESHARED 1 +- +-inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast(addend)); } +-inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast(addend)); } +- + #elif OS(ANDROID) + + inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); } +@@ -250,8 +236,8 @@ inline int atomicDecrement(int volatile* addend) { return (int) atomic_sub_value + #elif COMPILER(GCC) && !CPU(SPARC64) && !OS(SYMBIAN) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc + #define WTF_USE_LOCKFREE_THREADSAFESHARED 1 + +-inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; } +-inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; } ++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); } + + #endif + +-- +1.8.4 +