Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/intel-compute-runtime/, dev-libs/intel-compute-runtime/files/
Date: Tue, 28 Jun 2022 19:59:32
Message-Id: 1656446349.17ce27a5e6dc97311ddd178fabccea3141b1ca95.conikost@gentoo
1 commit: 17ce27a5e6dc97311ddd178fabccea3141b1ca95
2 Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
3 AuthorDate: Tue Jun 28 17:06:27 2022 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 28 19:59:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17ce27a5
7
8 dev-libs/intel-compute-runtime: add patch to remove `-D_FORTIFY_SOURCE=2` configuration from build process
9
10 Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
11 Closes: https://github.com/gentoo/gentoo/pull/26119
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 ...-runtime-22.24.23453-remove-fortify-sources.patch | 20 ++++++++++++++++++++
15 .../intel-compute-runtime-22.24.23453.ebuild | 6 +++---
16 .../intel-compute-runtime-22.25.23529.ebuild | 6 +++---
17 3 files changed, 26 insertions(+), 6 deletions(-)
18
19 diff --git a/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch b/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch
20 new file mode 100644
21 index 000000000000..dc0ab96dde0c
22 --- /dev/null
23 +++ b/dev-libs/intel-compute-runtime/files/intel-compute-runtime-22.24.23453-remove-fortify-sources.patch
24 @@ -0,0 +1,20 @@
25 +diff --git a/compute-runtime-22.24.23453/CMakeLists.txt b/compute-runtime-22.24.23453/CMakeLists.txt
26 +index f227808..83075f9 100644
27 +--- a/CMakeLists.txt
28 ++++ b/CMakeLists.txt
29 +@@ -702,7 +702,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
30 + else()
31 + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
32 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
33 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -D_FORTIFY_SOURCE=2")
34 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security")
35 + else()
36 + # gcc, g++ only
37 +@@ -711,7 +710,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
38 + else()
39 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
40 + endif()
41 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -D_FORTIFY_SOURCE=2")
42 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security")
43 + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,-z,noexecstack")
44 + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,-z,relro")
45
46 diff --git a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild
47 index bdc8a84baf08..077189e165cf 100644
48 --- a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild
49 +++ b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.24.23453.ebuild
50 @@ -41,11 +41,11 @@ BDEPEND="virtual/pkgconfig"
51
52 DOCS=( "README.md" "FAQ.md" )
53
54 -src_prepare() {
55 - default
56 +PATCHES=( "${FILESDIR}/${PN}-22.24.23453-remove-fortify-sources.patch" )
57
58 +src_prepare() {
59 # Remove '-Werror' from default
60 - set -e '/Werror/d' -i CMakeLists.txt || die
61 + sed -e '/Werror/d' -i CMakeLists.txt || die
62
63 cmake_src_prepare
64 }
65
66 diff --git a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild
67 index bdc8a84baf08..077189e165cf 100644
68 --- a/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild
69 +++ b/dev-libs/intel-compute-runtime/intel-compute-runtime-22.25.23529.ebuild
70 @@ -41,11 +41,11 @@ BDEPEND="virtual/pkgconfig"
71
72 DOCS=( "README.md" "FAQ.md" )
73
74 -src_prepare() {
75 - default
76 +PATCHES=( "${FILESDIR}/${PN}-22.24.23453-remove-fortify-sources.patch" )
77
78 +src_prepare() {
79 # Remove '-Werror' from default
80 - set -e '/Werror/d' -i CMakeLists.txt || die
81 + sed -e '/Werror/d' -i CMakeLists.txt || die
82
83 cmake_src_prepare
84 }