[SCM] supercollider-sc3-plugins/master: use SSE on x86 only don't test for big-endian when not compiling included STK (forwarded upstream at https://github.com/supercollider/sc3-plugins/pull/73)

hanno-guest at users.alioth.debian.org hanno-guest at users.alioth.debian.org
Thu Feb 25 14:10:31 UTC 2016


The following commit has been merged in the master branch:
commit b674780fc4f4a7738b54594be2e5aba9839bc26d
Author: Hanno Zulla <hanno.zulla at epublica.de>
Date:   Thu Feb 25 15:05:42 2016 +0100

    use SSE on x86 only
    don't test for big-endian when not compiling included STK
    (forwarded upstream at https://github.com/supercollider/sc3-plugins/pull/73)

diff --git a/debian/patches/03-sse-only-on-x86.patch b/debian/patches/03-sse-only-on-x86.patch
new file mode 100644
index 0000000..39e7648
--- /dev/null
+++ b/debian/patches/03-sse-only-on-x86.patch
@@ -0,0 +1,75 @@
+Description: Use SSE flags on x86 CPUs, only
+ Upstream develops on x86 hardware and failed to test for the system's
+ hardware when setting the cpu-specific SSE flags. This adds this test.
+ <URL: https://github.com/supercollider/sc3-plugins/pull/73>
+Forwarded: yes
+Author: Hanno Zulla <kontakt at hanno.de>
+Last-Update: 2016-02-25
+
+Index: supercollider-sc3-plugins/CMakeLists.txt
+===================================================================
+--- supercollider-sc3-plugins.orig/CMakeLists.txt	2016-01-11 09:12:04.580499484 +0100
++++ supercollider-sc3-plugins/CMakeLists.txt	2016-02-25 14:56:04.876478889 +0100
+@@ -53,6 +53,15 @@
+ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+     add_definitions(-fvisibility=hidden)
+ 
++    IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(x86|amd64|i.86)")
++        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}   -msse -msse2")
++        set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -msse -msse2")
++        if(NOT APPLE AND NOT CMAKE_COMPILER_IS_CLANG)
++            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
++            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
++        endif()
++    endif()
++
+ 	if(NATIVE)
+ 		add_definitions(-march=native)
+ 	endif()
+Index: supercollider-sc3-plugins/source/StkInst/CMakeLists.txt
+===================================================================
+--- supercollider-sc3-plugins.orig/source/StkInst/CMakeLists.txt	2016-01-11 09:12:04.892500979 +0100
++++ supercollider-sc3-plugins/source/StkInst/CMakeLists.txt	2016-02-25 14:56:55.635427484 +0100
+@@ -25,6 +25,13 @@
+     include_directories(${STKDIR})
+     include_directories(${STKDIR}/include)
+     include_directories(${STKDIR}/src/include)
++
++    TEST_BIG_ENDIAN(is_big_endian)
++    if(NOT is_big_endian)
++        add_definitions("-D__LITTLE_ENDIAN__")
++    endif()
++
++    add_definitions("-D_STK_DEBUG_")
+ endif()
+ 
+ include_directories(${SC_PATH}/include/plugin_interface)
+@@ -39,23 +46,18 @@
+ endif()
+     
+ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
+-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mstackrealign")
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mstackrealign")
++    IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(x86|amd64|i.86)")
++        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mstackrealign")
++        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mstackrealign")
++    endif()
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+-if(NOT SYSTEM_STK)
+-    add_definitions("-D_STK_DEBUG_")
+-endif()
+-
+-TEST_BIG_ENDIAN(is_big_endian)
+-if(NOT is_big_endian)
+-    add_definitions("-D__LITTLE_ENDIAN__")
+-endif()
+ 
+ add_library(${PROJECT} MODULE ${PROJECT}.cpp ${STKSources})
+ if(SYSTEM_STK)
+     target_link_libraries(${PROJECT} ${STK_LIBRARY})
+ endif()
++
+ if(SUPERNOVA)
+     add_library(${PROJECT}_supernova MODULE ${PROJECT}.cpp ${STKSources})
+     set_property(TARGET ${PROJECT}_supernova APPEND PROPERTY COMPILE_DEFINITIONS  "SUPERNOVA")
diff --git a/debian/patches/series b/debian/patches/series
index 8ba365a..190a20b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01-install-destination-ladspalist.patch
 02-no-local.patch
+03-sse-only-on-x86.patch

-- 
supercollider-sc3-plugins packaging



More information about the pkg-multimedia-commits mailing list