summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-09-07 12:56:14 +0200
committerMarek Szuba <marecki@gentoo.org>2020-09-07 13:09:28 +0200
commitd72bc570d77c3aae6ca74a509311be211000919b (patch)
tree1089e4d5b36647b80651321f6edddb6739f369e2 /dev-util
parentoptfeature.eclass: Remove unnecessary quotes in case statement. (diff)
downloadgentoo-d72bc570d77c3aae6ca74a509311be211000919b.tar.gz
gentoo-d72bc570d77c3aae6ca74a509311be211000919b.tar.bz2
gentoo-d72bc570d77c3aae6ca74a509311be211000919b.zip
dev-util/intel-graphics-compiler: bypass opencl-clang version check
Ebuilds already make sure we have a new-enough version of dev-libs/opencl-clang present, besides we have never even had versions older than 5.0.0 in the tree. No opencl-clang version check in CMake - no need to call readelf - no more issues on USE=-native-symlinks systems. Closes: https://bugs.gentoo.org/739138 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch27
-rw-r--r--dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild2
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch
new file mode 100644
index 000000000000..8996466275c9
--- /dev/null
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.4111-opencl-clang_version.patch
@@ -0,0 +1,27 @@
+--- a/IGC/BiFModule/CMakeLists.txt
++++ b/IGC/BiFModule/CMakeLists.txt
+@@ -160,20 +160,10 @@
+
+ if(UNIX)
+ if(NOT ${CCLANG_BUILD_INTREE_LLVM})
+- # Get common clang library soname
+- get_target_property(CCLANG_LIB_PATH opencl-clang-lib "IMPORTED_LOCATION")
+- execute_process(
+- COMMAND readelf -d ${CCLANG_LIB_PATH}
+- OUTPUT_VARIABLE CCLANG_READELF_CALL)
+- string(REGEX MATCH "\\[${COMMON_CLANG_LIB_FULL_NAME}\\.([0-9](\\.[0-9]*)*[a-zA-Z0-9]*)\\]" CCLANG_SONAME_VERSION "${CCLANG_READELF_CALL}")
+- set(CCLANG_SONAME_VERSION "${CMAKE_MATCH_1}")
+-
+- # Check if common clang library is newer than 5.0.0 version on which we have SPIR-V support
+- if("${CCLANG_SONAME_VERSION}" VERSION_GREATER "5.0.0")
+- set_property(TARGET opencl-clang-lib PROPERTY "IMPORTED_SONAME" "${COMMON_CLANG_LIB_FULL_NAME}.${CCLANG_SONAME_VERSION}")
+- else()
+- message(FATAL_ERROR "[IGC\\BiFModule] : Version ${CCLANG_SONAME_VERSION} of library ${COMMON_CLANG_LIB_FULL_NAME} is below version 5.0.0 (where it's starts support of SPIR-V), please upgrade this library at least to version 5.0.0")
+- endif()
++ # Workaround for https://bugs.gentoo.org/739138 : instead of checking
++ # the version of opencl-clang, have ebuilds set CCLANG_SONAME_VERSION
++ # for us.
++ set_property(TARGET opencl-clang-lib PROPERTY "IMPORTED_SONAME" "${COMMON_CLANG_LIB_FULL_NAME}.${CCLANG_SONAME_VERSION}")
+ endif()
+ if (NOT CCLANG_FROM_SYSTEM)
+ install(FILES $<TARGET_FILE:opencl-clang-lib> DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT igc-opencl)
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild
index 3bdf70d334d3..b5113c4912d6 100644
--- a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.4111.ebuild
@@ -27,6 +27,7 @@ RDEPEND="${COMMON}"
PATCHES=(
"${FILESDIR}"/${PN}-1.0.9-no_Werror.patch
+ "${FILESDIR}"/${PN}-1.0.4111-opencl-clang_version.patch
)
S="${WORKDIR}"/${PN}-igc-${PV}
@@ -45,6 +46,7 @@ multilib_src_configure() {
use debug || append-cppflags -DNDEBUG
local mycmakeargs=(
+ -DCCLANG_SONAME_VERSION=${llvm_slot}
-DCMAKE_LIBRARY_PATH=$(get_llvm_prefix ${llvm_slot})/$(get_libdir)
-DIGC_OPTION__FORCE_SYSTEM_LLVM=ON
-DIGC_PREFERRED_LLVM_VERSION=${llvm_slot}