Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ispc/, dev-lang/ispc/files/
Date: Wed, 26 May 2021 05:21:44
Message-Id: 1622006490.b26f9d3cc957269fcaad9d44148fa225420eb5e5.juippis@gentoo
1 commit: b26f9d3cc957269fcaad9d44148fa225420eb5e5
2 Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
3 AuthorDate: Wed Apr 21 14:02:00 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed May 26 05:21:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b26f9d3c
7
8 dev-lang/ispc: Update live ebuild
9
10 Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/20498
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 dev-lang/ispc/files/ispc-9999-llvm.patch | 39 ++++++++++++++++++++++++++++++
15 dev-lang/ispc/files/ispc-9999-werror.patch | 13 ++++++++++
16 dev-lang/ispc/ispc-9999.ebuild | 19 +++++++++------
17 3 files changed, 63 insertions(+), 8 deletions(-)
18
19 diff --git a/dev-lang/ispc/files/ispc-9999-llvm.patch b/dev-lang/ispc/files/ispc-9999-llvm.patch
20 new file mode 100644
21 index 00000000000..7303ac0fd6e
22 --- /dev/null
23 +++ b/dev-lang/ispc/files/ispc-9999-llvm.patch
24 @@ -0,0 +1,39 @@
25 +diff --git a/CMakeLists.txt b/CMakeLists.txt
26 +index 13e66268..27ff8364 100644
27 +--- a/CMakeLists.txt
28 ++++ b/CMakeLists.txt
29 +@@ -218,7 +218,7 @@ if (WASM_ENABLED)
30 + list(APPEND ISPC_TARGETS wasm-i32x4)
31 + endif()
32 +
33 +-set(CLANG_LIBRARY_LIST clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangBasic clangEdit clangLex)
34 ++set(CLANG_LIBRARY_LIST clang clang-cpp)
35 + set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option frontendopenmp)
36 +
37 + if (X86_ENABLED)
38 +@@ -402,11 +402,8 @@ if (ISPC_USE_ASAN)
39 + endif()
40 +
41 + # Link against Clang libraries
42 +-foreach(clangLib ${CLANG_LIBRARY_LIST})
43 +- find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS})
44 +- list(APPEND CLANG_LIBRARY_FULL_PATH_LIST ${${clangLib}Path})
45 +-endforeach()
46 +-target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_FULL_PATH_LIST})
47 ++find_package(Clang REQUIRED)
48 ++target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_LIST})
49 +
50 + # Link against LLVM libraries
51 + target_link_libraries(${PROJECT_NAME} ${LLVM_LIBRARY_LIST})
52 +diff --git a/src/llvmutil.cpp b/src/llvmutil.cpp
53 +index 06fab989..57a7130f 100644
54 +--- a/src/llvmutil.cpp
55 ++++ b/src/llvmutil.cpp
56 +@@ -42,6 +42,7 @@
57 + #include <llvm/IR/BasicBlock.h>
58 + #include <llvm/IR/Instructions.h>
59 + #include <llvm/IR/Module.h>
60 ++#include <llvm/Support/raw_ostream.h>
61 +
62 + #ifdef ISPC_GENX_ENABLED
63 + #include <llvm/GenXIntrinsics/GenXIntrinsics.h>
64
65 diff --git a/dev-lang/ispc/files/ispc-9999-werror.patch b/dev-lang/ispc/files/ispc-9999-werror.patch
66 new file mode 100644
67 index 00000000000..0e860a95de2
68 --- /dev/null
69 +++ b/dev-lang/ispc/files/ispc-9999-werror.patch
70 @@ -0,0 +1,13 @@
71 +diff --git a/CMakeLists.txt b/CMakeLists.txt
72 +index 13e66268..27ff8364 100644
73 +--- a/CMakeLists.txt
74 ++++ b/CMakeLists.txt
75 +@@ -352,7 +352,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
76 + set_source_files_properties(${FLEX_OUTPUT} PROPERTIES COMPILE_FLAGS "/wd4005 /wd4003")
77 + set_source_files_properties(${BISON_OUTPUT} PROPERTIES COMPILE_FLAGS "/wd4005 /wd4065")
78 + else()
79 +- target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-sign-compare -Wno-unused-function -Werror ${LLVM_CPP_FLAGS})
80 ++ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-sign-compare -Wno-unused-function ${LLVM_CPP_FLAGS})
81 + # The change implementing -Wno-unused-but-set-variable in clang was reverted, so commenting out for now.
82 + #if (${LLVM_VERSION_NUMBER} VERSION_GREATER_EQUAL "13.0.0")
83 + # set_source_files_properties(${BISON_CPP_OUTPUT} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
84
85 diff --git a/dev-lang/ispc/ispc-9999.ebuild b/dev-lang/ispc/ispc-9999.ebuild
86 index aeb4e572cb4..23b20156fd2 100644
87 --- a/dev-lang/ispc/ispc-9999.ebuild
88 +++ b/dev-lang/ispc/ispc-9999.ebuild
89 @@ -1,4 +1,4 @@
90 -# Copyright 1999-2020 Gentoo Authors
91 +# Copyright 1999-2021 Gentoo Authors
92 # Distributed under the terms of the GNU General Public License v2
93
94 EAPI=7
95 @@ -7,10 +7,10 @@ PYTHON_COMPAT=( python3_{7,8,9} )
96
97 inherit cmake toolchain-funcs python-any-r1 llvm
98
99 -LLVM_MAX_SLOT=10
100 +LLVM_MAX_SLOT=12
101
102 DESCRIPTION="Intel SPMD Program Compiler"
103 -HOMEPAGE="https://ispc.github.com/"
104 +HOMEPAGE="https://ispc.github.io/"
105
106 if [[ ${PV} = *9999 ]]; then
107 inherit git-r3
108 @@ -24,7 +24,7 @@ LICENSE="BSD BSD-2 UoI-NCSA"
109 SLOT="0"
110 IUSE="examples"
111
112 -RDEPEND="<sys-devel/clang-11:="
113 +RDEPEND="<sys-devel/clang-13:="
114 DEPEND="
115 ${RDEPEND}
116 ${PYTHON_DEPS}
117 @@ -36,10 +36,12 @@ BDEPEND="
118
119 PATCHES=(
120 "${FILESDIR}/${PN}-1.13.0-cmake-gentoo-release.patch"
121 - "${FILESDIR}/${PN}-1.14.0-llvm-10.patch"
122 - "${FILESDIR}/${PN}-1.13.0-werror.patch"
123 + "${FILESDIR}/${PN}-9999-llvm.patch"
124 + "${FILESDIR}/${PN}-9999-werror.patch"
125 )
126
127 +CMAKE_BUILD_TYPE="RelWithDebInfo"
128 +
129 llvm_check_deps() {
130 has_version -d "sys-devel/clang:${LLVM_SLOT}"
131 }
132 @@ -60,6 +62,7 @@ src_configure() {
133 local mycmakeargs=(
134 "-DARM_ENABLED=$(usex arm)"
135 "-DCMAKE_SKIP_RPATH=ON"
136 + "-DISPC_NO_DUMPS=ON"
137 )
138 cmake_src_configure
139 }
140 @@ -71,11 +74,11 @@ src_install() {
141 if use examples; then
142 insinto "/usr/share/doc/${PF}/examples"
143 docompress -x "/usr/share/doc/${PF}/examples"
144 - doins -r "${BUILD_DIR}"/examples/*
145 + doins -r "${S}"/examples/*
146 fi
147 }
148
149 src_test() {
150 # Inject path to prevent using system ispc
151 - PATH="${BUILD_DIR}/bin:${PATH}" ${EPYTHON} run_tests.py || die "Testing failed under ${EPYTHON}"
152 + PATH="${BUILD_DIR}/bin:${PATH}" ${EPYTHON} ./run_tests.py || die "Testing failed under ${EPYTHON}"
153 }