[packages/beignet] actually add the Debian patches

jajcus jajcus at pld-linux.org
Mon Jun 5 19:08:08 CEST 2017


commit 8373b18b0dafa26d9feb9983e8a5ede1714445ef
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Mon Jun 5 19:07:53 2017 +0200

    actually add the Debian patches

 cflags.patch      | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 static_llvm.patch | 37 +++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)
---
diff --git a/cflags.patch b/cflags.patch
new file mode 100644
index 0000000..eeec8ef
--- /dev/null
+++ b/cflags.patch
@@ -0,0 +1,62 @@
+Description: Set compiler flags
+
+Respect CFLAGS,CXXFLAGS,LDFLAGS (security hardening etc.)
+Be verbose
+Disable non-policy-compliant instruction set assumptions (slows the
+OpenCL compiler by ~few%, no effect on OpenCL execution speed)
+
+Author: Simon Richter <sjr at debian.org>,Rebecca Palmer <rebecca_palmer at zoho.com>
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
+ 
+ INCLUDE (FindPkgConfig)
+ 
+-SET(CMAKE_VERBOSE_MAKEFILE "false")
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
+ INCLUDE (GNUInstallDirs OPTIONAL)
+ # support old CMake without GNUInstallDirs
+@@ -73,9 +72,9 @@ ADD_DEFINITIONS(-DGEN7_SAMPLER_CLAMP_BOR
+ 
+ # compiler flag setting
+ if (COMPILER STREQUAL "GCC")
+-  set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -funroll-loops -fstrict-aliasing -msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall -mfpmath=sse -Wcast-align -Wl,-E")
++  set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -funroll-loops -fstrict-aliasing -fPIC -Wall -Wcast-align -Wl,-E")
+ elseif (COMPILER STREQUAL "CLANG")
+-  set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -funroll-loops -fstrict-aliasing -msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall")
++  set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -funroll-loops -fstrict-aliasing -fPIC -Wall")
+ elseif (COMPILER STREQUAL "ICC")
+   set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS}  -wd2928 -Wall -fPIC -fstrict-aliasing -fp-model fast -msse4.1 -Wl,-E")
+ endif ()
+--- a/backend/src/sys/platform.hpp
++++ b/backend/src/sys/platform.hpp
+@@ -41,15 +41,6 @@
+ #define __X86__
+ #endif
+ 
+-/* We require SSE ... */
+-#ifndef __SSE__
+-#define __SSE__
+-#endif
+-
+-/* ... and SSE2 */
+-#ifndef __SSE2__
+-#define __SSE2__
+-#endif
+ 
+ #if defined(_INCLUDED_IMM)
+ // #define __AVX__
+--- a/utests/CMakeLists.txt
++++ b/utests/CMakeLists.txt
+@@ -26,8 +26,8 @@ if (NOT NOT_BUILD_STAND_ALONE_UTEST)
+   # Threads
+   Find_Package(Threads)
+ 
+-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof")
+-  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_CXX_FLAGS}")
++  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_FLAGS} -std=c++0x -Wno-invalid-offsetof -ffloat-store")
++  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_CXX_FLAGS} -ffloat-store") #compiler_{degrees,radians,function_argument2} use equality comparison of floats
+   set (CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DGBE_DEBUG=1")
+   set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
+   set (CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
+
diff --git a/static_llvm.patch b/static_llvm.patch
new file mode 100644
index 0000000..91d6143
--- /dev/null
+++ b/static_llvm.patch
@@ -0,0 +1,37 @@
+Description: Statically link to libllvm
+
+When multiple ICDs are installed, libopencl1 needs to dlopen() them all
+to find out which one works on the available hardware.  If they are
+dynamically linked, this leads to them sharing a libllvm, which has
+enough global state that this is likely to error out.  (This is a known
+LLVM bug, https://bugs.llvm.org/show_bug.cgi?id=22952 , but currently
+has no real fix.)
+
+Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
+Bug: https://bugs.llvm.org/show_bug.cgi?id=30587
+Bug-Debian: https://bugs.debian.org/852746
+
+--- beignet-1.3.0.orig/CMake/FindLLVM.cmake
++++ beignet-1.3.0/CMake/FindLLVM.cmake
+@@ -87,11 +87,19 @@ execute_process(
+   OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ 
++if (LLVM_VERSION_NODOT VERSION_GREATER 38)
++execute_process(
++  COMMAND ${LLVM_CONFIG_EXECUTABLE} --libs --link-static
++  OUTPUT_VARIABLE LLVM_MODULE_LIBS
++  OUTPUT_STRIP_TRAILING_WHITESPACE
++)
++else (LLVM_VERSION_NODOT VERSION_GREATER 38)
+ execute_process(
+   COMMAND ${LLVM_CONFIG_EXECUTABLE} --libs
+   OUTPUT_VARIABLE LLVM_MODULE_LIBS
+   OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
++endif (LLVM_VERSION_NODOT VERSION_GREATER 38)
+ 
+ if (LLVM_VERSION_NODOT VERSION_GREATER 34)
+ execute_process(
+
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/beignet.git/commitdiff/8373b18b0dafa26d9feb9983e8a5ede1714445ef



More information about the pld-cvs-commit mailing list