ports/182134: [patch] devel/sdl20: prefer optimized/inlined atomics on gcc and clang

Jan Beich jbeich at tormail.org
Mon Sep 16 00:10:00 UTC 2013


>Number:         182134
>Category:       ports
>Synopsis:       [patch] devel/sdl20: prefer optimized/inlined atomics on gcc and clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 16 00:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:


>How-To-Repeat:

>Fix:
--- gcc_atomics.diff begins here ---
Index: devel/sdl20/Makefile
===================================================================
--- devel/sdl20/Makefile	(revision 326633)
+++ devel/sdl20/Makefile	(working copy)
@@ -128,9 +128,9 @@ CMAKE_ARGS+=	-DPTHREADS:BOOL=OFF
 .endif
 
 .if ${PORT_OPTIONS:MSDL_ATOMIC}
-CMAKE_ARGS+=	-DSDL_ATOMIC:BOOL=ON
+CMAKE_ARGS+=	-DSDL_ATOMIC:BOOL=ON -DGCC_ATOMICS:BOOL=ON
 .else
-CMAKE_ARGS+=	-DSDL_ATOMIC:BOOL=OFF
+CMAKE_ARGS+=	-DSDL_ATOMIC:BOOL=OFF -DGCC_ATOMICS:BOOL=OFF
 .endif
 
 .if ${PORT_OPTIONS:MSDL_AUDIO}
Index: devel/sdl20/files/patch-CMakeLists.txt
===================================================================
--- devel/sdl20/files/patch-CMakeLists.txt	(revision 0)
+++ devel/sdl20/files/patch-CMakeLists.txt	(working copy)
@@ -0,0 +1,20 @@
+--- CMakeLists.txt~
++++ CMakeLists.txt
+@@ -264,7 +264,7 @@ endif(ASSERTIONS STREQUAL "auto")
+ set(HAVE_ASSERTIONS ${ASSERTIONS})
+ 
+ # Compiler option evaluation
+-if(USE_GCC)
++if(USE_GCC OR USE_CLANG)
+   if(DEPENDENCY_TRACKING)
+     check_c_source_compiles("
+         #if !defined(__GNUC__) || __GNUC__ < 3
+@@ -312,7 +312,7 @@ if(USE_GCC)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
+     endif(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS")
+   endif(HAVE_GCC_WALL)
+-endif(USE_GCC)
++endif(USE_GCC OR USE_CLANG)
+ 
+ if(ASSEMBLY)
+   if(USE_GCC OR USE_CLANG)
--- gcc_atomics.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list