[SCM] blender/master: debian/patches/: #0010 added to fix illegal hardware instruction bug

mfv-guest at users.alioth.debian.org mfv-guest at users.alioth.debian.org
Thu Feb 21 14:33:40 UTC 2013


The following commit has been merged in the master branch:
commit 6567e2147d37ea7bca6071a6c7cf17499b81906b
Author: Matteo F. Vescovi <mfv.debian at gmail.com>
Date:   Wed Feb 13 09:10:07 2013 +0100

    debian/patches/: #0010 added to fix illegal hardware instruction bug
    
    Closes: #599680
    Thanks: Johann Klammer for the patch

diff --git a/debian/patches/0010-Fix_illegal_hardware_instruction_due_to_SSE2.patch b/debian/patches/0010-Fix_illegal_hardware_instruction_due_to_SSE2.patch
new file mode 100644
index 0000000..ea767a9
--- /dev/null
+++ b/debian/patches/0010-Fix_illegal_hardware_instruction_due_to_SSE2.patch
@@ -0,0 +1,79 @@
+From: Johann Klammer <klammerj at a1.net>
+Date: Wed, 13 Feb 2013 09:04:08 +0100
+Subject: Fix_illegal_hardware_instruction_due_to_SSE2
+
+This makes sure it builds compatible binaries also on
+machines which have sse/sse2. Fixes the SIGILL bug.
+Checks for DEB_HOST_ARCH_CPU!=i386 before tests are attempted.
+Will try to use SSE/SSE2 on all other architectures.
+Generated Code will still need MMX support to run.
+---
+ build_files/cmake/macros.cmake | 49 +++++++++++++++++++++++-------------------
+ 1 file changed, 27 insertions(+), 22 deletions(-)
+
+diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
+index 7fdd862..9dbebdd 100644
+--- a/build_files/cmake/macros.cmake
++++ b/build_files/cmake/macros.cmake
+@@ -415,34 +415,39 @@ macro(TEST_SSE_SUPPORT
+ 
+ 	set(CMAKE_REQUIRED_FLAGS "${${_sse_flags}} ${${_sse2_flags}}")
+ 
+-	if(NOT DEFINED SUPPORT_SSE_BUILD)
+-		# result cached
+-		check_c_source_runs("
+-			#include <xmmintrin.h>
+-			int main(void) { __m128 v = _mm_setzero_ps(); return 0; }"
+-		SUPPORT_SSE_BUILD)
+-
+-		if(SUPPORT_SSE_BUILD)
+-			message(STATUS "SSE Support: detected.")
+-		else()
+-			message(STATUS "SSE Support: missing.")
++	if(NOT ( $ENV{DEB_HOST_ARCH_CPU} STREQUAL "i386" ) )
++
++		if(NOT DEFINED SUPPORT_SSE_BUILD)
++			# result cached
++			check_c_source_runs("
++				#include <xmmintrin.h>
++				int main(void) { __m128 v = _mm_setzero_ps(); return 0; }"
++			SUPPORT_SSE_BUILD)
++
++			if(SUPPORT_SSE_BUILD)
++				message(STATUS "SSE Support: detected.")
++			else()
++				message(STATUS "SSE Support: missing.")
++			endif()
+ 		endif()
+-	endif()
+ 
+-	if(NOT DEFINED SUPPORT_SSE2_BUILD)
+-		# result cached
+-		check_c_source_runs("
++		if(NOT DEFINED SUPPORT_SSE2_BUILD)
++			# result cached
++			check_c_source_runs("
+ 			#include <emmintrin.h>
+-			int main(void) { __m128d v = _mm_setzero_pd(); return 0; }"
+-		SUPPORT_SSE2_BUILD)
++				int main(void) { __m128d v = _mm_setzero_pd(); return 0; }"
++			SUPPORT_SSE2_BUILD)
+ 
+-		if(SUPPORT_SSE2_BUILD)
+-			message(STATUS "SSE2 Support: detected.")
+-		else()
+-			message(STATUS "SSE2 Support: missing.")
++			if(SUPPORT_SSE2_BUILD)
++				message(STATUS "SSE2 Support: detected.")
++			else()
++				message(STATUS "SSE2 Support: missing.")
++			endif()
+ 		endif()
++	else()
++		message(STATUS "SSE Support: missing.")
++		message(STATUS "SSE2 Support: missing.")
+ 	endif()
+-
+ 	unset(CMAKE_REQUIRED_FLAGS)
+ endmacro()
+ 
diff --git a/debian/patches/series b/debian/patches/series
index cf0d4eb..8101cc4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 0007-do_not_use_version_number_in_system_path.patch
 0008-look_for_droid_ttf_with_fontconfig.patch
 0009-fix_format-security_issue.patch
+0010-Fix_illegal_hardware_instruction_due_to_SSE2.patch

-- 
blender packaging



More information about the pkg-multimedia-commits mailing list