dev-libs/beignet: fix linking of 1.2.0 against LLVM-3.8
authorMarek Szuba <marecki@gentoo.org>
Mon, 19 Sep 2016 11:59:28 +0000 (13:59 +0200)
committerMarek Szuba <marecki@gentoo.org>
Mon, 19 Sep 2016 12:00:19 +0000 (14:00 +0200)
Without adding -fPIC to compiler flags one the temporary executables invoked at
build time segfaults.

Gentoo-Bug: 593968

Package-Manager: portage-2.3.1

dev-libs/beignet/beignet-1.2.0.ebuild

index 0e6c87bcc164a0b36baa1d246ec470b927c77ada..ac2bb7d1957bf1dfad859003a514c0f69a5c9d2d 100644 (file)
@@ -7,7 +7,7 @@ EAPI=6
 PYTHON_COMPAT=( python2_7 )
 CMAKE_BUILD_TYPE="Release"
 
-inherit python-any-r1 cmake-multilib toolchain-funcs
+inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
 
 DESCRIPTION="OpenCL implementation for Intel GPUs"
 HOMEPAGE="https://01.org/beignet"
@@ -25,12 +25,11 @@ else
        S=${WORKDIR}/Beignet-${PV}-Source
 fi
 
-# Should support <sys-devel/llvm-3.9 but see Bug #593968
 COMMON="${PYTHON_DEPS}
        media-libs/mesa
        sys-devel/clang
        >=sys-devel/llvm-3.5
-       <sys-devel/llvm-3.8
+       <sys-devel/llvm-3.9
        x11-libs/libdrm[video_cards_intel]
        x11-libs/libXext
        x11-libs/libXfixes"
@@ -66,6 +65,9 @@ pkg_setup() {
 }
 
 src_prepare() {
+       # See Bug #593968
+       append-flags -fPIC
+
        cmake-utils_src_prepare
        # We cannot run tests because they require permissions to access
        # the hardware, and building them is very time-consuming.