mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-28 22:55:24 +02:00
65 lines
2.7 KiB
Diff
65 lines
2.7 KiB
Diff
From 79ab63df9a2a0229af581050a59e0fdcdbae2e51 Mon Sep 17 00:00:00 2001
|
|
From: Attila Afra <attila.t.afra@intel.com>
|
|
Date: Tue, 9 Jun 2020 23:26:39 +0300
|
|
Subject: [PATCH] fixed crash on pre-SSE4 CPUs when using some recent compilers
|
|
(e.g. GCC 10)
|
|
|
|
---
|
|
cmake/oidn_dnnl.cmake | 2 +-
|
|
cmake/oidn_platform.cmake | 5 -----
|
|
2 files changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
diff --git cmake/oidn_dnnl.cmake cmake/oidn_dnnl.cmake
|
|
index 42d1cf6..cbfb935 100644
|
|
--- cmake/oidn_dnnl.cmake
|
|
+++ cmake/oidn_dnnl.cmake
|
|
@@ -45,7 +45,7 @@ target_compile_definitions(dnnl_common
|
|
-DDNNL_ENABLE_CONCURRENT_EXEC
|
|
)
|
|
|
|
-set(DNNL_COMPILE_OPTIONS ${OIDN_ISA_FLAGS_SSE41})
|
|
+set(DNNL_COMPILE_OPTIONS "")
|
|
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
# Correct 'jnl' macro/jit issue
|
|
list(APPEND DNNL_COMPILE_OPTIONS "/Qlong-double")
|
|
diff --git cmake/oidn_platform.cmake cmake/oidn_platform.cmake
|
|
index 10b8cae..5256da2 100644
|
|
--- cmake/oidn_platform.cmake
|
|
+++ cmake/oidn_platform.cmake
|
|
@@ -34,7 +34,6 @@ if(MSVC)
|
|
append(OIDN_C_CXX_FLAGS "/wd4244")
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
append(OIDN_C_CXX_FLAGS "/MP")
|
|
- set(OIDN_ISA_FLAGS_SSE41 "-QxSSE4.1")
|
|
# Disable warning: option '/Qstd=c++11' is not valid for C compilations (CMake bug?)
|
|
append(OIDN_C_CXX_FLAGS "/Qwd10370")
|
|
# Disable diagnostic: loop was not vectorized with "simd"
|
|
@@ -48,7 +47,6 @@ if(MSVC)
|
|
# Disable diagnostic: disabling user-directed function packaging (COMDATs)
|
|
append(OIDN_C_CXX_FLAGS "-Qdiag-disable:11031")
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
- set(OIDN_ISA_FLAGS_SSE41 "-msse4.1")
|
|
# Disable warning: cannot vectorize some loops with #pragma omp simd
|
|
append(OIDN_C_CXX_FLAGS "-Wno-pass-failed")
|
|
# Disable warning: function is not needed and will not be emitted
|
|
@@ -60,17 +58,14 @@ elseif(UNIX OR MINGW)
|
|
append(OIDN_C_CXX_FLAGS "-fvisibility=internal")
|
|
append(OIDN_CXX_FLAGS "-fvisibility-inlines-hidden")
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
- set(OIDN_ISA_FLAGS_SSE41 "-msse4.1")
|
|
# Disable warning: cannot vectorize some loops with #pragma omp simd
|
|
append(OIDN_C_CXX_FLAGS "-Wno-pass-failed")
|
|
# Disable warning: function is not needed and will not be emitted
|
|
append(OIDN_C_CXX_FLAGS "-Wno-unneeded-internal-declaration")
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
- set(OIDN_ISA_FLAGS_SSE41 "-msse4.1")
|
|
# Suppress warning on assumptions made regarding overflow (#146)
|
|
append(OIDN_C_CXX_FLAGS "-Wno-strict-overflow")
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
- set(OIDN_ISA_FLAGS_SSE41 "-xSSE4.1")
|
|
# Disable optimizations in debug mode
|
|
append(OIDN_C_CXX_FLAGS_DEBUG "-O0")
|
|
# Workaround for ICC that produces error caused by pragma omp simd collapse(..)
|
|
--
|
|
2.27.0
|
|
|