From owner-svn-ports-head@freebsd.org Sun Nov 15 14:36:50 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37999A2F2A4; Sun, 15 Nov 2015 14:36:50 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDB321979; Sun, 15 Nov 2015 14:36:49 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAFEantV077075; Sun, 15 Nov 2015 14:36:49 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAFEamEl077072; Sun, 15 Nov 2015 14:36:48 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201511151436.tAFEamEl077072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Sun, 15 Nov 2015 14:36:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401707 - head/graphics/alembic/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.20 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: Sun, 15 Nov 2015 14:36:50 -0000 Author: danfe Date: Sun Nov 15 14:36:48 2015 New Revision: 401707 URL: https://svnweb.freebsd.org/changeset/ports/401707 Log: Unbreak the build on PowerPC, in a simple way: replace deprecated __sync_* function with corresponding __atomic_* counterpart and link with libatomic against GCC. This should be no-op on Tier-1 architectures (against Clang), since that code branch is guarded by __GNUC__ >= 4 && __GNUC_MINOR__ >= 4. Added: head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_CMakeLists.txt (contents, props changed) head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_StreamManager.cpp (contents, props changed) Added: head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_CMakeLists.txt Sun Nov 15 14:36:48 2015 (r401707) @@ -0,0 +1,9 @@ +--- lib/Alembic/AbcCoreOgawa/CMakeLists.txt.orig 2015-01-15 18:28:49 UTC ++++ lib/Alembic/AbcCoreOgawa/CMakeLists.txt +@@ -100,3 +100,6 @@ IF( NOT ALEMBIC_NO_TESTS ) + ADD_SUBDIRECTORY( Tests ) + ENDIF() + ++IF( CMAKE_COMPILER_IS_GNUCXX ) ++ TARGET_LINK_LIBRARIES( AlembicAbcCoreOgawa atomic ) ++ENDIF() Added: head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_StreamManager.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/alembic/files/patch-lib_Alembic_AbcCoreOgawa_StreamManager.cpp Sun Nov 15 14:36:48 2015 (r401707) @@ -0,0 +1,22 @@ +--- lib/Alembic/AbcCoreOgawa/StreamManager.cpp.orig 2015-01-15 18:28:49 UTC ++++ lib/Alembic/AbcCoreOgawa/StreamManager.cpp +@@ -111,7 +111,8 @@ StreamIDPtr StreamManager::get() + + newVal = oldVal & ~( 1 << (val - 1) ); + } +- while ( !__sync_bool_compare_and_swap( &m_streams, oldVal, newVal ) ); ++ while ( !__atomic_compare_exchange_n( &m_streams, &oldVal, newVal, ++ false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) ); + + return StreamIDPtr( new StreamID( this, ( std::size_t ) val - 1 ) ); + } +@@ -140,7 +141,8 @@ void StreamManager::put( std::size_t iSt + newVal = oldVal | ( 1 << iStreamID ); + + } +- while ( !__sync_bool_compare_and_swap( &m_streams, oldVal, newVal ) ); ++ while ( !__atomic_compare_exchange_n( &m_streams, &oldVal, newVal, ++ false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) ); + } + + #else