Date: Sun, 15 Nov 2015 14:36:48 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401707 - head/graphics/alembic/files Message-ID: <201511151436.tAFEamEl077072@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511151436.tAFEamEl077072>