aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2022-09-16 22:37:06 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2022-09-17 10:56:01 +0000
commitbdc2b54bd1d909666e6970e6464b892eea67aa3b (patch)
treef7da6cf736c89272d01474700cd18c5453f38271
parent51bf7c5d96c0c1492a40657253e3acb22d3004cf (diff)
downloadports-bdc2b54bd1d909666e6970e6464b892eea67aa3b.tar.gz
ports-bdc2b54bd1d909666e6970e6464b892eea67aa3b.zip
lang/zig, lang/zig-devel: fix for CMake 3.24
Add the THREADS_PREFER_PTHREAD_FLAG explicitly for zig builds; these are the only two ports that need that, otherwise it would be a candidate for adding to our platform CMake flags. Without the flag, CMake 3.24 changes how pthreads are searched, and it ends up leaving out the -pthread flag from the compile. For zig, this causes the bootstrap compiler to crash immediately (it does not even reach main), which kills the build. Prior to CMake 3.24, this flag already existed, but the order in which pthreads were searched was different, and we ended up using the -pthread flag anyway. The PR is for the CMake update. This was the last blocker for it. PR: 265652
-rw-r--r--lang/zig-devel/Makefile3
-rw-r--r--lang/zig/Makefile4
2 files changed, 6 insertions, 1 deletions
diff --git a/lang/zig-devel/Makefile b/lang/zig-devel/Makefile
index 61264aff72f6..f1ab152699f9 100644
--- a/lang/zig-devel/Makefile
+++ b/lang/zig-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= zig
DISTVERSION= 0.9.1
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ \
https://ziglang.org/builds/
@@ -32,6 +33,8 @@ STATIC_RUN_DEPENDS_OFF= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
STATIC_CMAKE_BOOL= CMAKE_SKIP_INSTALL_RPATH ZIG_STATIC
STATIC_LDFLAGS= -llzma -lm -lmd -lxml2 -lz
+CMAKE_ON= THREADS_PREFER_PTHREAD_FLAG
+
_LLVM_VER= 13
_ZIG_BIN= ${STAGEDIR}${PREFIX}/bin/zig
diff --git a/lang/zig/Makefile b/lang/zig/Makefile
index d23b5b56c8d9..860013d5bff9 100644
--- a/lang/zig/Makefile
+++ b/lang/zig/Makefile
@@ -1,6 +1,6 @@
PORTNAME= zig
-PORTREVISION= 1
DISTVERSION= 0.9.1
+PORTREVISION= 2
CATEGORIES= lang
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/ \
https://ziglang.org/builds/
@@ -32,6 +32,8 @@ STATIC_RUN_DEPENDS_OFF= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
STATIC_CMAKE_BOOL= CMAKE_SKIP_INSTALL_RPATH ZIG_STATIC
STATIC_LDFLAGS= -licudata -licuuc -llzma -lm -lmd -lxml2 -lz
+CMAKE_ON= THREADS_PREFER_PTHREAD_FLAG
+
_LLVM_VER= 13
_ZIG_BIN= ${STAGEDIR}${PREFIX}/bin/zig