summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2022-10-10 09:16:41 +0600
committerMichał Górny <mgorny@gentoo.org>2022-10-18 17:00:45 +0200
commitb15d873b0f867c6b2fe6c763bf859ea79ea41074 (patch)
tree01fbb3a022d891e1e9f03194b7fb9f07d3c0376e /dev-lang
parentsys-devel/llvm: Add zstd flag to 15.0.3* (diff)
downloadgentoo-b15d873b0f867c6b2fe6c763bf859ea79ea41074.tar.gz
gentoo-b15d873b0f867c6b2fe6c763bf859ea79ea41074.tar.bz2
gentoo-b15d873b0f867c6b2fe6c763bf859ea79ea41074.zip
dev-lang/zig: fix building with Clang 16, fix searching LLD
Upstream PR https://github.com/ziglang/zig/pull/13121 Closes: https://bugs.gentoo.org/877231 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27718 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/zig/files/zig-0.9.1-fix-clang16.patch23
-rw-r--r--dev-lang/zig/zig-0.9.1-r3.ebuild (renamed from dev-lang/zig/zig-0.9.1-r2.ebuild)2
2 files changed, 25 insertions, 0 deletions
diff --git a/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch b/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch
new file mode 100644
index 000000000000..deb563378d76
--- /dev/null
+++ b/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch
@@ -0,0 +1,23 @@
+From: Eric Joldasov <bratishkaerik@getgoogleoff.me>
+Fix building with Clang 16
+Upstream PR https://github.com/ziglang/zig/pull/13121
+
+--- a/src/stage1/parse_f128.c
++++ b/src/stage1/parse_f128.c
+@@ -983,14 +983,14 @@ static int isspace(int c)
+ return c == ' ' || (unsigned)c-'\t' < 5;
+ }
+
+-static inline float128_t makeInf128() {
++static inline float128_t makeInf128(void) {
+ union ldshape ux;
+ ux.i2.hi = 0x7fff000000000000UL;
+ ux.i2.lo = 0x0UL;
+ return ux.f;
+ }
+
+-static inline float128_t makeNaN128() {
++static inline float128_t makeNaN128(void) {
+ uint64_t rand = 0UL;
+ union ldshape ux;
+ ux.i2.hi = 0x7fff000000000000UL | (rand & 0xffffffffffffUL);
diff --git a/dev-lang/zig/zig-0.9.1-r2.ebuild b/dev-lang/zig/zig-0.9.1-r3.ebuild
index 4adbe994a8f3..463cead06e2d 100644
--- a/dev-lang/zig/zig-0.9.1-r2.ebuild
+++ b/dev-lang/zig/zig-0.9.1-r3.ebuild
@@ -23,6 +23,7 @@ IUSE="test +threads"
RESTRICT="!test? ( test )"
PATCHES=(
+ "${FILESDIR}/${P}-fix-clang16.patch"
"${FILESDIR}/${P}-fix-single-threaded.patch"
"${FILESDIR}/${P}-fix-riscv.patch"
"${FILESDIR}/${P}-fix-bad-hostname-segfault.patch"
@@ -59,6 +60,7 @@ src_configure() {
-DZIG_USE_CCACHE=OFF
-DZIG_PREFER_CLANG_CPP_DYLIB=ON
-DZIG_SINGLE_THREADED="$(usex !threads)"
+ -DCMAKE_PREFIX_PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT})
)
cmake_src_configure