head 1.8; access; symbols pkgsrc-2026Q3:1.7.0.10 pkgsrc-2026Q3-base:1.7 pkgsrc-2026Q2:1.7.0.8 pkgsrc-2026Q2-base:1.7 pkgsrc-2026Q1:1.7.0.6 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.4 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.2 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.5.0.2 pkgsrc-2025Q2-base:1.5 pkgsrc-2020Q1:1.3.0.2 pkgsrc-2020Q1-base:1.3; locks; strict; comment @# @; 1.8 date 2026.10.11.06.41.44; author adam; state Exp; branches; next 1.7; commitid uKiSfBFuo1pTE1ZG; 1.7 date 2025.08.05.13.33.19; author wiz; state Exp; branches; next 1.6; commitid KYXGJCiLuqE9Px5G; 1.6 date 2025.08.05.13.27.17; author ryoon; state Exp; branches; next 1.5; commitid NuyIg3Hh7c96Nx5G; 1.5 date 2025.06.09.18.07.33; author adam; state Exp; branches; next 1.4; commitid TFQlc5dtMqHRafYF; 1.4 date 2020.04.18.08.08.07; author adam; state dead; branches; next 1.3; commitid 9DQvWpsXcrpLdQ4C; 1.3 date 2020.03.25.22.27.20; author nia; state Exp; branches; next 1.2; commitid Uuaz9IKjBYLGJP1C; 1.2 date 2019.02.27.10.46.16; author maya; state dead; branches; next 1.1; commitid pNrruCXVZUXzsodB; 1.1 date 2019.02.17.12.33.40; author maya; state Exp; branches; next ; commitid 5Q2cRCzWHbjLn7cB; desc @@ 1.8 log @zig: updated to 0.17.0 0.17.0 Notable changes: aarch64-openbsd is now tested natively in Zig's CI, ensuring high-quality support going forward. aarch64-freebsd and aarch64-netbsd CI jobs now run on pull requests too, in addition to master pushes. An LLVM bug that broke most aarch64-windows binaries, including the Zig Compiler, has been worked around. The Zig Compiler now applies mandatory code hardening techniques when targeting aarch64-openbsd so that the resulting binaries actually work. Zig now provides stack traces on crashes and failed assertions on 32-bit ARM. Some work still remains for Thumb-only targets. Zig now provides stack traces on crashes and failed assertions on SPARC. Zig now handles pointer authentication opcodes when doing stack unwinding on AArch64. Support for the loongarch32-linux-gnu[sf] targets has been added. Zig now has generally usable support for 64-bit SPARC, and especially sparc64-linux. This is largely thanks to Zig's new ELF linker which now has better support for this target than LLD. The Zig Standard Library has been ported to the x32 and N32 ABIs on x86-64 and 64-bit MIPS, respectively. These are niche ILP32 ABIs that allow using the 64-bit instruction set while only having 32-bit pointers - the idea being to trade available address space for lower memory usage and better cache utilization. Target information has been added for some game consoles: aarch64-switch, arm-gba, mipsel-psx, and powerpc-wiiu Very early xtensa-linux support has been added to Zig. Note that, for now, this support can only be exercised via the C backend or the experimental LLVM backend. The Zig Standard Library now has support for arc[eb]-linux, csky-linux, and m88k-openbsd when using the C backend. The Zig Standard Library now has support for no-libc microblaze[el]-linux, sh[eb]-linux, and sparc-linux. Zig now enforces -mabi=ieeelongdouble for all PowerPC targets. This is just a formalization of what was already reality; Zig has never supported the IBM "double-double" format for long double and likely never will. As a result, this release drops support for powerpc-linux-gnueabi[hf] because glibc only supports the "double-double" format on these targets. The powerpc-linux-musleabi[hf] targets remain supported as they use the IEEE format. This release drops support for powerpc64-linux-gnu. Zig has only ever supported linking ELFv2 binaries for 64-bit PowerPC, and glibc does not officially support ELFv2 on big endian - nor IEEE long double, as above. Zig's ability to detect the native CPU model and features has been greatly enhanced across the board; this affects almost every architecture on every supported OS. The baseline CPU model has been changed for some targets: aarch64-haiku: cortex_a55 m68k-*: M68030 mips64-openbsd: octeon powerpc-netbsd: 750 powerpc64-freebsd: pwr8 powerpc64-linux: pwr8 powerpc64-openbsd: pwr9 s390x-*: arch11 sparc-*: generic sparc-linux: v9 sparc64-*: ultrasparc xtensa-*: esp32 In Zig's target query syntax, native libc version detection now only happens if the triple actually uses native libc (i.e. the ABI component is omitted). We expect this new behavior to better match people's mental model for how target queries work, particularly when considering how the OS component works. @ text @$NetBSD: patch-CMakeLists.txt,v 1.7 2025/08/05 13:33:19 wiz Exp $ Do not append a buildlinked directory to ZIG_CMAKE_PREFIX_PATH to avoid WRKREF in bin/zig. Skip stage3 during build to: * speed up building * avoid work directory reference in zig's RUNPATH. --- CMakeLists.txt.orig 2026-10-01 22:02:33.000000000 +0000 +++ CMakeLists.txt @@@@ -18,13 +18,7 @@@@ endif() # cache variable. Furthermore, the environment variable follows the system path # separator, such as ':' on POSIX and ';' on Windows, but the cache variable # follows CMake's array behavior, i.e. always ';' for a separator. -list(APPEND ZIG_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") -if(WIN32) - list(APPEND ZIG_CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) -else() - string(REGEX REPLACE ":" ";" ZIG_CMAKE_PREFIX_PATH_STRING "$ENV{CMAKE_PREFIX_PATH}") - list(APPEND ZIG_CMAKE_PREFIX_PATH "${ZIG_CMAKE_PREFIX_PATH_STRING}") -endif() +set(ZIG_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@@@ -790,18 +784,9 @@@@ if(NOT "${ZIG_TARGET_DYNAMIC_LINKER}" ST endif() -add_custom_target(stage3 ALL - DEPENDS "${PROJECT_BINARY_DIR}/stage3/bin/zig" -) set(ZIG2_WORKING_DIR "${PROJECT_SOURCE_DIR}") -add_custom_command( - OUTPUT "${PROJECT_BINARY_DIR}/stage3/bin/zig" - COMMAND zig2 build ${ZIG_BUILD_ARGS} --prefix "${PROJECT_BINARY_DIR}/stage3" - COMMENT "Building stage3" - WORKING_DIRECTORY "${ZIG2_WORKING_DIR}" -) set(ZIG_EXECUTABLE "$") @ 1.7 log @zig: fix typo in comment @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.6 2025/08/05 13:27:17 ryoon Exp $ d10 1 a10 1 --- CMakeLists.txt.orig 2025-05-23 04:31:41.000000000 +0000 d27 1 a27 1 @@@@ -978,18 +972,9 @@@@ if(MINGW AND "${ZIG_HOST_TARGET_ARCH}" S d39 1 a39 1 - COMMAND zig2 build --prefix "${PROJECT_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} @ 1.6 log @lang/zig: Remove WRKREF from bin/zig * RUNPATH under NetBSD/amd64 10.99.15 is PREFIX:PREFIX and it is still strange. * Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.5 2025/06/09 18:07:33 adam Exp $ d7 1 a7 1 * speed up buidling @ 1.5 log @zig: add missing patch @ text @d1 4 a4 1 $NetBSD$ d7 1 a7 1 * spedd up buidling d10 1 a10 1 --- CMakeLists.txt.orig 2025-03-04 22:35:21.000000000 +0000 d12 16 a27 1 @@@@ -971,18 +971,9 @@@@ if(MINGW AND "${ZIG_HOST_TARGET_ARCH}" S @ 1.4 log @zig: updated to 0.6.0 Language Changes in 0.6.0: Improved names of error sets when using merge error sets operator (||). pub syntax for container fields is removed. Type coercion from *[0]T to E![]const T is now allowed. This is an unambiguous, safe cast. asm now accepts comptime-known values, rather than requiring string literal syntax. Removed compile error for peer result ?comptime_int and null. Ability to pass comptime types and non comptime types to same parameter. @@typeOf is renamed to @@TypeOf. zig fmt automatically performs the conversion, and the next release of Zig after this one will remove the automatic conversion. Ability to switch on pointer types. Multiline strings in test and library names are disallowed. Zig language no longer requires the expression a else unreachable with comptime a to produce a comptime result. Timon Kruiper implemented casting between [*c]T and ?[*:0]T on fn parameter. Timon Kruiper improved @@typeInfo to lazily resolve declarations. This way all the declarations in a namespace won't be resolved until the user actually uses the declarations slice in the builtin TypeInfo union. @@ptrCast supports casting a slice to a pointer. LemonBoy implemented peer type resolution between ?[]T and *[N]T. There is now peer type resolution between mixed-const []T and *[N]T. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.3 2020/03/25 22:27:20 nia Exp $ d3 3 a5 1 Use DESTDIR... d7 1 a7 1 --- CMakeLists.txt.orig 2020-03-25 21:48:11.605064006 +0000 d9 19 a27 9 @@@@ -612,7 +612,7 @@@@ add_custom_target(zig_build_libuserland "-Doutput-dir=${CMAKE_BINARY_DIR}" "-Drelease=${LIBUSERLAND_RELEASE_MODE}" "-Dlib-files-only" - --prefix "${CMAKE_INSTALL_PREFIX}" + --prefix "${DESTDIR}${CMAKE_INSTALL_PREFIX}" DEPENDS zig0 BYPRODUCTS "${LIBUSERLAND}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" @ 1.3 log @zig: Update to 0.5.0. Unbreak. This version of zig supports the current version of llvm in pkgsrc (9). Some patches from TheLemonMan were backported by me to fix NetBSD support. Release notes: https://ziglang.org/download/0.5.0/release-notes.html @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @zig: update to today's (2019-02-27) snapshot of master. Allows us to drop all the local patches that were merged upstream. lld is not a dependency, zig by default bundles lld and doesn't use an external one. comment it. Andrew Kelley (62): Merge pull request #1975 from BenoitJGirard/master Merge pull request #1963 from matthew-mcallister/dedup-compile-log-warning Merge pull request #1972 from coypoop/netbsd README: add NetBSD to support table pull request fixups Merge branch 'emekoi-fix-1711' export _mh_execute_header with weak linkage docs: note top level declarations are order-independent docs: shadowing zig fmt: fix infix operator before multiline string literal add test for 74bdc1d1f898705 Merge branch 'kristate-zig-backport-issue1944' remove --no-rosegment workaround now that valgrind bug is fixed valgrind client requests for undefined values Merge branch 'slice-deref-failure' of https://github.com/matthew-mcallister/zig into matthew-mcallister-slice-deref-failure pull request fixups Merge branch 'matthew-mcallister-slice-deref-failure' deduplicate compile errors for undeclared identifiers packed structs support comptime bitcasting extern structs support comptime bitcasting `@@sliceToBytes` works at comptime better handling of arrays in packed structs better field access of types which have one possible value fix `@@bitCast` when src/dest types have mismatched handle_is_ptr docs for packed structs add regression test for bitcast to array implement vector negation better libc detection (#1996) introduce std.debug.captureStackTrace fix `zig fmt` arg0 handled incorrectly add `zig cc` command to act like a C compiler zig cc: remove "polly" which was an undefined symbol on macos zig cc: work around clang calling GetCommandLine on Windows Merge pull request #2003 from ziglang/zig-cc first class support for compiling C code building DLLs on Windows works better `@@cImport` works with `--cache on` Merge pull request #2005 from ziglang/c-source zig build: 2 improvements fix infinite recursion in type_has_one_possible_value delete incorrect TODO comment add docs for zero bit types and pointers to zero bit types fix not finding libgcc_s when looking for native libc add a compile error note when C import fails and not linking libc better error message when forgetting to link against libc add a regression test for #704 fix incorrectly trying to memset at comptime fix the libc compile error tests to only run on linux use -nobuiltininc when compiling c code use -nostdinc++ when compiling C code use -nostdinc and sometimes -nolibc when compiling C code breaking changes to the way targets work in zig fix regressions on Windows introduce sys_include_dir for when sys/* files are not with stdlib.h add builder.addFmt API and use it to test stage1 zig fmt fix .gitignore file and add commit missing std lib file add test coverage for binary OR on error sets add test coverage for type used as switch case fix handling when there are multiple externs and fix stage1 zig fmt on macos improve docs for unions and switching on tagged unions windows returns EINVAL for fopen when there is an asterisk in the name Benoit Jauvin-Girard (1): Fix std.math.powi so powi(x, +-0) = 1 for any x. BenoitJGirard (2): Merge pull request #1 from ziglang/master Merge pull request #2 from ziglang/master Jimmi HC (1): Fixed std.testing.expectEqual John Schmidt (2): Some function doc tweaks (#1961) Add priority queue LemonBoy (4): Silence gcc8 class-memaccess warnings Add align attribute for params pointers Translate parameterless C functions (#1978) Prevent crash in tagged enums rendering (#1986) Matthew McAllister (3): Fix lvalue dereference type checking Deduplicate compile log statement warnings Check for duped error messages in compile tests Maya Rashish (3): Add NetBSD support Undo local, unneeded patch Don't provide a bogus definition of EVFILT_USER Quetzal Bradley (1): fix openWriteNoClobber and add test emekoi (1): make @@enumToInt work on union(enum) kristopher tate (1): src/analyze.cpp: default to using `param_node` upon callconv error; @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.1 2019/02/17 12:33:40 maya Exp $ d3 3 a5 1 --- CMakeLists.txt.orig 2019-02-17 10:28:53.000000000 +0000 d7 9 a15 17 @@@@ -448,6 +448,7 @@@@ set(ZIG_STD_FILES "c/freebsd.zig" "c/index.zig" "c/linux.zig" + "c/netbsd.zig" "c/windows.zig" "coff.zig" "crypto/blake2.zig" @@@@ -588,6 +589,8 @@@@ set(ZIG_STD_FILES "os/linux/index.zig" "os/linux/vdso.zig" "os/linux/x86_64.zig" + "os/netbsd/errno.zig" + "os/netbsd/index.zig" "os/path.zig" "os/time.zig" "os/uefi.zig" @ 1.1 log @Add zig 0.3.0.20190217 Zig is an open-source programming language designed for robustness, optimality, and clarity. * Robust - behavior is correct even for edge cases such as out of memory. * Optimal - write programs the best way they can behave and perform. * Clear - precisely communicate your intent to the compiler and other programmers. The language imposes a low overhead to reading code. @ text @d1 1 a1 1 $NetBSD$ @