* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2016-10-11 0:56 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2016-10-11 0:56 UTC (permalink / raw
To: gentoo-commits
commit: 45383ff8ce6e52da70b4e5d0c604f4dfbd6eb4e9
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 00:55:33 2016 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 00:56:26 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45383ff8
dev-libs/beignet: support x11-libs/libdrm-2.4.71
This backports the upstream patch which made it to Git earlier on today to
1.2.0. This allows Beignet to link against both stable libdrm-2.4.70 and
unstable libdrm-2.4.71; I haven't tested earlier versions so the ebuild now
requires >=2.4.70.
Package-Manager: portage-2.3.1
dev-libs/beignet/beignet-1.2.0-r1.ebuild | 101 +++++++++++++++++++++
.../beignet-1.2.0-drm_intel_get_pooled_eu.patch | 23 +++++
2 files changed, 124 insertions(+)
diff --git a/dev-libs/beignet/beignet-1.2.0-r1.ebuild b/dev-libs/beignet/beignet-1.2.0-r1.ebuild
new file mode 100644
index 00000000..67c4cb1
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.2.0-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.freedesktop.org/beignet"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+ S=${WORKDIR}/Beignet-${PV}-Source
+fi
+
+COMMON="${PYTHON_DEPS}
+ media-libs/mesa
+ sys-devel/clang
+ >=sys-devel/llvm-3.5
+ <sys-devel/llvm-3.9
+ >=x11-libs/libdrm-2.4.70[video_cards_intel]
+ x11-libs/libXext
+ x11-libs/libXfixes"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${P}_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+ "${FILESDIR}"/${P}-drm_intel_get_pooled_eu.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
+ eerror "Compilation with gcc older than 4.6 is not supported"
+ die "Too old gcc found."
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ python_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.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
diff --git a/dev-libs/beignet/files/beignet-1.2.0-drm_intel_get_pooled_eu.patch b/dev-libs/beignet/files/beignet-1.2.0-drm_intel_get_pooled_eu.patch
new file mode 100644
index 00000000..9ffaee0
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.2.0-drm_intel_get_pooled_eu.patch
@@ -0,0 +1,23 @@
+diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
+index 5f4afda..cf8f829 100644
+--- a/src/intel/intel_driver.c
++++ b/src/intel/intel_driver.c
+@@ -958,14 +958,14 @@ intel_update_device_info(cl_device_id device)
+
+ #ifdef HAS_POOLED_EU
+ /* BXT pooled eu, 3*6 to 2*9, like sub slice count is 2 */
+- unsigned int has_pooled_eu = 0;
+- if(!drm_intel_get_pooled_eu(driver->fd, &has_pooled_eu) && has_pooled_eu)
++ int has_pooled_eu;
++ if((has_pooled_eu = drm_intel_get_pooled_eu(driver->fd)) > 0)
+ device->sub_slice_count = 2;
+
+ #ifdef HAS_MIN_EU_IN_POOL
+- unsigned int min_eu;
++ int min_eu;
+ /* for fused down 2x6 devices, beignet don't support. */
+- if (has_pooled_eu && !drm_intel_get_min_eu_in_pool(driver->fd, &min_eu)) {
++ if (has_pooled_eu > 0 && (min_eu = drm_intel_get_min_eu_in_pool(driver->fd)) > 0) {
+ assert(min_eu == 9); //don't support fuse down device.
+ }
+ #endif //HAS_MIN_EU_IN_POOL
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2016-11-28 13:57 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2016-11-28 13:57 UTC (permalink / raw
To: gentoo-commits
commit: 3677ef1db84606d689bea66d9212ed2cd3346d62
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 13:55:34 2016 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 13:57:46 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3677ef1d
dev-libs/beignet: fix detection of OCL ICD and installation of ICD files
In the past, Beignet CMake scripts would automatically enable its compatibility
with the OCL ICD Loader depending on whether dev-libs/ocl-icd was found in the
system or not. Patch the scripts so that ocl-icd is only searched for if an
appropriate option is set, and define a local use flag which controls the value
of this option (and of course the dependency on dev-libs/ocl-icd). Nb. the
patch has been submitted upstream.
Moreover, given we always install Beignet ICD files (they are needed by
eselect-opencl) do not install another copy when OCL ICD Loader has been
enabled.
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=599512
Package-Manager: portage-2.3.2
dev-libs/beignet/beignet-1.2.1-r1.ebuild | 103 +++++++++++++++++++++
.../beignet-1.2.1-oclicd_optional_gentoo.patch | 23 +++++
dev-libs/beignet/metadata.xml | 4 +
3 files changed, 130 insertions(+)
diff --git a/dev-libs/beignet/beignet-1.2.1-r1.ebuild b/dev-libs/beignet/beignet-1.2.1-r1.ebuild
new file mode 100644
index 00000000..3501b10
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.2.1-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="ocl-icd"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.freedesktop.org/beignet"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+ S=${WORKDIR}/Beignet-${PV}-Source
+fi
+
+COMMON="${PYTHON_DEPS}
+ media-libs/mesa
+ sys-devel/clang
+ >=sys-devel/llvm-3.5
+ >=x11-libs/libdrm-2.4.70[video_cards_intel]
+ x11-libs/libXext
+ x11-libs/libXfixes"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ ocl-icd? ( dev-libs/ocl-icd )
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${P}-oclicd_optional_gentoo.patch
+ "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
+ eerror "Compilation with gcc older than 4.6 is not supported"
+ die "Too old gcc found."
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ python_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.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
+ -DOCLICD_COMPAT=$(usex ocl-icd)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
diff --git a/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch b/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch
new file mode 100644
index 00000000..89fed33
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.2.1-oclicd_optional_gentoo.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -223,17 +223,15 @@
+ # MESSAGE(STATUS "Looking for mesa source code - not found, cl_khr_gl_sharing will be disabled.")
+ #ENDIF(MESA_SOURCE_FOUND)
+
++OPTION(OCLICD_COMPAT "OCL ICD compatibility mode" ON)
++IF(OCLICD_COMPAT)
+ Find_Package(OCLIcd)
+ IF(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - found")
+- configure_file (
+- "intel-beignet.icd.in"
+- "${ICD_FILE_NAME}"
+- )
+- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors)
+ ELSE(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - not found")
+ ENDIF(OCLIcd_FOUND)
++ENDIF(OCLICD_COMPAT)
+
+ Find_Package(PythonInterp)
+
diff --git a/dev-libs/beignet/metadata.xml b/dev-libs/beignet/metadata.xml
index 3e5026e..27418e8 100644
--- a/dev-libs/beignet/metadata.xml
+++ b/dev-libs/beignet/metadata.xml
@@ -5,4 +5,8 @@
<email>marecki@gentoo.org</email>
<name>Marek Szuba</name>
</maintainer>
+ <use>
+ <flag name="ocl-icd">Enable compatibility with the
+ <pkg>dev-libs/ocl-icd</pkg> OpenCL ICD loader</flag>
+ </use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2017-06-14 8:09 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2017-06-14 8:09 UTC (permalink / raw
To: gentoo-commits
commit: 364c62714143099e12673aea2785c2648ea5dd00
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 14 08:08:15 2017 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Jun 14 08:09:54 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=364c6271
dev-libs/beignet: add live ebuild
Closes: 4918
Package-Manager: Portage-2.3.5, Repoman-2.3.1
dev-libs/beignet/beignet-9999.ebuild | 103 +++++++++++++++++++++
.../files/beignet-1.4.0_no-debian-multiarch.patch | 21 +++++
2 files changed, 124 insertions(+)
diff --git a/dev-libs/beignet/beignet-9999.ebuild b/dev-libs/beignet/beignet-9999.ebuild
new file mode 100644
index 00000000000..fee1267ce37
--- /dev/null
+++ b/dev-libs/beignet/beignet-9999.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="ocl-icd ocl20"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://anongit.freedesktop.org/beignet"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+ S=${WORKDIR}/Beignet-${PV}-Source
+fi
+
+COMMON="media-libs/mesa
+ sys-devel/clang:0=
+ >=sys-devel/llvm-3.6:0=
+ ocl20? ( >=sys-devel/llvm-3.9:0= )
+ >=x11-libs/libdrm-2.4.70[video_cards_intel]
+ x11-libs/libXext
+ x11-libs/libXfixes"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ ocl-icd? ( dev-libs/ocl-icd )
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0_no-debian-multiarch.patch
+ "${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
+ "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
+ eerror "Compilation with gcc older than 4.6 is not supported"
+ die "Too old gcc found."
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ python_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.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
+ -DOCLICD_COMPAT=$(usex ocl-icd)
+ -DENABLE_OPENCL_20=$(usex ocl20)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
diff --git a/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch b/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch
new file mode 100644
index 00000000000..983ba61ff38
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch
@@ -0,0 +1,21 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,15 +33,9 @@
+
+ SET(CMAKE_VERBOSE_MAKEFILE "false")
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
+-INCLUDE (GNUInstallDirs OPTIONAL)
+-# support old CMake without GNUInstallDirs
+-if (NOT CMAKE_INSTALL_FULL_LIBDIR)
+- set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
+- set (CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
+- set (BEIGNET_LIBRARY_ARCHITECTURE "")
+-else (NOT CMAKE_INSTALL_FULL_LIBDIR)
+- set (BEIGNET_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}")
+-endif (NOT CMAKE_INSTALL_FULL_LIBDIR)
++set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
++set (CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
++set (BEIGNET_LIBRARY_ARCHITECTURE "")
+
+ if (NOT LIB_INSTALL_DIR)
+ set (LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2017-10-17 13:08 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2017-10-17 13:08 UTC (permalink / raw
To: gentoo-commits
commit: 0f242087271440a25e7404806e602393f664b2a5
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 17 13:07:38 2017 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 13:08:27 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f242087
dev-libs/beignet: make the live ebuild compile again
Package-Manager: Portage-2.3.8, Repoman-2.3.3
dev-libs/beignet/beignet-9999.ebuild | 2 +-
.../beignet-1.4.0-oclicd_no_upstream_icdfile.patch | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dev-libs/beignet/beignet-9999.ebuild b/dev-libs/beignet/beignet-9999.ebuild
index 89862c1fc51..d25a0abde8c 100644
--- a/dev-libs/beignet/beignet-9999.ebuild
+++ b/dev-libs/beignet/beignet-9999.ebuild
@@ -40,7 +40,7 @@ DEPEND="${COMMON}
PATCHES=(
"${FILESDIR}"/${PN}-1.4.0_no-debian-multiarch.patch
- "${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
+ "${FILESDIR}"/${PN}-1.4.0-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.4.0-oclicd_no_upstream_icdfile.patch b/dev-libs/beignet/files/beignet-1.4.0-oclicd_no_upstream_icdfile.patch
new file mode 100644
index 00000000000..ddffcfc8aff
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.4.0-oclicd_no_upstream_icdfile.patch
@@ -0,0 +1,17 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -214,14 +214,6 @@
+ Find_Package(OCLIcd)
+ IF(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - found")
+- configure_file (
+- "intel-beignet.icd.in"
+- "${ICD_FILE_NAME}"
+- )
+- IF(NOT OCL_ICD_INSTALL_PREFIX)
+- set(OCL_ICD_INSTALL_PREFIX "/etc/OpenCL/vendors")
+- ENDIF(NOT OCL_ICD_INSTALL_PREFIX)
+- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${OCL_ICD_INSTALL_PREFIX})
+ ELSE(OCLIcd_FOUND)
+ MESSAGE(STATUS "Looking for OCL ICD header file - not found")
+ MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2017-12-19 14:38 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2017-12-19 14:38 UTC (permalink / raw
To: gentoo-commits
commit: 61d7e4919bfe1549ede7153efe859fa60ebe9294
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 19 14:35:47 2017 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Dec 19 14:38:24 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61d7e491
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
dev-libs/beignet/beignet-1.3.2.ebuild | 1 +
.../beignet-1.3.2_cmake-llvm-config-multilib.patch | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/dev-libs/beignet/beignet-1.3.2.ebuild b/dev-libs/beignet/beignet-1.3.2.ebuild
index 16ff04d93f8..95092d080dc 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 00000000000..5add6a1bbda
--- /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)
+
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2018-08-31 13:27 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2018-08-31 13:27 UTC (permalink / raw
To: gentoo-commits
commit: 2517438cae9831332178378078fc273cb8ffb466
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 31 13:27:16 2018 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Aug 31 13:27:16 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2517438c
dev-libs/beignet: disable optimisations broken on some platforms
Certain optimisation introduced in 1.3.2 is now known not to work
correctly on Skylake and Haswell systems. Upstream has been notified but
has yet to respond.
Upstream-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102137
Closes: https://bugs.gentoo.org/662760
Package-Manager: Portage-2.3.40, Repoman-2.3.9
dev-libs/beignet/beignet-1.3.2-r2.ebuild | 107 +++++++++++++++++++++
...eignet-1.3.2_disable-doNegAddOptimization.patch | 66 +++++++++++++
2 files changed, 173 insertions(+)
diff --git a/dev-libs/beignet/beignet-1.3.2-r2.ebuild b/dev-libs/beignet/beignet-1.3.2-r2.ebuild
new file mode 100644
index 00000000000..bc69b887c3d
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.3.2-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic llvm toolchain-funcs
+
+DESCRIPTION="OpenCL implementation for Intel GPUs"
+HOMEPAGE="https://01.org/beignet"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="ocl-icd ocl20"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.freedesktop.org/git/beignet.git"
+ KEYWORDS=""
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+ S=${WORKDIR}/Beignet-${PV}-Source
+fi
+
+COMMON="media-libs/mesa[${MULTILIB_USEDEP}]
+ <sys-devel/clang-6.0.9999:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes[${MULTILIB_USEDEP}]"
+RDEPEND="${COMMON}
+ app-eselect/eselect-opencl"
+DEPEND="${COMMON}
+ ${PYTHON_DEPS}
+ ocl-icd? ( dev-libs/ocl-icd )
+ virtual/pkgconfig"
+
+LLVM_MAX_SLOT=6
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${PN}-1.3.2_disable-doNegAddOptimization.patch
+ "${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
+ "${FILESDIR}"/${PN}-1.3.2_llvm6.patch
+ "${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
+ "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
+ eerror "Compilation with gcc older than 4.6 is not supported"
+ die "Too old gcc found."
+ fi
+ fi
+ fi
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python_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.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}${VENDOR_DIR}"
+ -DOCLICD_COMPAT=$(usex ocl-icd)
+ $(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${EPREFIX}${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
diff --git a/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch b/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch
new file mode 100644
index 00000000000..ae399b17f05
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch
@@ -0,0 +1,66 @@
+--- b/backend/src/backend/gen_insn_selection_optimize.cpp
++++ a/backend/src/backend/gen_insn_selection_optimize.cpp
+@@ -74,7 +74,8 @@ namespace gbe
+ const GenRegister& replacement) :
+ insn(insn), intermedia(intermedia), replacement(replacement)
+ {
+- assert(insn.opcode == SEL_OP_MOV || insn.opcode == SEL_OP_ADD);
++ assert(insn.opcode == SEL_OP_MOV);
++ assert(&(insn.src(0)) == &replacement);
+ assert(&(insn.dst(0)) == &intermedia);
+ this->elements = CalculateElements(intermedia, insn.state.execWidth);
+ replacementOverwritten = false;
+@@ -101,7 +102,6 @@ namespace gbe
+ void doReplacement(ReplaceInfo* info);
+ bool CanBeReplaced(const ReplaceInfo* info, const SelectionInstruction& insn, const GenRegister& var);
+ void cleanReplaceInfoMap();
+- void doNegAddOptimization(SelectionInstruction &insn);
+
+ SelectionBlock &bb;
+ const ir::Liveness::LiveOut& liveout;
+@@ -159,13 +159,8 @@ namespace gbe
+
+ void SelBasicBlockOptimizer::addToReplaceInfoMap(SelectionInstruction& insn)
+ {
+- assert(insn.opcode == SEL_OP_MOV || insn.opcode == SEL_OP_ADD);
+- GenRegister &src = insn.src(0);
+- if (insn.opcode == SEL_OP_ADD) {
+- if (src.file == GEN_IMMEDIATE_VALUE)
+- src = insn.src(1);
+- }
+-
++ assert(insn.opcode == SEL_OP_MOV);
++ const GenRegister& src = insn.src(0);
+ const GenRegister& dst = insn.dst(0);
+ if (src.type != dst.type || src.file != dst.file)
+ return;
+@@ -254,29 +249,10 @@ namespace gbe
+
+ if (insn.opcode == SEL_OP_MOV)
+ addToReplaceInfoMap(insn);
+-
+- doNegAddOptimization(insn);
+ }
+ cleanReplaceInfoMap();
+ }
+
+- /* LLVM transform Mad(a, -b, c) to
+- Add b, -b, 0
+- Mad val, a, b, c
+- for Gen support negtive modifier, mad(a, -b, c) is native suppoted.
+- Also it can be used for the same like instruction sequence.
+- Do it just like a: mov b, -b, so it is a Mov operation like LocalCopyPropagation
+- */
+- void SelBasicBlockOptimizer::doNegAddOptimization(SelectionInstruction &insn) {
+- if (insn.opcode == SEL_OP_ADD) {
+- GenRegister src0 = insn.src(0);
+- GenRegister src1 = insn.src(1);
+- if ((src0.negation && src1.file == GEN_IMMEDIATE_VALUE && src1.value.f == 0.0f) ||
+- (src1.negation && src0.file == GEN_IMMEDIATE_VALUE && src0.value.f == 0.0f))
+- addToReplaceInfoMap(insn);
+- }
+- }
+-
+ void SelBasicBlockOptimizer::run()
+ {
+ for (size_t i = 0; i < MaxTries; ++i) {
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2019-05-24 14:20 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2019-05-24 14:20 UTC (permalink / raw
To: gentoo-commits
commit: 09d3a7a7d6c604d5a14f8cf98482c18228618e09
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 11:16:31 2019 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri May 24 14:20:26 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09d3a7a7
dev-libs/beignet: remove live ebuild
There haven't been any commits to the Beignet Git repository since July
2018, and what is there right now causes LuxMark to segfault almost
immediately.
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
dev-libs/beignet/beignet-9999.ebuild | 102 ---------------------
.../beignet-1.4.0-oclicd_no_upstream_icdfile.patch | 17 ----
.../files/beignet-1.4.0_no-debian-multiarch.patch | 21 -----
3 files changed, 140 deletions(-)
diff --git a/dev-libs/beignet/beignet-9999.ebuild b/dev-libs/beignet/beignet-9999.ebuild
deleted file mode 100644
index 735edfd2e51..00000000000
--- a/dev-libs/beignet/beignet-9999.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python{2_7,3_5,3_6} )
-CMAKE_BUILD_TYPE="Release"
-
-inherit python-any-r1 cmake-multilib flag-o-matic toolchain-funcs
-
-DESCRIPTION="OpenCL implementation for Intel GPUs"
-HOMEPAGE="https://01.org/beignet https://gitlab.freedesktop.org/beignet/beignet"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-IUSE="ocl-icd ocl20"
-
-if [[ "${PV}" == "9999" ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://gitlab.freedesktop.org/beignet/beignet.git"
- KEYWORDS=""
-else
- KEYWORDS="~amd64"
- SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
- S=${WORKDIR}/Beignet-${PV}-Source
-fi
-
-COMMON="media-libs/mesa
- sys-devel/clang:=
- sys-devel/llvm:=
- >=x11-libs/libdrm-2.4.70[video_cards_intel]
- x11-libs/libXext
- x11-libs/libXfixes"
-RDEPEND="${COMMON}
- app-eselect/eselect-opencl"
-DEPEND="${COMMON}
- ${PYTHON_DEPS}
- ocl-icd? ( dev-libs/ocl-icd )
- virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.4.0_no-debian-multiarch.patch
- "${FILESDIR}"/${PN}-1.4.0-oclicd_no_upstream_icdfile.patch
- "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
- "${FILESDIR}"/llvm-terminfo.patch
-)
-
-DOCS=(
- docs/.
-)
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != "binary" ]]; then
- if tc-is-gcc; then
- if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 6 ]]; then
- eerror "Compilation with gcc older than 4.6 is not supported"
- die "Too old gcc found."
- fi
- fi
- fi
-}
-
-pkg_setup() {
- python_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.
- cmake_comment_add_subdirectory utests
-}
-
-multilib_src_configure() {
- VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${VENDOR_DIR}"
- -DOCLICD_COMPAT=$(usex ocl-icd)
- $(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
- )
-
- cmake-utils_src_configure
-}
-
-multilib_src_install() {
- VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
-
- cmake-utils_src_install
-
- insinto /etc/OpenCL/vendors/
- echo "${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
- doins "${PN}-${ABI}.icd"
-
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
-}
diff --git a/dev-libs/beignet/files/beignet-1.4.0-oclicd_no_upstream_icdfile.patch b/dev-libs/beignet/files/beignet-1.4.0-oclicd_no_upstream_icdfile.patch
deleted file mode 100644
index ddffcfc8aff..00000000000
--- a/dev-libs/beignet/files/beignet-1.4.0-oclicd_no_upstream_icdfile.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -214,14 +214,6 @@
- Find_Package(OCLIcd)
- IF(OCLIcd_FOUND)
- MESSAGE(STATUS "Looking for OCL ICD header file - found")
-- configure_file (
-- "intel-beignet.icd.in"
-- "${ICD_FILE_NAME}"
-- )
-- IF(NOT OCL_ICD_INSTALL_PREFIX)
-- set(OCL_ICD_INSTALL_PREFIX "/etc/OpenCL/vendors")
-- ENDIF(NOT OCL_ICD_INSTALL_PREFIX)
-- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${OCL_ICD_INSTALL_PREFIX})
- ELSE(OCLIcd_FOUND)
- MESSAGE(STATUS "Looking for OCL ICD header file - not found")
- MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
diff --git a/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch b/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch
deleted file mode 100644
index 983ba61ff38..00000000000
--- a/dev-libs/beignet/files/beignet-1.4.0_no-debian-multiarch.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -33,15 +33,9 @@
-
- SET(CMAKE_VERBOSE_MAKEFILE "false")
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
--INCLUDE (GNUInstallDirs OPTIONAL)
--# support old CMake without GNUInstallDirs
--if (NOT CMAKE_INSTALL_FULL_LIBDIR)
-- set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
-- set (CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
-- set (BEIGNET_LIBRARY_ARCHITECTURE "")
--else (NOT CMAKE_INSTALL_FULL_LIBDIR)
-- set (BEIGNET_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}")
--endif (NOT CMAKE_INSTALL_FULL_LIBDIR)
-+set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
-+set (CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
-+set (BEIGNET_LIBRARY_ARCHITECTURE "")
-
- if (NOT LIB_INSTALL_DIR)
- set (LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2019-05-24 14:20 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2019-05-24 14:20 UTC (permalink / raw
To: gentoo-commits
commit: 74f59b17f771af5dbc926bf408629d871b2b1f23
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 14:14:52 2019 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri May 24 14:20:29 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f59b17
dev-libs/beignet: enable LLVM7 support, switch to EAPI-7
LLVM7 support is provided by the backported upstream commit
e1b2419a0008e38ef2d9d255d9e9c74e9fba084b . It is described as
preliminary but the commit description elaborates this is simply because
LLVM7 was not released at the time. Fortunately it seems there have been
no breaking changes since the snapshot against which upstream tested
this and everything seems to be in order, in both 1.3 and 2.0 mode.
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
dev-libs/beignet/beignet-1.3.2-r3.ebuild | 104 +++++++++++++++++++
dev-libs/beignet/files/beignet-1.3.2_llvm7.patch | 124 +++++++++++++++++++++++
2 files changed, 228 insertions(+)
diff --git a/dev-libs/beignet/beignet-1.3.2-r3.ebuild b/dev-libs/beignet/beignet-1.3.2-r3.ebuild
new file mode 100644
index 00000000000..15e6c37a560
--- /dev/null
+++ b/dev-libs/beignet/beignet-1.3.2-r3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_5,3_6} )
+CMAKE_BUILD_TYPE="Release"
+
+inherit python-any-r1 cmake-multilib flag-o-matic llvm
+
+DESCRIPTION="OpenCL implementation for Intel Sandy Bridge, Ivy Bridge and Haswell GPUs"
+HOMEPAGE="https://01.org/beignet https://gitlab.freedesktop.org/beignet/beignet"
+SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="ocl-icd ocl20"
+
+BDEPEND="${PYTHON_DEPS}
+ virtual/pkgconfig"
+COMMON="app-eselect/eselect-opencl
+ media-libs/mesa[${MULTILIB_USEDEP}]
+ <sys-devel/clang-7.0.9999:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes[${MULTILIB_USEDEP}]
+ ocl-icd? ( dev-libs/ocl-icd )"
+RDEPEND="${COMMON}"
+DEPEND="${COMMON}"
+
+LLVM_MAX_SLOT=7
+
+PATCHES=(
+ "${FILESDIR}"/no-debian-multiarch.patch
+ "${FILESDIR}"/${PN}-1.3.2_disable-doNegAddOptimization.patch
+ "${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
+ "${FILESDIR}"/${PN}-1.3.2_llvm6.patch
+ "${FILESDIR}"/${PN}-1.3.2_llvm7.patch
+ "${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
+ "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
+ "${FILESDIR}"/llvm-terminfo.patch
+)
+
+DOCS=(
+ docs/.
+)
+
+S="${WORKDIR}"/Beignet-${PV}-Source
+
+pkg_setup() {
+ llvm_pkg_setup
+ python_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.
+ cmake_comment_add_subdirectory utests
+}
+
+multilib_src_configure() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}${VENDOR_DIR}"
+ -DOCLICD_COMPAT=$(usex ocl-icd)
+ $(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
+
+ cmake-utils_src_install
+
+ insinto /etc/OpenCL/vendors/
+ echo "${EPREFIX}${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
+ doins "${PN}-${ABI}.icd"
+
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
+ dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
+}
+
+pkg_postinst() {
+ elog ""
+ elog "Please note that for Skylake and newer architectures, Beignet has been deprecated upstream in favour of dev-libs/intel-neo."
+ elog "It remains the recommended solution for Sandy Bridge, Ivy Bridge and Haswell."
+ elog ""
+
+ if use ocl-icd; then
+ "${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd
+ else
+ "${ROOT}"/usr/bin/eselect opencl set --use-old beignet
+ fi
+}
diff --git a/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch b/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch
new file mode 100644
index 00000000000..8990f0f0e48
--- /dev/null
+++ b/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch
@@ -0,0 +1,124 @@
+commit e1b2419a0008e38ef2d9d255d9e9c74e9fba084b
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Date: Sat Jul 21 20:05:54 2018 +0100
+
+ Add preliminary LLVM 7 support
+
+ This is preliminary because LLVM 7 has not been released yet:
+ it was tested with the snapshot from Debian experimental (svn336894).
+
+ 1.Change linking order, as clangCodeGen now links to clangFrontend
+ 2.Pass references not pointers to WriteBitcodeToFile and CloneModule
+ 3.Add the headers that LoopSimplifyID, LCSSAID and
+ some create*Pass have moved to
+ 4.Define our DEBUG whether or not we just undefined LLVM's
+ (theirs is now LLVM_DEBUG, but we never actually use it)
+
+ Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+ Reviewed-by: Yang Rong <rong.r.yang@intel.com>
+
+diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
+index 5457f248..f882589d 100644
+--- a/CMake/FindLLVM.cmake
++++ b/CMake/FindLLVM.cmake
+@@ -113,10 +113,10 @@ macro(add_one_lib name)
+ endmacro()
+
+ #Assume clang lib path same as llvm lib path
++add_one_lib("clangCodeGen")
+ add_one_lib("clangFrontend")
+ add_one_lib("clangSerialization")
+ add_one_lib("clangDriver")
+-add_one_lib("clangCodeGen")
+ add_one_lib("clangSema")
+ add_one_lib("clangStaticAnalyzerFrontend")
+ add_one_lib("clangStaticAnalyzerCheckers")
+diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
+index 274c99c7..41592349 100644
+--- a/backend/src/backend/gen_program.cpp
++++ b/backend/src/backend/gen_program.cpp
+@@ -454,7 +454,11 @@ namespace gbe {
+ #ifdef GBE_COMPILER_AVAILABLE
+ std::string str;
+ llvm::raw_string_ostream OS(str);
++#if LLVM_VERSION_MAJOR >= 7
++ llvm::WriteBitcodeToFile(*((llvm::Module*)prog->module), OS);
++#else
+ llvm::WriteBitcodeToFile((llvm::Module*)prog->module, OS);
++#endif
+ std::string& bin_str = OS.str();
+ int llsz = bin_str.size();
+ *binary = (char *)malloc(sizeof(char) * (llsz+1) );
+@@ -545,7 +549,11 @@ namespace gbe {
+ &modRef);
+ src = llvm::unwrap(modRef);
+ }
++#if LLVM_VERSION_MAJOR >= 7
++ llvm::Module* clone = llvm::CloneModule(*src).release();
++#else
+ llvm::Module* clone = llvm::CloneModule(src).release();
++#endif
+ if (LLVMLinkModules2(wrap(dst), wrap(clone))) {
+ #elif LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 37
+ if (LLVMLinkModules(wrap(dst), wrap(src), LLVMLinkerPreserveSource_Removed, &errMsg)) {
+diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
+index c37c5951..b36f7b4a 100644
+--- a/backend/src/backend/program.cpp
++++ b/backend/src/backend/program.cpp
+@@ -794,7 +794,11 @@ namespace gbe {
+ llvm::raw_fd_ostream ostream (dumpSPIRBinaryName.c_str(),
+ err, llvm::sys::fs::F_None);
+ if (!err)
++#if LLVM_VERSION_MAJOR<7
+ llvm::WriteBitcodeToFile(*out_module, ostream);
++#else
++ llvm::WriteBitcodeToFile(**out_module, ostream);
++#endif
+ }
+ #endif
+ return true;
+diff --git a/backend/src/llvm/ExpandLargeIntegers.cpp b/backend/src/llvm/ExpandLargeIntegers.cpp
+index 8515dc13..4aec44ee 100644
+--- a/backend/src/llvm/ExpandLargeIntegers.cpp
++++ b/backend/src/llvm/ExpandLargeIntegers.cpp
+@@ -99,8 +99,8 @@ using namespace llvm;
+
+ #ifdef DEBUG
+ #undef DEBUG
+- #define DEBUG(...)
+ #endif
++#define DEBUG(...)
+ // Break instructions up into no larger than 64-bit chunks.
+ static const unsigned kChunkBits = 64;
+ static const unsigned kChunkBytes = kChunkBits / CHAR_BIT;
+diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp
+index ef56e4c2..4c3e20e4 100644
+--- a/backend/src/llvm/llvm_bitcode_link.cpp
++++ b/backend/src/llvm/llvm_bitcode_link.cpp
+@@ -340,7 +340,11 @@ namespace gbe
+ /* We use beignet's bitcode as dst because it will have a lot of
+ lazy functions which will not be loaded. */
+ #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 39
++#if LLVM_VERSION_MAJOR >= 7
++ llvm::Module * linked_module = llvm::CloneModule(*(llvm::Module*)mod).release();
++#else
+ llvm::Module * linked_module = llvm::CloneModule((llvm::Module*)mod).release();
++#endif
+ if(LLVMLinkModules2(wrap(clonedLib), wrap(linked_module))) {
+ #else
+ char* errorMsg;
+diff --git a/backend/src/llvm/llvm_includes.hpp b/backend/src/llvm/llvm_includes.hpp
+index 184553af..ffccf025 100644
+--- a/backend/src/llvm/llvm_includes.hpp
++++ b/backend/src/llvm/llvm_includes.hpp
+@@ -89,6 +89,10 @@
+ #include "llvm/CodeGen/IntrinsicLowering.h"
+
+ #include "llvm/Transforms/Scalar.h"
++#if LLVM_VERSION_MAJOR >= 7
++#include "llvm/Transforms/Utils.h"
++#include "llvm/Transforms/InstCombine/InstCombine.h"
++#endif
+ #include "llvm/MC/MCAsmInfo.h"
+ #include "llvm/MC/MCContext.h"
+ #include "llvm/MC/MCInstrInfo.h"
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/
@ 2020-03-25 13:36 Marek Szuba
0 siblings, 0 replies; 9+ messages in thread
From: Marek Szuba @ 2020-03-25 13:36 UTC (permalink / raw
To: gentoo-commits
commit: 710a434a1aa581263d609d75b0a363be4e89579a
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 25 13:31:16 2020 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 13:35:29 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=710a434a
dev-libs/beignet: remove last-rited package
Closes: https://bugs.gentoo.org/710640
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
dev-libs/beignet/Manifest | 1 -
dev-libs/beignet/beignet-1.3.2-r3.ebuild | 104 -----------------
.../files/beignet-1.2.0_no-hardcoded-cflags.patch | 12 --
.../beignet-1.3.1-oclicd_no_upstream_icdfile.patch | 14 ---
.../beignet-1.3.2_cmake-llvm-config-multilib.patch | 17 ---
...eignet-1.3.2_disable-doNegAddOptimization.patch | 66 -----------
dev-libs/beignet/files/beignet-1.3.2_llvm6.patch | 27 -----
dev-libs/beignet/files/beignet-1.3.2_llvm7.patch | 124 ---------------------
dev-libs/beignet/files/llvm-terminfo.patch | 20 ----
dev-libs/beignet/files/no-debian-multiarch.patch | 39 -------
dev-libs/beignet/metadata.xml | 14 ---
11 files changed, 438 deletions(-)
diff --git a/dev-libs/beignet/Manifest b/dev-libs/beignet/Manifest
deleted file mode 100644
index bcfd62e2505..00000000000
--- a/dev-libs/beignet/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST beignet-1.3.2-source.tar.gz 1143573 BLAKE2B e95e9ad352e7e695a0c56a8cea7bff312d7e1e811e17da6c744f16833130ca5339c163504afff3ed61947e752b94dc0465f6702317feb7662fb9676939838f20 SHA512 ed09a895c2f7e9b6e18687a899f1303dfda95e505c3c2d54bf7598cc4eba6c2fb5926589b19dd294384a4ff3f832c43235b1f03f8b7fd295cd558e78bda1400a
diff --git a/dev-libs/beignet/beignet-1.3.2-r3.ebuild b/dev-libs/beignet/beignet-1.3.2-r3.ebuild
deleted file mode 100644
index 874dd1cc319..00000000000
--- a/dev-libs/beignet/beignet-1.3.2-r3.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_6 )
-CMAKE_BUILD_TYPE="Release"
-
-inherit python-any-r1 cmake-multilib flag-o-matic llvm
-
-DESCRIPTION="OpenCL implementation for Intel Sandy Bridge, Ivy Bridge and Haswell GPUs"
-HOMEPAGE="https://01.org/beignet https://gitlab.freedesktop.org/beignet/beignet"
-SRC_URI="https://01.org/sites/default/files/${P}-source.tar.gz"
-
-LICENSE="LGPL-2.1+"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE="ocl-icd ocl20"
-
-BDEPEND="${PYTHON_DEPS}
- virtual/pkgconfig"
-COMMON="app-eselect/eselect-opencl
- media-libs/mesa[X(+),${MULTILIB_USEDEP}]
- <sys-devel/clang-8.0.0:=[static-analyzer,${MULTILIB_USEDEP}]
- >=x11-libs/libdrm-2.4.70[video_cards_intel,${MULTILIB_USEDEP}]
- x11-libs/libXext[${MULTILIB_USEDEP}]
- x11-libs/libXfixes[${MULTILIB_USEDEP}]
- ocl-icd? ( dev-libs/ocl-icd )"
-RDEPEND="${COMMON}"
-DEPEND="${COMMON}"
-
-LLVM_MAX_SLOT=7
-
-PATCHES=(
- "${FILESDIR}"/no-debian-multiarch.patch
- "${FILESDIR}"/${PN}-1.3.2_disable-doNegAddOptimization.patch
- "${FILESDIR}"/${PN}-1.3.2_cmake-llvm-config-multilib.patch
- "${FILESDIR}"/${PN}-1.3.2_llvm6.patch
- "${FILESDIR}"/${PN}-1.3.2_llvm7.patch
- "${FILESDIR}"/${PN}-1.3.1-oclicd_no_upstream_icdfile.patch
- "${FILESDIR}"/${PN}-1.2.0_no-hardcoded-cflags.patch
- "${FILESDIR}"/llvm-terminfo.patch
-)
-
-DOCS=(
- docs/.
-)
-
-S="${WORKDIR}"/Beignet-${PV}-Source
-
-pkg_setup() {
- llvm_pkg_setup
- python_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.
- cmake_comment_add_subdirectory utests
-}
-
-multilib_src_configure() {
- VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
-
- local mycmakeargs=(
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}${VENDOR_DIR}"
- -DOCLICD_COMPAT=$(usex ocl-icd)
- $(usex ocl20 "" "-DENABLE_OPENCL_20=OFF")
- )
-
- cmake-utils_src_configure
-}
-
-multilib_src_install() {
- VENDOR_DIR="/usr/$(get_libdir)/OpenCL/vendors/${PN}"
-
- cmake-utils_src_install
-
- insinto /etc/OpenCL/vendors/
- echo "${EPREFIX}${VENDOR_DIR}/lib/${PN}/libcl.so" > "${PN}-${ABI}.icd" || die "Failed to generate ICD file"
- doins "${PN}-${ABI}.icd"
-
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so.1
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libOpenCL.so
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so.1
- dosym "lib/${PN}/libcl.so" "${VENDOR_DIR}"/libcl.so
-}
-
-pkg_postinst() {
- elog ""
- elog "Please note that for Broadwell and newer architectures, Beignet has been deprecated upstream in favour of dev-libs/intel-neo."
- elog "It remains the recommended solution for Sandy Bridge, Ivy Bridge and Haswell."
- elog ""
-
- if use ocl-icd; then
- "${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd
- else
- "${ROOT}"/usr/bin/eselect opencl set --use-old beignet
- fi
-}
diff --git a/dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch b/dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch
deleted file mode 100644
index 3f9875930b5..00000000000
--- a/dev-libs/beignet/files/beignet-1.2.0_no-hardcoded-cflags.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/CMakeLists.txt 2016-08-30 10:06:31.000000000 +0000
-+++ b/CMakeLists.txt 2016-09-16 06:55:28.975772954 +0000
-@@ -89,8 +89,7 @@
- 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 ()
--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} -std=c++0x -Wno-invalid-offsetof")
- 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/dev-libs/beignet/files/beignet-1.3.1-oclicd_no_upstream_icdfile.patch b/dev-libs/beignet/files/beignet-1.3.1-oclicd_no_upstream_icdfile.patch
deleted file mode 100644
index 7e9e88361b4..00000000000
--- a/dev-libs/beignet/files/beignet-1.3.1-oclicd_no_upstream_icdfile.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -213,11 +213,6 @@
- Find_Package(OCLIcd)
- IF(OCLIcd_FOUND)
- MESSAGE(STATUS "Looking for OCL ICD header file - found")
-- configure_file (
-- "intel-beignet.icd.in"
-- "${ICD_FILE_NAME}"
-- )
-- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors)
- ELSE(OCLIcd_FOUND)
- MESSAGE(STATUS "Looking for OCL ICD header file - not found")
- MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
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
deleted file mode 100644
index 5add6a1bbda..00000000000
--- a/dev-libs/beignet/files/beignet-1.3.2_cmake-llvm-config-multilib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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)
-
diff --git a/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch b/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch
deleted file mode 100644
index ae399b17f05..00000000000
--- a/dev-libs/beignet/files/beignet-1.3.2_disable-doNegAddOptimization.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- b/backend/src/backend/gen_insn_selection_optimize.cpp
-+++ a/backend/src/backend/gen_insn_selection_optimize.cpp
-@@ -74,7 +74,8 @@ namespace gbe
- const GenRegister& replacement) :
- insn(insn), intermedia(intermedia), replacement(replacement)
- {
-- assert(insn.opcode == SEL_OP_MOV || insn.opcode == SEL_OP_ADD);
-+ assert(insn.opcode == SEL_OP_MOV);
-+ assert(&(insn.src(0)) == &replacement);
- assert(&(insn.dst(0)) == &intermedia);
- this->elements = CalculateElements(intermedia, insn.state.execWidth);
- replacementOverwritten = false;
-@@ -101,7 +102,6 @@ namespace gbe
- void doReplacement(ReplaceInfo* info);
- bool CanBeReplaced(const ReplaceInfo* info, const SelectionInstruction& insn, const GenRegister& var);
- void cleanReplaceInfoMap();
-- void doNegAddOptimization(SelectionInstruction &insn);
-
- SelectionBlock &bb;
- const ir::Liveness::LiveOut& liveout;
-@@ -159,13 +159,8 @@ namespace gbe
-
- void SelBasicBlockOptimizer::addToReplaceInfoMap(SelectionInstruction& insn)
- {
-- assert(insn.opcode == SEL_OP_MOV || insn.opcode == SEL_OP_ADD);
-- GenRegister &src = insn.src(0);
-- if (insn.opcode == SEL_OP_ADD) {
-- if (src.file == GEN_IMMEDIATE_VALUE)
-- src = insn.src(1);
-- }
--
-+ assert(insn.opcode == SEL_OP_MOV);
-+ const GenRegister& src = insn.src(0);
- const GenRegister& dst = insn.dst(0);
- if (src.type != dst.type || src.file != dst.file)
- return;
-@@ -254,29 +249,10 @@ namespace gbe
-
- if (insn.opcode == SEL_OP_MOV)
- addToReplaceInfoMap(insn);
--
-- doNegAddOptimization(insn);
- }
- cleanReplaceInfoMap();
- }
-
-- /* LLVM transform Mad(a, -b, c) to
-- Add b, -b, 0
-- Mad val, a, b, c
-- for Gen support negtive modifier, mad(a, -b, c) is native suppoted.
-- Also it can be used for the same like instruction sequence.
-- Do it just like a: mov b, -b, so it is a Mov operation like LocalCopyPropagation
-- */
-- void SelBasicBlockOptimizer::doNegAddOptimization(SelectionInstruction &insn) {
-- if (insn.opcode == SEL_OP_ADD) {
-- GenRegister src0 = insn.src(0);
-- GenRegister src1 = insn.src(1);
-- if ((src0.negation && src1.file == GEN_IMMEDIATE_VALUE && src1.value.f == 0.0f) ||
-- (src1.negation && src0.file == GEN_IMMEDIATE_VALUE && src0.value.f == 0.0f))
-- addToReplaceInfoMap(insn);
-- }
-- }
--
- void SelBasicBlockOptimizer::run()
- {
- for (size_t i = 0; i < MaxTries; ++i) {
diff --git a/dev-libs/beignet/files/beignet-1.3.2_llvm6.patch b/dev-libs/beignet/files/beignet-1.3.2_llvm6.patch
deleted file mode 100644
index be3ccbc4432..00000000000
--- a/dev-libs/beignet/files/beignet-1.3.2_llvm6.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/backend/src/llvm/llvm_to_gen.cpp
-+++ b/backend/src/llvm/llvm_to_gen.cpp
-@@ -322,7 +322,11 @@ namespace gbe
- DataLayout DL(&mod);
-
- gbeDiagnosticContext dc;
-+#if LLVM_VERSION_MAJOR >= 6
-+ mod.getContext().setDiagnosticHandlerCallBack(&gbeDiagnosticHandler,&dc);
-+#else
- mod.getContext().setDiagnosticHandler(&gbeDiagnosticHandler,&dc);
-+#endif
-
- #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 37
- mod.setDataLayout(DL);
---- a/backend/src/llvm/llvm_unroll.cpp
-+++ b/backend/src/llvm/llvm_unroll.cpp
-@@ -205,7 +205,9 @@ namespace gbe {
- if (parentTripCount != 0 && currTripCount * parentTripCount > 32) {
- //Don't change the unrollID if doesn't force unroll.
- //setUnrollID(parentL, false);
--#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 38
-+#if LLVM_VERSION_MAJOR >= 6
-+ loopInfo.erase(parentL);
-+#elif LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 38
- loopInfo.markAsRemoved(parentL);
- #else
- LPM.deleteLoopFromQueue(parentL);
diff --git a/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch b/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch
deleted file mode 100644
index 8990f0f0e48..00000000000
--- a/dev-libs/beignet/files/beignet-1.3.2_llvm7.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-commit e1b2419a0008e38ef2d9d255d9e9c74e9fba084b
-Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
-Date: Sat Jul 21 20:05:54 2018 +0100
-
- Add preliminary LLVM 7 support
-
- This is preliminary because LLVM 7 has not been released yet:
- it was tested with the snapshot from Debian experimental (svn336894).
-
- 1.Change linking order, as clangCodeGen now links to clangFrontend
- 2.Pass references not pointers to WriteBitcodeToFile and CloneModule
- 3.Add the headers that LoopSimplifyID, LCSSAID and
- some create*Pass have moved to
- 4.Define our DEBUG whether or not we just undefined LLVM's
- (theirs is now LLVM_DEBUG, but we never actually use it)
-
- Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com>
- Reviewed-by: Yang Rong <rong.r.yang@intel.com>
-
-diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
-index 5457f248..f882589d 100644
---- a/CMake/FindLLVM.cmake
-+++ b/CMake/FindLLVM.cmake
-@@ -113,10 +113,10 @@ macro(add_one_lib name)
- endmacro()
-
- #Assume clang lib path same as llvm lib path
-+add_one_lib("clangCodeGen")
- add_one_lib("clangFrontend")
- add_one_lib("clangSerialization")
- add_one_lib("clangDriver")
--add_one_lib("clangCodeGen")
- add_one_lib("clangSema")
- add_one_lib("clangStaticAnalyzerFrontend")
- add_one_lib("clangStaticAnalyzerCheckers")
-diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
-index 274c99c7..41592349 100644
---- a/backend/src/backend/gen_program.cpp
-+++ b/backend/src/backend/gen_program.cpp
-@@ -454,7 +454,11 @@ namespace gbe {
- #ifdef GBE_COMPILER_AVAILABLE
- std::string str;
- llvm::raw_string_ostream OS(str);
-+#if LLVM_VERSION_MAJOR >= 7
-+ llvm::WriteBitcodeToFile(*((llvm::Module*)prog->module), OS);
-+#else
- llvm::WriteBitcodeToFile((llvm::Module*)prog->module, OS);
-+#endif
- std::string& bin_str = OS.str();
- int llsz = bin_str.size();
- *binary = (char *)malloc(sizeof(char) * (llsz+1) );
-@@ -545,7 +549,11 @@ namespace gbe {
- &modRef);
- src = llvm::unwrap(modRef);
- }
-+#if LLVM_VERSION_MAJOR >= 7
-+ llvm::Module* clone = llvm::CloneModule(*src).release();
-+#else
- llvm::Module* clone = llvm::CloneModule(src).release();
-+#endif
- if (LLVMLinkModules2(wrap(dst), wrap(clone))) {
- #elif LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 37
- if (LLVMLinkModules(wrap(dst), wrap(src), LLVMLinkerPreserveSource_Removed, &errMsg)) {
-diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
-index c37c5951..b36f7b4a 100644
---- a/backend/src/backend/program.cpp
-+++ b/backend/src/backend/program.cpp
-@@ -794,7 +794,11 @@ namespace gbe {
- llvm::raw_fd_ostream ostream (dumpSPIRBinaryName.c_str(),
- err, llvm::sys::fs::F_None);
- if (!err)
-+#if LLVM_VERSION_MAJOR<7
- llvm::WriteBitcodeToFile(*out_module, ostream);
-+#else
-+ llvm::WriteBitcodeToFile(**out_module, ostream);
-+#endif
- }
- #endif
- return true;
-diff --git a/backend/src/llvm/ExpandLargeIntegers.cpp b/backend/src/llvm/ExpandLargeIntegers.cpp
-index 8515dc13..4aec44ee 100644
---- a/backend/src/llvm/ExpandLargeIntegers.cpp
-+++ b/backend/src/llvm/ExpandLargeIntegers.cpp
-@@ -99,8 +99,8 @@ using namespace llvm;
-
- #ifdef DEBUG
- #undef DEBUG
-- #define DEBUG(...)
- #endif
-+#define DEBUG(...)
- // Break instructions up into no larger than 64-bit chunks.
- static const unsigned kChunkBits = 64;
- static const unsigned kChunkBytes = kChunkBits / CHAR_BIT;
-diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp
-index ef56e4c2..4c3e20e4 100644
---- a/backend/src/llvm/llvm_bitcode_link.cpp
-+++ b/backend/src/llvm/llvm_bitcode_link.cpp
-@@ -340,7 +340,11 @@ namespace gbe
- /* We use beignet's bitcode as dst because it will have a lot of
- lazy functions which will not be loaded. */
- #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 39
-+#if LLVM_VERSION_MAJOR >= 7
-+ llvm::Module * linked_module = llvm::CloneModule(*(llvm::Module*)mod).release();
-+#else
- llvm::Module * linked_module = llvm::CloneModule((llvm::Module*)mod).release();
-+#endif
- if(LLVMLinkModules2(wrap(clonedLib), wrap(linked_module))) {
- #else
- char* errorMsg;
-diff --git a/backend/src/llvm/llvm_includes.hpp b/backend/src/llvm/llvm_includes.hpp
-index 184553af..ffccf025 100644
---- a/backend/src/llvm/llvm_includes.hpp
-+++ b/backend/src/llvm/llvm_includes.hpp
-@@ -89,6 +89,10 @@
- #include "llvm/CodeGen/IntrinsicLowering.h"
-
- #include "llvm/Transforms/Scalar.h"
-+#if LLVM_VERSION_MAJOR >= 7
-+#include "llvm/Transforms/Utils.h"
-+#include "llvm/Transforms/InstCombine/InstCombine.h"
-+#endif
- #include "llvm/MC/MCAsmInfo.h"
- #include "llvm/MC/MCContext.h"
- #include "llvm/MC/MCInstrInfo.h"
diff --git a/dev-libs/beignet/files/llvm-terminfo.patch b/dev-libs/beignet/files/llvm-terminfo.patch
deleted file mode 100644
index afbbc26a33d..00000000000
--- a/dev-libs/beignet/files/llvm-terminfo.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/backend/src/CMakeLists.txt 2015-12-18 07:40:03.000000000 +0100
-+++ b/backend/src/CMakeLists.txt 2016-08-01 13:44:31.475875150 +0200
-@@ -153,7 +153,7 @@
-
- add_library(gbeinterp SHARED gbe_bin_interpreter.cpp)
-
--if (LLVM_VERSION_NODOT VERSION_EQUAL 34)
-+if (NOT (LLVM_VERSION_NODOT LESS 34))
- find_library(TERMINFO NAMES tinfo ncurses)
- if (${TERMINFO} STREQUAL TERMINFO-NOTFOUND)
- message(FATAL_ERROR "no libtinfo or libncurses is found in system")
-@@ -161,7 +161,7 @@
- target_link_libraries(gbe ${TERMINFO})
- message(STATUS "use ${TERMINFO} as terminal control library")
- endif (${TERMINFO} STREQUAL TERMINFO-NOTFOUND)
--endif(LLVM_VERSION_NODOT VERSION_EQUAL 34)
-+endif(NOT (LLVM_VERSION_NODOT LESS 34))
-
- link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR})
-
diff --git a/dev-libs/beignet/files/no-debian-multiarch.patch b/dev-libs/beignet/files/no-debian-multiarch.patch
deleted file mode 100644
index c9aef4d9daf..00000000000
--- a/dev-libs/beignet/files/no-debian-multiarch.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- a/CMakeLists.txt 2015-04-17 04:27:51.000000000 +0200
-+++ b/CMakeLists.txt 2015-05-20 20:59:17.895041760 +0200
-@@ -39,14 +39,9 @@
-
- SET(CMAKE_VERBOSE_MAKEFILE "false")
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
--INCLUDE (GNUInstallDirs OPTIONAL)
--# support old CMake without GNUInstallDirs
--if (NOT CMAKE_INSTALL_FULL_LIBDIR)
-- set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
-- set (BEIGNET_LIBRARY_ARCHITECTURE "")
--else (NOT CMAKE_INSTALL_FULL_LIBDIR)
-- set (BEIGNET_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}")
--endif (NOT CMAKE_INSTALL_FULL_LIBDIR)
-+
-+set (CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
-+set (BEIGNET_LIBRARY_ARCHITECTURE "")
-
- if (NOT LIB_INSTALL_DIR)
- set (LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-@@ -55,17 +50,7 @@
- set (BEIGNET_INSTALL_DIR "${LIB_INSTALL_DIR}/beignet/")
- endif (NOT BEIGNET_INSTALL_DIR)
-
--# allow co-installation of 32- and 64-bit versions:
--# https://wiki.debian.org/Multiarch
--if (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/")
-- set (ICD_FILE_NAME "intel-beignet.icd")
--else (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/")
-- if (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "")
-- set (ICD_FILE_NAME "intel-beignet.icd")
-- else (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "")
-- set (ICD_FILE_NAME "intel-beignet-${BEIGNET_LIBRARY_ARCHITECTURE}.icd")
-- endif (BEIGNET_LIBRARY_ARCHITECTURE STREQUAL "")
--endif (BEIGNET_INSTALL_DIR STREQUAL "${CMAKE_INSTALL_PREFIX}/lib/beignet/")
-+set (ICD_FILE_NAME "intel-beignet.icd")
-
- # Force Release with debug info
- if (NOT CMAKE_BUILD_TYPE)
diff --git a/dev-libs/beignet/metadata.xml b/dev-libs/beignet/metadata.xml
deleted file mode 100644
index 917f7f9527a..00000000000
--- a/dev-libs/beignet/metadata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>marecki@gentoo.org</email>
- <name>Marek Szuba</name>
- </maintainer>
- <use>
- <flag name="ocl-icd">Enable compatibility with the
- <pkg>dev-libs/ocl-icd</pkg> OpenCL ICD loader</flag>
- <flag name="ocl20">Enable experimental OpenCL 2.0 support on Skylake
- and newer architectures</flag>
- </use>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-03-25 13:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-24 14:20 [gentoo-commits] repo/gentoo:master commit in: dev-libs/beignet/, dev-libs/beignet/files/ Marek Szuba
-- strict thread matches above, loose matches on Subject: below --
2020-03-25 13:36 Marek Szuba
2019-05-24 14:20 Marek Szuba
2018-08-31 13:27 Marek Szuba
2017-12-19 14:38 Marek Szuba
2017-10-17 13:08 Marek Szuba
2017-06-14 8:09 Marek Szuba
2016-11-28 13:57 Marek Szuba
2016-10-11 0:56 Marek Szuba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox