summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2017-12-19 15:35:47 +0100
committerMarek Szuba <marecki@gentoo.org>2017-12-19 15:38:24 +0100
commit61d7e4919bfe1549ede7153efe859fa60ebe9294 (patch)
tree96a5eeaa6b0c71725a5b965cc96728c833ef2bd2 /dev-libs/beignet
parentdev-python/flask-migrate: Fix 2.1.1 tests and deps (diff)
downloadgentoo-61d7e4919bfe1549ede7153efe859fa60ebe9294.tar.gz
gentoo-61d7e4919bfe1549ede7153efe859fa60ebe9294.tar.bz2
gentoo-61d7e4919bfe1549ede7153efe859fa60ebe9294.zip
dev-libs/beignet: fix multilib libdir detection for LLVM-4+
By default Beignet CMake scripts look for LLVM parameters using llvm-config regardless of target architecture. For multilib builds on amd64 against >=sys-devel/llvm-4.0.0 this resulted in the linker being passed the abi_x86_64 libdir in abi_x86_32 mode, causing "file in wrong format" errors and build failures. We now work around this issue by having Beignet's FindLLVM.cmake look for ${CHOST}-llvm-config instead. Hopefully there will be an official upstream fix for this at some point. Closes: https://bugs.gentoo.org/638078 Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'dev-libs/beignet')
-rw-r--r--dev-libs/beignet/beignet-1.3.2.ebuild1
-rw-r--r--dev-libs/beignet/files/beignet-1.3.2_cmake-llvm-config-multilib.patch17
2 files changed, 18 insertions, 0 deletions
diff --git a/dev-libs/beignet/beignet-1.3.2.ebuild b/dev-libs/beignet/beignet-1.3.2.ebuild
index 16ff04d93f83..95092d080dc6 100644
--- a/dev-libs/beignet/beignet-1.3.2.ebuild
+++ b/dev-libs/beignet/beignet-1.3.2.ebuild
@@ -40,6 +40,7 @@ DEPEND="${COMMON}
PATCHES=(
"${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
"${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
"${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
"${FILESDIR}"/llvm-terminfo.patch
diff --git a/dev-libs/beignet/files/beignet-1.3.2_cmake-llvm-config-multilib.patch b/dev-libs/beignet/files/beignet-1.3.2_cmake-llvm-config-multilib.patch
new file mode 100644
index 000000000000..5add6a1bbda8
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.3.2_cmake-llvm-config-multilib.patch
@@ -0,0 +1,17 @@
+--- a/CMake/FindLLVM.cmake
++++ b/CMake/FindLLVM.cmake
+@@ -8,12 +8,12 @@
+ # LLVM_FOUND - True if llvm found.
+ if (LLVM_INSTALL_DIR)
+ find_program(LLVM_CONFIG_EXECUTABLE
+- NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config-39 llvm-config-3.9 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
++ NAMES $ENV{CHOST}-llvm-config
+ DOC "llvm-config executable"
+ PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
+ else (LLVM_INSTALL_DIR)
+ find_program(LLVM_CONFIG_EXECUTABLE
+- NAMES llvm-config-37 llvm-config-3.7 llvm-config-36 llvm-config-3.6 llvm-config-38 llvm-config-3.8 llvm-config-39 llvm-config-3.9 llvm-config llvm-config-35 llvm-config-3.5 llvm-config-34 llvm-config-3.4
++ NAMES $ENV{CHOST}-llvm-config
+ DOC "llvm-config executable")
+ endif (LLVM_INSTALL_DIR)
+