From a298b2a8fbb7bc891b90e974a8f7da77e66421b6 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Mon, 9 Jun 2025 18:31:46 +0200 Subject: [PATCH 01/15] Update to 0.14.1 --- ...ve-native-lib-directories-from-rpath.patch | 8 ++-- 0002-std.Build-add-build-id-option.patch | 14 +++--- ...-bounds-of-main-zig-executable-to-9G.patch | 28 ----------- ...-errors-for-exceeding-max_rss-to-war.patch | 46 +++++++++++++++++++ ...ib-dir-as-directory-instead-of-as-st.patch | 33 ------------- ...t-directory-of-libraries-to-linker-p.patch | 8 ++-- sources | 4 +- zig.spec | 30 ++++++------ 8 files changed, 76 insertions(+), 95 deletions(-) delete mode 100644 0003-increase-upper-bounds-of-main-zig-executable-to-9G.patch create mode 100644 0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch delete mode 100644 0004-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch rename 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch => 0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch (86%) diff --git a/0001-remove-native-lib-directories-from-rpath.patch b/0001-remove-native-lib-directories-from-rpath.patch index ae39355..b429dfc 100644 --- a/0001-remove-native-lib-directories-from-rpath.patch +++ b/0001-remove-native-lib-directories-from-rpath.patch @@ -1,7 +1,7 @@ -From 874ce2357bb7e7398115fc6f37f3f3817a9116ba Mon Sep 17 00:00:00 2001 +From a80398bc4c83c9f2c7249e6237df2d8ef90ec322 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 11 Jun 2024 13:35:37 +0200 -Subject: [PATCH 1/5] remove native lib directories from rpath +Subject: [PATCH 1/4] remove native lib directories from rpath Signed-off-by: Jan200101 --- @@ -9,10 +9,10 @@ Signed-off-by: Jan200101 1 file changed, 9 insertions(+) diff --git a/src/main.zig b/src/main.zig -index 1075993846..dd9ab8febd 100644 +index 911e1dc1af..228c1b73ae 100644 --- a/src/main.zig +++ b/src/main.zig -@@ -4033,6 +4033,15 @@ fn createModule( +@@ -4048,6 +4048,15 @@ fn createModule( try create_module.lib_directories.ensureUnusedCapacity(arena, paths.lib_dirs.items.len); for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(&create_module.lib_directories, path, true); diff --git a/0002-std.Build-add-build-id-option.patch b/0002-std.Build-add-build-id-option.patch index 3541011..c57d37d 100644 --- a/0002-std.Build-add-build-id-option.patch +++ b/0002-std.Build-add-build-id-option.patch @@ -1,7 +1,7 @@ -From fd127fafb534eade533655688c4977ae4f7cebe0 Mon Sep 17 00:00:00 2001 +From 80955809c64d3e83a475f26ca9d17ea2e2fb6da7 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Fri, 17 Jan 2025 20:53:30 +0100 -Subject: [PATCH 2/5] std.Build: add build-id option +Subject: [PATCH 2/4] std.Build: add build-id option Signed-off-by: Jan200101 --- @@ -12,7 +12,7 @@ Signed-off-by: Jan200101 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/build.zig b/build.zig -index 2d196041b3..c7dec601b4 100644 +index 8967906d7b..7aedcdaa93 100644 --- a/build.zig +++ b/build.zig @@ -197,12 +197,6 @@ pub fn build(b: *std.Build) !void { @@ -29,7 +29,7 @@ index 2d196041b3..c7dec601b4 100644 b.getInstallStep().dependOn(&exe.step); } else { diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig -index 8702acb329..81393610be 100644 +index b649c0103b..6b6b14f0e9 100644 --- a/lib/compiler/build_runner.zig +++ b/lib/compiler/build_runner.zig @@ -202,6 +202,15 @@ pub fn main() !void { @@ -48,7 +48,7 @@ index 8702acb329..81393610be 100644 } else if (mem.eql(u8, arg, "--debounce")) { const next_arg = nextArg(args, &arg_idx) orelse fatalWithHint("expected u16 after '{s}'", .{arg}); -@@ -1364,6 +1373,10 @@ fn usage(b: *std.Build, out_stream: anytype) !void { +@@ -1360,6 +1369,10 @@ fn usage(b: *std.Build, out_stream: anytype) !void { \\ --zig-lib-dir [arg] Override path to Zig lib directory \\ --build-runner [file] Override path to build runner \\ --seed [integer] For shuffling dependency traversal order (default: random) @@ -73,10 +73,10 @@ index 4afdcd2bff..d31d9f3ee0 100644 off, any, diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig -index 616e8f76b4..f70410f612 100644 +index c401a840ba..ae2faf24ba 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig -@@ -1681,7 +1681,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { +@@ -1685,7 +1685,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { try addFlag(&zig_args, "each-lib-rpath", compile.each_lib_rpath); diff --git a/0003-increase-upper-bounds-of-main-zig-executable-to-9G.patch b/0003-increase-upper-bounds-of-main-zig-executable-to-9G.patch deleted file mode 100644 index 207cc73..0000000 --- a/0003-increase-upper-bounds-of-main-zig-executable-to-9G.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e4b31d2e6cba763f4427bc689c7aa27978d47f49 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Mon, 21 Apr 2025 23:28:27 +0200 -Subject: [PATCH 3/5] increase upper bounds of main zig executable to 9G - -On Fedora 42 aarch64 memory usage peaked at 8736403456 bytes - -Signed-off-by: Jan200101 ---- - build.zig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build.zig b/build.zig -index c7dec601b4..bc08eed298 100644 ---- a/build.zig -+++ b/build.zig -@@ -704,7 +704,7 @@ fn addCompilerStep(b: *std.Build, options: AddCompilerStepOptions) *std.Build.St - - const exe = b.addExecutable(.{ - .name = "zig", -- .max_rss = 7_800_000_000, -+ .max_rss = 9_000_000_000, - .root_module = compiler_mod, - }); - exe.stack_size = stack_size; --- -2.49.0 - diff --git a/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch b/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch new file mode 100644 index 0000000..aa1d762 --- /dev/null +++ b/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch @@ -0,0 +1,46 @@ +From e8398fa0049f4152c5de157f495bd2955a246113 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= +Date: Mon, 2 Jun 2025 20:55:01 +0200 +Subject: [PATCH 3/4] std.Build: Demote errors for exceeding max_rss to + warnings. + +We have no control over memory usage on arbitrary systems in the wild. But we +would still like to get the warnings so we can adjust the values based on +observations in the official ZSF CI. + +Closes #23254. +Closes #23638. + +Signed-off-by: Jan200101 +--- + lib/compiler/build_runner.zig | 1 - + lib/std/Build/Step.zig | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig +index 6b6b14f0e9..8eb5c87cd3 100644 +--- a/lib/compiler/build_runner.zig ++++ b/lib/compiler/build_runner.zig +@@ -596,7 +596,6 @@ fn prepare( + if (run.max_rss_is_default) { + std.debug.print("note: use --maxrss to override the default", .{}); + } +- return uncleanExit(); + } + } + } +diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig +index 125b3e7947..9cf0ca475e 100644 +--- a/lib/std/Build/Step.zig ++++ b/lib/std/Build/Step.zig +@@ -247,7 +247,6 @@ pub fn make(s: *Step, options: MakeOptions) error{ MakeFailed, MakeSkipped }!voi + s.result_peak_rss, s.max_rss, + }) catch @panic("OOM"); + s.result_error_msgs.append(arena, msg) catch @panic("OOM"); +- return error.MakeFailed; + } + } + +-- +2.49.0 + diff --git a/0004-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch b/0004-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch deleted file mode 100644 index f91eb91..0000000 --- a/0004-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2f379308820b58049cfe0aaca1eb4f77700d0047 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Thu, 24 Apr 2025 17:35:29 +0200 -Subject: [PATCH 4/5] build: pass zig lib dir as directory instead of as string - -Signed-off-by: Jan200101 ---- - build.zig | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/build.zig b/build.zig -index bc08eed298..7099edfb86 100644 ---- a/build.zig -+++ b/build.zig -@@ -1360,7 +1360,14 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath { - // in a temporary directory - "--cache-root", b.cache_root.path orelse ".", - }); -- cmd.addArgs(&.{ "--zig-lib-dir", b.fmt("{}", .{b.graph.zig_lib_directory}) }); -+ if (b.graph.zig_lib_directory.path) |zig_lib_dir| { -+ cmd.addArgs(&.{"--zig-lib-dir"}); -+ if (fs.path.isAbsolute(zig_lib_dir)) { -+ cmd.addArgs(&.{zig_lib_dir}); -+ } else { -+ cmd.addDirectoryArg(b.path(zig_lib_dir)); -+ } -+ } - cmd.addArgs(&.{"-i"}); - cmd.addFileArg(b.path(b.fmt("doc/langref/{s}", .{entry.name}))); - --- -2.49.0 - diff --git a/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch similarity index 86% rename from 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch rename to 0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch index 4bfc87d..91e1d98 100644 --- a/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch +++ b/0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch @@ -1,7 +1,7 @@ -From 48aa23307d1a47b444854fc09478da6d4ee8e624 Mon Sep 17 00:00:00 2001 +From 10b03d510d753746435f0feb7a1ed6d6f8e2213a Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 11 May 2025 01:09:41 +0200 -Subject: [PATCH 5/5] link.Elf: add root directory of libraries to linker path +Subject: [PATCH 4/4] link.Elf: add root directory of libraries to linker path all the given dynamic shared objects will be linked with an absolute path however they may link to other dynamic shared objects which won't have an absolute path, for this we need to add the library path so that lld can resolve it @@ -11,10 +11,10 @@ Signed-off-by: Jan200101 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/link/Elf.zig b/src/link/Elf.zig -index 53f88101b1..fe2b7abd48 100644 +index 591786cfbc..98ed6fd919 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig -@@ -1938,9 +1938,19 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s +@@ -1932,9 +1932,19 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s // Positional arguments to the linker such as object files. var whole_archive = false; diff --git a/sources b/sources index 310b440..576a429 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (zig-0.14.0.tar.xz) = 046462526ec16d56e8dcead8f8b680e99101090766c443f512f308c25860e8416f6fb2be15d4a387baa94f63a6fea6255374874c1ccf19144facbc02226a503b -SHA512 (zig-0.14.0.tar.xz.minisig) = a5d0946f136b2a28efbfde77f6052cd8745147df64bb70ed30d1d79bad27a52af451631750d592134e1933763ebe5e24215459481864bec0a969c1730527dc2c +SHA512 (zig-0.14.1.tar.xz) = b2b96f241216a46503af95a1175c967ac869391cc87fcb42db2c29d9d513e7ab19c4f4ced2c078481c36aea95f412f3162a8b319aa86b5e2462af567554e8216 +SHA512 (zig-0.14.1.tar.xz.minisig) = 27b2edc29e12396c5f57e6ef512aec10a31e59dc1ca7403769641b95782df47d975ae3bdc23d3becc52323067533b2e6dc4beaece95d1d5c382b1aec6dc8000f diff --git a/zig.spec b/zig.spec index e1afe52..52e39c0 100644 --- a/zig.spec +++ b/zig.spec @@ -43,8 +43,8 @@ } Name: zig -Version: 0.14.0 -Release: 4%{?dist} +Version: 0.14.1 +Release: 1%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 @@ -63,24 +63,17 @@ Patch: 0001-remove-native-lib-directories-from-rpath.patch # https://github.com/ziglang/zig/pull/22516 Patch: 0002-std.Build-add-build-id-option.patch # Zig has a feature that allows the developer to specify max memory usage -# during compilation, this allows the compiler to split up tasks efficiently- +# during compilation, this allows the compiler to split up tasks efficiently. # Annoyingly if any singular step goes above this it will fail after completion -# Upstream suggested simply bumping this limit to 9GB -# https://github.com/ziglang/zig/pull/23638 -Patch: 0003-increase-upper-bounds-of-main-zig-executable-to-9G.patch -# every snippet of code in the documentation is tested to see if it works -# while doing this zig incorrectly passes a relative path to the doctest tool -# which is ran in a temporary directory making that path invalid -# This patch was superseded by https://github.com/ziglang/zig/pull/23894 which -# implements a proper fix, but for our use case this is good enough. -# https://github.com/ziglang/zig/pull/23644 -Patch: 0004-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch -# lld will try to resolve every libary of a shared object thats used for this we need -# add specify the library directories, this patch adds them back. +# this patch has been merged upstream and turns the error into a warning +# https://github.com/ziglang/zig/pull/23894 +Patch: 0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch +# lld will try to resolve every dependency of a shared object that is used directly +# but by default zig won't add any library directories, this patch adds them back. # This wasn't an issue with the cc binary present because zig will call it to figure # out more system paths. # https://github.com/ziglang/zig/pull/23850 -Patch: 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch +Patch: 0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -96,7 +89,7 @@ BuildRequires: help2man BuildRequires: minisign %if %{without bootstrap} -BuildRequires: %{name} = %{version} +BuildRequires: (zig >= 0.14 with zig < 0.15) %endif %if %{with test} @@ -250,6 +243,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Mon Jun 09 2025 Jan200101 - 0.14.1-1 +- Update to 0.14.1 + * Tue May 27 2025 Jan200101 - 0.14.0-4 - add patch to add library directories From 638b1b872e01d28c6029442c121a1043f92b6bd4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 21:18:12 +0000 Subject: [PATCH 02/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- zig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zig.spec b/zig.spec index 52e39c0..0882808 100644 --- a/zig.spec +++ b/zig.spec @@ -44,7 +44,7 @@ Name: zig Version: 0.14.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 @@ -243,6 +243,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.14.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 09 2025 Jan200101 - 0.14.1-1 - Update to 0.14.1 From 55a3e42937dc7779a34b91c52d284fb401597f4c Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 12 Oct 2025 10:34:29 +0200 Subject: [PATCH 03/15] Update to 0.15.2 --- ...ve-native-lib-directories-from-rpath.patch | 10 +-- 0002-std.Build-add-build-id-option.patch | 90 ------------------- ...-errors-for-exceeding-max_rss-to-war.patch | 46 ---------- ...t-directory-of-libraries-to-linker-p.patch | 40 --------- macros.zig | 2 +- sources | 4 +- zig.spec | 39 +++----- 7 files changed, 22 insertions(+), 209 deletions(-) delete mode 100644 0002-std.Build-add-build-id-option.patch delete mode 100644 0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch delete mode 100644 0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch diff --git a/0001-remove-native-lib-directories-from-rpath.patch b/0001-remove-native-lib-directories-from-rpath.patch index b429dfc..2691ac6 100644 --- a/0001-remove-native-lib-directories-from-rpath.patch +++ b/0001-remove-native-lib-directories-from-rpath.patch @@ -1,7 +1,7 @@ -From a80398bc4c83c9f2c7249e6237df2d8ef90ec322 Mon Sep 17 00:00:00 2001 +From 776181c3f8b3d3e34758f376979eb11acd3317e6 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 11 Jun 2024 13:35:37 +0200 -Subject: [PATCH 1/4] remove native lib directories from rpath +Subject: [PATCH] remove native lib directories from rpath Signed-off-by: Jan200101 --- @@ -9,10 +9,10 @@ Signed-off-by: Jan200101 1 file changed, 9 insertions(+) diff --git a/src/main.zig b/src/main.zig -index 911e1dc1af..228c1b73ae 100644 +index 036adbf852..8410c05576 100644 --- a/src/main.zig +++ b/src/main.zig -@@ -4048,6 +4048,15 @@ fn createModule( +@@ -3945,6 +3945,15 @@ fn createModule( try create_module.lib_directories.ensureUnusedCapacity(arena, paths.lib_dirs.items.len); for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(&create_module.lib_directories, path, true); @@ -29,5 +29,5 @@ index 911e1dc1af..228c1b73ae 100644 if (create_module.libc_paths_file) |paths_file| { -- -2.49.0 +2.51.0 diff --git a/0002-std.Build-add-build-id-option.patch b/0002-std.Build-add-build-id-option.patch deleted file mode 100644 index c57d37d..0000000 --- a/0002-std.Build-add-build-id-option.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 80955809c64d3e83a475f26ca9d17ea2e2fb6da7 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Fri, 17 Jan 2025 20:53:30 +0100 -Subject: [PATCH 2/4] std.Build: add build-id option - -Signed-off-by: Jan200101 ---- - build.zig | 6 ------ - lib/compiler/build_runner.zig | 13 +++++++++++++ - lib/std/Build.zig | 2 ++ - lib/std/Build/Step/Compile.zig | 2 +- - 4 files changed, 16 insertions(+), 7 deletions(-) - -diff --git a/build.zig b/build.zig -index 8967906d7b..7aedcdaa93 100644 ---- a/build.zig -+++ b/build.zig -@@ -197,12 +197,6 @@ pub fn build(b: *std.Build) !void { - exe.pie = pie; - exe.entitlements = entitlements; - -- exe.build_id = b.option( -- std.zig.BuildId, -- "build-id", -- "Request creation of '.note.gnu.build-id' section", -- ); -- - if (no_bin) { - b.getInstallStep().dependOn(&exe.step); - } else { -diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig -index b649c0103b..6b6b14f0e9 100644 ---- a/lib/compiler/build_runner.zig -+++ b/lib/compiler/build_runner.zig -@@ -202,6 +202,15 @@ pub fn main() !void { - next_arg, @errorName(err), - }); - }; -+ } else if (mem.eql(u8, arg, "--build-id")) { -+ builder.build_id = .fast; -+ } else if (mem.startsWith(u8, arg, "--build-id=")) { -+ const style = arg["--build-id=".len..]; -+ builder.build_id = std.zig.BuildId.parse(style) catch |err| { -+ fatal("unable to parse --build-id style '{s}': {s}", .{ -+ style, @errorName(err), -+ }); -+ }; - } else if (mem.eql(u8, arg, "--debounce")) { - const next_arg = nextArg(args, &arg_idx) orelse - fatalWithHint("expected u16 after '{s}'", .{arg}); -@@ -1360,6 +1369,10 @@ fn usage(b: *std.Build, out_stream: anytype) !void { - \\ --zig-lib-dir [arg] Override path to Zig lib directory - \\ --build-runner [file] Override path to build runner - \\ --seed [integer] For shuffling dependency traversal order (default: random) -+ \\ --build-id[=style] At a minor link-time expense, coordinates stripped binaries -+ \\ fast, uuid, sha1, md5 with debug symbols via a '.note.gnu.build-id' section -+ \\ 0x[hexstring] Maximum 32 bytes -+ \\ none (default) Disable build-id - \\ --debug-log [scope] Enable debugging the compiler - \\ --debug-pkg-config Fail if unknown pkg-config flags encountered - \\ --debug-rt Debug compiler runtime libraries -diff --git a/lib/std/Build.zig b/lib/std/Build.zig -index 4afdcd2bff..d31d9f3ee0 100644 ---- a/lib/std/Build.zig -+++ b/lib/std/Build.zig -@@ -94,6 +94,8 @@ available_deps: AvailableDeps, - - release_mode: ReleaseMode, - -+build_id: ?std.zig.BuildId = null, -+ - pub const ReleaseMode = enum { - off, - any, -diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig -index c401a840ba..ae2faf24ba 100644 ---- a/lib/std/Build/Step/Compile.zig -+++ b/lib/std/Build/Step/Compile.zig -@@ -1685,7 +1685,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 { - - try addFlag(&zig_args, "each-lib-rpath", compile.each_lib_rpath); - -- if (compile.build_id) |build_id| { -+ if (compile.build_id orelse b.build_id) |build_id| { - try zig_args.append(switch (build_id) { - .hexstring => |hs| b.fmt("--build-id=0x{s}", .{ - std.fmt.fmtSliceHexLower(hs.toSlice()), --- -2.49.0 - diff --git a/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch b/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch deleted file mode 100644 index aa1d762..0000000 --- a/0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e8398fa0049f4152c5de157f495bd2955a246113 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= -Date: Mon, 2 Jun 2025 20:55:01 +0200 -Subject: [PATCH 3/4] std.Build: Demote errors for exceeding max_rss to - warnings. - -We have no control over memory usage on arbitrary systems in the wild. But we -would still like to get the warnings so we can adjust the values based on -observations in the official ZSF CI. - -Closes #23254. -Closes #23638. - -Signed-off-by: Jan200101 ---- - lib/compiler/build_runner.zig | 1 - - lib/std/Build/Step.zig | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig -index 6b6b14f0e9..8eb5c87cd3 100644 ---- a/lib/compiler/build_runner.zig -+++ b/lib/compiler/build_runner.zig -@@ -596,7 +596,6 @@ fn prepare( - if (run.max_rss_is_default) { - std.debug.print("note: use --maxrss to override the default", .{}); - } -- return uncleanExit(); - } - } - } -diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig -index 125b3e7947..9cf0ca475e 100644 ---- a/lib/std/Build/Step.zig -+++ b/lib/std/Build/Step.zig -@@ -247,7 +247,6 @@ pub fn make(s: *Step, options: MakeOptions) error{ MakeFailed, MakeSkipped }!voi - s.result_peak_rss, s.max_rss, - }) catch @panic("OOM"); - s.result_error_msgs.append(arena, msg) catch @panic("OOM"); -- return error.MakeFailed; - } - } - --- -2.49.0 - diff --git a/0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch deleted file mode 100644 index 91e1d98..0000000 --- a/0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 10b03d510d753746435f0feb7a1ed6d6f8e2213a Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Sun, 11 May 2025 01:09:41 +0200 -Subject: [PATCH 4/4] link.Elf: add root directory of libraries to linker path - -all the given dynamic shared objects will be linked with an absolute path however they may link to other dynamic shared objects which won't have an absolute path, for this we need to add the library path so that lld can resolve it - -Signed-off-by: Jan200101 ---- - src/link/Elf.zig | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/src/link/Elf.zig b/src/link/Elf.zig -index 591786cfbc..98ed6fd919 100644 ---- a/src/link/Elf.zig -+++ b/src/link/Elf.zig -@@ -1932,9 +1932,19 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s - // Positional arguments to the linker such as object files. - var whole_archive = false; - -+ var lib_directories = std.StringArrayHashMap(void).init(gpa); -+ defer lib_directories.deinit(); -+ - for (self.base.comp.link_inputs) |link_input| switch (link_input) { - .res => unreachable, // Windows-only -- .dso => continue, -+ .dso => |dso| { -+ if (dso.path.root_dir.path) |root_dir| { -+ const lib_dir = try lib_directories.getOrPut(root_dir); -+ if (lib_dir.found_existing) continue; -+ try argv.append("-L"); -+ try argv.append(root_dir); -+ } -+ }, - .object, .archive => |obj| { - if (obj.must_link and !whole_archive) { - try argv.append("-whole-archive"); --- -2.49.0 - diff --git a/macros.zig b/macros.zig index 0ab227e..3fc6792 100644 --- a/macros.zig +++ b/macros.zig @@ -28,7 +28,7 @@ %_zig_general_options --verbose --release=%{_zig_release_mode} --build-id=sha1 --summary all %_zig_project_options -Dtarget=%{_zig_target} -Dcpu=%{_zig_cpu} %_zig_system_integration --system "%{_zig_package_dir}" -%_zig_advanced_options --cache-dir "%{_zig_cache_dir}" --global-cache-dir "%{_zig_cache_dir}" +%_zig_advanced_options -fallow-so-scripts --cache-dir "%{_zig_cache_dir}" --global-cache-dir "%{_zig_cache_dir}" %_zig_build_options %{?_zig_general_options} %{?_zig_project_options} %{?_zig_system_integration} %{?_zig_advanced_options} %{?zig_build_options} %_zig_install_options --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" %{?zig_install_options} diff --git a/sources b/sources index 576a429..b3ceab1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (zig-0.14.1.tar.xz) = b2b96f241216a46503af95a1175c967ac869391cc87fcb42db2c29d9d513e7ab19c4f4ced2c078481c36aea95f412f3162a8b319aa86b5e2462af567554e8216 -SHA512 (zig-0.14.1.tar.xz.minisig) = 27b2edc29e12396c5f57e6ef512aec10a31e59dc1ca7403769641b95782df47d975ae3bdc23d3becc52323067533b2e6dc4beaece95d1d5c382b1aec6dc8000f +SHA512 (zig-0.15.2.tar.xz) = 56b0f2b14da8603bf86ab672fd1fe38c2b04d8d90512839104e85b0fbda94aaf07fecf76b238d7b17715f9fee24be46c1830a96a0b5993cff6adef91b83f3201 +SHA512 (zig-0.15.2.tar.xz.minisig) = d951c167561599a11ac1881c0c12d17be5d8ea3d214b96403acaa5b40f62a6bee48602dcbf963046897481525b801023fe419daca6d6811b495c44a242777a13 diff --git a/zig.spec b/zig.spec index 0882808..5af35f6 100644 --- a/zig.spec +++ b/zig.spec @@ -4,11 +4,11 @@ %global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U # note here at which Fedora or EL release we need to use compat LLVM packages -%if 0%{?fedora} >= 42 || 0%{?rhel} >= 9 -%define llvm_compat 19 +%if 0%{?fedora} >= 43 || 0%{?rhel} >= 9 +%define llvm_compat 20 %endif -%global llvm_version 19.0.0 +%global llvm_version 20.0.0 %bcond bootstrap 0 %bcond docs %{without bootstrap} @@ -43,8 +43,8 @@ } Name: zig -Version: 0.14.1 -Release: 2%{?dist} +Version: 0.15.2 +Release: 1%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 @@ -56,24 +56,6 @@ Source2: macros.%{name} # this is unlikely to be upstreamed in its current state because upstream # wants to work around the shortcomings of NixOS Patch: 0001-remove-native-lib-directories-from-rpath.patch -# Adds a build option for setting the build-id -# some projects are not programmed to handle a build-id's -# by having it as a flag we can make sure no developer runs into -# any trouble because of packaging demands -# https://github.com/ziglang/zig/pull/22516 -Patch: 0002-std.Build-add-build-id-option.patch -# Zig has a feature that allows the developer to specify max memory usage -# during compilation, this allows the compiler to split up tasks efficiently. -# Annoyingly if any singular step goes above this it will fail after completion -# this patch has been merged upstream and turns the error into a warning -# https://github.com/ziglang/zig/pull/23894 -Patch: 0003-std.Build-Demote-errors-for-exceeding-max_rss-to-war.patch -# lld will try to resolve every dependency of a shared object that is used directly -# but by default zig won't add any library directories, this patch adds them back. -# This wasn't an issue with the cc binary present because zig will call it to figure -# out more system paths. -# https://github.com/ziglang/zig/pull/23850 -Patch: 0004-link.Elf-add-root-directory-of-libraries-to-linker-p.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -89,7 +71,7 @@ BuildRequires: help2man BuildRequires: minisign %if %{without bootstrap} -BuildRequires: (zig >= 0.14 with zig < 0.15) +BuildRequires: (zig >= 0.15 with zig < 0.16) %endif %if %{with test} @@ -164,6 +146,11 @@ rm -f stage1/zig1.wasm %build +# Fedora supports using ccache systemwide +# Zig generates a large C file for bootstrapping which does not +# behave well with ccache so we explicitly disable it. +export CCACHE_DISABLE=1 + # zig doesn't know how to dynamically link llvm on its own so we need cmake to generate a header ahead of time # if we provide the header we need to also build zigcpp @@ -243,6 +230,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Sun Oct 12 2025 Jan200101 - 0.15.2-1 +- Update to 0.15.2 + * Fri Jul 25 2025 Fedora Release Engineering - 0.14.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild @@ -332,7 +322,6 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} * Sat Jan 22 2022 Fedora Release Engineering - 0.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - * Mon Dec 20 2021 Jan Drögehoff - 0.9.0-1 - Update to 0.9.0 From 28b9e0c24c298e69546f5cbbd19444ab7d078a2b Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 14 Dec 2025 13:34:27 +0100 Subject: [PATCH 04/15] verify filename in minisig signed comment this is an additional layer to protect against the wrong archive version being downloaded. --- zig.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zig.spec b/zig.spec index 5af35f6..7f7c4c9 100644 --- a/zig.spec +++ b/zig.spec @@ -5,7 +5,7 @@ # note here at which Fedora or EL release we need to use compat LLVM packages %if 0%{?fedora} >= 43 || 0%{?rhel} >= 9 -%define llvm_compat 20 +%global llvm_compat 20 %endif %global llvm_version 20.0.0 @@ -46,11 +46,13 @@ Name: zig Version: 0.15.2 Release: 1%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software +# The minisign file references a specific archive name so we store for ease of use +%global archive_name %{name}-%{version}.tar.xz License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 URL: https://ziglang.org -Source0: %{url}/download/%{version}/%{name}-%{version}.tar.xz -Source1: %{url}/download/%{version}/%{name}-%{version}.tar.xz.minisig +Source0: %{url}/download/%{version}/%{archive_name} +Source1: %{url}/download/%{version}/%{archive_name}.minisig Source2: macros.%{name} # Remove native lib directories from rpath # this is unlikely to be upstreamed in its current state because upstream @@ -136,7 +138,7 @@ This package contains common RPM macros for %{name}. %endif %prep -/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} +/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep "file:%{archive_name}" %autosetup -p1 %if %{without bootstrap} From 0c4d9963b58046d6916c9dcf10a4d6d5f44b3063 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 4 Jan 2026 15:56:00 +0100 Subject: [PATCH 05/15] force minisign check to be plaintext --- zig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zig.spec b/zig.spec index 7f7c4c9..815619c 100644 --- a/zig.spec +++ b/zig.spec @@ -138,7 +138,7 @@ This package contains common RPM macros for %{name}. %endif %prep -/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep "file:%{archive_name}" +/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" %autosetup -p1 %if %{without bootstrap} From 61f511df2191ffbdfcd209cae22ef5df0c0f74a7 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 4 Jan 2026 15:26:23 +0100 Subject: [PATCH 06/15] add patch to strip out LLVM targets for EPEL support --- ...ve-native-lib-directories-from-rpath.patch | 4 +- ...ve-unsupported-LLVM-targets-for-EPEL.patch | 254 ++++++++++++++++++ zig.spec | 14 +- 3 files changed, 267 insertions(+), 5 deletions(-) create mode 100644 0002-Remove-unsupported-LLVM-targets-for-EPEL.patch diff --git a/0001-remove-native-lib-directories-from-rpath.patch b/0001-remove-native-lib-directories-from-rpath.patch index 2691ac6..68d498b 100644 --- a/0001-remove-native-lib-directories-from-rpath.patch +++ b/0001-remove-native-lib-directories-from-rpath.patch @@ -1,7 +1,7 @@ From 776181c3f8b3d3e34758f376979eb11acd3317e6 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 11 Jun 2024 13:35:37 +0200 -Subject: [PATCH] remove native lib directories from rpath +Subject: [PATCH 1/2] remove native lib directories from rpath Signed-off-by: Jan200101 --- @@ -29,5 +29,5 @@ index 036adbf852..8410c05576 100644 if (create_module.libc_paths_file) |paths_file| { -- -2.51.0 +2.52.0 diff --git a/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch b/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch new file mode 100644 index 0000000..1ce06be --- /dev/null +++ b/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch @@ -0,0 +1,254 @@ +From ab92fe5f0be7a49fa2c97957bebf6278a1b69aaf Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Sun, 4 Jan 2026 12:41:39 +0100 +Subject: [PATCH 2/2] Remove unsupported LLVM targets for RHEL + +LLVM for RHEL is only build with a subset of targets +this blocks zig at the configuration stage. +This commit simply swaps them out with the one from +https://src.fedoraproject.org/rpms/llvm/blob/rawhide/f/llvm.spec + +Signed-off-by: Jan200101 +--- + cmake/Findllvm.cmake | 2 +- + src/codegen/llvm.zig | 97 ++++++++++---------------------------------- + src/target.zig | 43 +++++++++++--------- + 3 files changed, 45 insertions(+), 97 deletions(-) + +diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake +index 5ff5de869c..5430ef9d59 100644 +--- a/cmake/Findllvm.cmake ++++ b/cmake/Findllvm.cmake +@@ -83,7 +83,7 @@ if(ZIG_USE_LLVM_CONFIG) + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REPLACE " " ";" LLVM_TARGETS_BUILT "${LLVM_TARGETS_BUILT_SPACES}") + +- set(ZIG_LLVM_REQUIRED_TARGETS "AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore") ++ set(ZIG_LLVM_REQUIRED_TARGETS "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;BPF;WebAssembly;RISCV") + + set(ZIG_LLVM_REQUIRED_TARGETS_ENABLED TRUE) + foreach(TARGET_NAME IN LISTS ZIG_LLVM_REQUIRED_TARGETS) +diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig +index bd2c7bd022..a98fbab47e 100644 +--- a/src/codegen/llvm.zig ++++ b/src/codegen/llvm.zig +@@ -13016,20 +13016,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + llvm.LLVMInitializeAMDGPUAsmPrinter(); + llvm.LLVMInitializeAMDGPUAsmParser(); + }, +- .thumb, .thumbeb, .arm, .armeb => { +- llvm.LLVMInitializeARMTarget(); +- llvm.LLVMInitializeARMTargetInfo(); +- llvm.LLVMInitializeARMTargetMC(); +- llvm.LLVMInitializeARMAsmPrinter(); +- llvm.LLVMInitializeARMAsmParser(); +- }, +- .avr => { +- llvm.LLVMInitializeAVRTarget(); +- llvm.LLVMInitializeAVRTargetInfo(); +- llvm.LLVMInitializeAVRTargetMC(); +- llvm.LLVMInitializeAVRAsmPrinter(); +- llvm.LLVMInitializeAVRAsmParser(); +- }, + .bpfel, .bpfeb => { + llvm.LLVMInitializeBPFTarget(); + llvm.LLVMInitializeBPFTargetInfo(); +@@ -13037,34 +13023,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + llvm.LLVMInitializeBPFAsmPrinter(); + llvm.LLVMInitializeBPFAsmParser(); + }, +- .hexagon => { +- llvm.LLVMInitializeHexagonTarget(); +- llvm.LLVMInitializeHexagonTargetInfo(); +- llvm.LLVMInitializeHexagonTargetMC(); +- llvm.LLVMInitializeHexagonAsmPrinter(); +- llvm.LLVMInitializeHexagonAsmParser(); +- }, +- .lanai => { +- llvm.LLVMInitializeLanaiTarget(); +- llvm.LLVMInitializeLanaiTargetInfo(); +- llvm.LLVMInitializeLanaiTargetMC(); +- llvm.LLVMInitializeLanaiAsmPrinter(); +- llvm.LLVMInitializeLanaiAsmParser(); +- }, +- .mips, .mipsel, .mips64, .mips64el => { +- llvm.LLVMInitializeMipsTarget(); +- llvm.LLVMInitializeMipsTargetInfo(); +- llvm.LLVMInitializeMipsTargetMC(); +- llvm.LLVMInitializeMipsAsmPrinter(); +- llvm.LLVMInitializeMipsAsmParser(); +- }, +- .msp430 => { +- llvm.LLVMInitializeMSP430Target(); +- llvm.LLVMInitializeMSP430TargetInfo(); +- llvm.LLVMInitializeMSP430TargetMC(); +- llvm.LLVMInitializeMSP430AsmPrinter(); +- llvm.LLVMInitializeMSP430AsmParser(); +- }, + .nvptx, .nvptx64 => { + llvm.LLVMInitializeNVPTXTarget(); + llvm.LLVMInitializeNVPTXTargetInfo(); +@@ -13086,13 +13044,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + llvm.LLVMInitializeRISCVAsmPrinter(); + llvm.LLVMInitializeRISCVAsmParser(); + }, +- .sparc, .sparc64 => { +- llvm.LLVMInitializeSparcTarget(); +- llvm.LLVMInitializeSparcTargetInfo(); +- llvm.LLVMInitializeSparcTargetMC(); +- llvm.LLVMInitializeSparcAsmPrinter(); +- llvm.LLVMInitializeSparcAsmParser(); +- }, + .s390x => { + llvm.LLVMInitializeSystemZTarget(); + llvm.LLVMInitializeSystemZTargetInfo(); +@@ -13123,13 +13074,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + llvm.LLVMInitializeXtensaAsmParser(); + } + }, +- .xcore => { +- llvm.LLVMInitializeXCoreTarget(); +- llvm.LLVMInitializeXCoreTargetInfo(); +- llvm.LLVMInitializeXCoreTargetMC(); +- llvm.LLVMInitializeXCoreAsmPrinter(); +- // There is no LLVMInitializeXCoreAsmParser function. +- }, + .m68k => { + if (build_options.llvm_has_m68k) { + llvm.LLVMInitializeM68kTarget(); +@@ -13148,13 +13092,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + llvm.LLVMInitializeCSKYAsmParser(); + } + }, +- .ve => { +- llvm.LLVMInitializeVETarget(); +- llvm.LLVMInitializeVETargetInfo(); +- llvm.LLVMInitializeVETargetMC(); +- llvm.LLVMInitializeVEAsmPrinter(); +- llvm.LLVMInitializeVEAsmParser(); +- }, + .arc => { + if (build_options.llvm_has_arc) { + llvm.LLVMInitializeARCTarget(); +@@ -13164,21 +13101,29 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + // There is no LLVMInitializeARCAsmParser function. + } + }, +- .loongarch32, .loongarch64 => { +- llvm.LLVMInitializeLoongArchTarget(); +- llvm.LLVMInitializeLoongArchTargetInfo(); +- llvm.LLVMInitializeLoongArchTargetMC(); +- llvm.LLVMInitializeLoongArchAsmPrinter(); +- llvm.LLVMInitializeLoongArchAsmParser(); +- }, ++ ++ // Disabled LLVM targets ++ .thumb, ++ .thumbeb, ++ .arm, ++ .armeb, ++ .avr, ++ .hexagon, ++ .lanai, ++ .mips, ++ .mipsel, ++ .mips64, ++ .mips64el, ++ .msp430, ++ .sparc, ++ .sparc64, ++ .xcore, ++ .ve, ++ .loongarch32, ++ .loongarch64, + .spirv32, + .spirv64, +- => { +- llvm.LLVMInitializeSPIRVTarget(); +- llvm.LLVMInitializeSPIRVTargetInfo(); +- llvm.LLVMInitializeSPIRVTargetMC(); +- llvm.LLVMInitializeSPIRVAsmPrinter(); +- }, ++ => unreachable, + + // LLVM does does not have a backend for these. + .kalimba, +diff --git a/src/target.zig b/src/target.zig +index f8201d691b..8491912bd5 100644 +--- a/src/target.zig ++++ b/src/target.zig +@@ -166,23 +166,12 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) + } + + return switch (target.cpu.arch) { +- .arm, +- .armeb, + .aarch64, + .aarch64_be, + .arc, +- .avr, + .bpfel, + .bpfeb, +- .hexagon, +- .loongarch32, +- .loongarch64, + .m68k, +- .mips, +- .mipsel, +- .mips64, +- .mips64el, +- .msp430, + .powerpc, + .powerpcle, + .powerpc64, +@@ -190,24 +179,38 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) + .amdgcn, + .riscv32, + .riscv64, +- .sparc, +- .sparc64, +- .spirv32, +- .spirv64, + .s390x, +- .thumb, +- .thumbeb, + .x86, + .x86_64, +- .xcore, + .nvptx, + .nvptx64, +- .lanai, + .wasm32, + .wasm64, +- .ve, + => true, + ++ // Disabled LLVM targets ++ .thumb, ++ .thumbeb, ++ .arm, ++ .armeb, ++ .avr, ++ .hexagon, ++ .lanai, ++ .mips, ++ .mipsel, ++ .mips64, ++ .mips64el, ++ .msp430, ++ .sparc, ++ .sparc64, ++ .xcore, ++ .ve, ++ .loongarch32, ++ .loongarch64, ++ .spirv32, ++ .spirv64, ++ => false, ++ + // LLVM backend exists but can produce neither assembly nor object files. + .csky, + .xtensa, +-- +2.52.0 + diff --git a/zig.spec b/zig.spec index 815619c..cd26f63 100644 --- a/zig.spec +++ b/zig.spec @@ -4,7 +4,7 @@ %global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U # note here at which Fedora or EL release we need to use compat LLVM packages -%if 0%{?fedora} >= 43 || 0%{?rhel} >= 9 +%if 0%{?fedora} >= 43 || 0%{?rhel} >= 11 %global llvm_compat 20 %endif @@ -57,7 +57,10 @@ Source2: macros.%{name} # Remove native lib directories from rpath # this is unlikely to be upstreamed in its current state because upstream # wants to work around the shortcomings of NixOS -Patch: 0001-remove-native-lib-directories-from-rpath.patch +Patch0: 0001-remove-native-lib-directories-from-rpath.patch +# LLVM on RHEL/EPEL only provides fewer targets so we patch the required targets down +# Targets come from https://src.fedoraproject.org/rpms/llvm/blob/rawhide/f/llvm.spec +Patch1: 0002-Remove-unsupported-LLVM-targets-for-EPEL.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -140,7 +143,12 @@ This package contains common RPM macros for %{name}. %prep /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" -%autosetup -p1 +%autosetup -N +%patch 0 -p1 +%if 0%{?rhel} +%patch 1 -p1 +%endif + %if %{without bootstrap} # Ensure that the pre-build stage1 binary is not used rm -f stage1/zig1.wasm From 393d1df9485fa960e346845738ef3d90d16c07d0 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 4 Jan 2026 15:54:15 +0100 Subject: [PATCH 07/15] limit architectures for EPEL Zig depends on a C compiler (gcc for EPEL/fedora) during bootstraping by transpiling itself to C then compiling that. The C code that is generated runs into edge cases with older gcc versions that triggers unique errors on more exotic hardware such as RISC or ARM changes to this need to be copied into zig-srpm-macros --- zig.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zig.spec b/zig.spec index cd26f63..2a566b7 100644 --- a/zig.spec +++ b/zig.spec @@ -1,5 +1,11 @@ +%if 0%{?rhel} +# Zig depends on a C compiler (gcc) during bootstraping +# older versions of gcc fail to compile the transpiled source so we limit it to x86_64 +%global zig_arches x86_64 +%else # https://ziglang.org/download/VERSION/release-notes.html#Support-Table %global zig_arches x86_64 aarch64 riscv64 %{mips64} +%endif # Signing key from https://ziglang.org/download/ %global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U From b9abbed4a8af4cc471ac2e6daeb36b5ee4f8510d Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 4 Jan 2026 17:22:54 +0100 Subject: [PATCH 08/15] use relative cache dir, put cache into vpath for clean separation The zig cache dir used to be specified as an absolute path because of an issue with build processes for local subdependencies changing the current working directory incorrectly, this has since been fixed. Additionally %{builddir} is a new construct that is not available under EPEL, %{_builddir}/%{?buildsubdir} was considered however there is no need for an absolute path at this time. The generated objects should never match on different architectures due to how the cache system is designed however there this may cause confusion while debugging so its been put under %{_vpath_builddir}. Specifying a direct cache name would be possible however I think _vpath_builddir has become pretty well known to maintainers and would best be suited for this. --- macros.zig | 2 +- zig.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.zig b/macros.zig index 3fc6792..8f43673 100644 --- a/macros.zig +++ b/macros.zig @@ -2,7 +2,7 @@ %zig %{_bindir}/zig -%_zig_cache_dir %{builddir}/zig-cache +%_zig_cache_dir %{_vpath_builddir}/zig-cache %_zig_package_dir %{_zig_cache_dir}/p # expected features for each arch when targeting baseline diff --git a/zig.spec b/zig.spec index 2a566b7..378fb17 100644 --- a/zig.spec +++ b/zig.spec @@ -21,7 +21,7 @@ %bcond macro %{without bootstrap} %bcond test 1 -%global zig_cache_dir %{builddir}/zig-cache +%global zig_cache_dir %{_vpath_builddir}/zig-cache %global zig_build_options %{shrink: \ --verbose \ From 38f18f6459e4d0b40fdd5a1d49e6833576e370bf Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 4 Jan 2026 17:56:04 +0100 Subject: [PATCH 09/15] Rebuilt for EPEL --- zig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zig.spec b/zig.spec index 378fb17..35a3366 100644 --- a/zig.spec +++ b/zig.spec @@ -50,7 +50,7 @@ Name: zig Version: 0.15.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software # The minisign file references a specific archive name so we store for ease of use %global archive_name %{name}-%{version}.tar.xz @@ -246,6 +246,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Sun Jan 04 2026 Jan200101 - 0.15.2-2 +- Rebuilt for EPEL + * Sun Oct 12 2025 Jan200101 - 0.15.2-1 - Update to 0.15.2 From b5b6b37ec0d53a1704e681f7e6de6b90c631a2c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 21:08:07 +0000 Subject: [PATCH 10/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- zig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zig.spec b/zig.spec index 35a3366..8bd9acb 100644 --- a/zig.spec +++ b/zig.spec @@ -50,7 +50,7 @@ Name: zig Version: 0.15.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software # The minisign file references a specific archive name so we store for ease of use %global archive_name %{name}-%{version}.tar.xz @@ -246,6 +246,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 0.15.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Sun Jan 04 2026 Jan200101 - 0.15.2-2 - Rebuilt for EPEL From 1ffefc4662fefa18cc95b427acff7d8c08de4553 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sat, 25 Apr 2026 14:34:50 +0200 Subject: [PATCH 11/15] Update to 0.16.0 --- ...ve-native-lib-directories-from-rpath.patch | 12 +- ...ve-unsupported-LLVM-targets-for-EPEL.patch | 174 +++++++++--------- macros.zig | 12 +- sources | 4 +- zig.spec | 32 +++- 5 files changed, 128 insertions(+), 106 deletions(-) diff --git a/0001-remove-native-lib-directories-from-rpath.patch b/0001-remove-native-lib-directories-from-rpath.patch index 68d498b..24db582 100644 --- a/0001-remove-native-lib-directories-from-rpath.patch +++ b/0001-remove-native-lib-directories-from-rpath.patch @@ -1,6 +1,6 @@ -From 776181c3f8b3d3e34758f376979eb11acd3317e6 Mon Sep 17 00:00:00 2001 +From a865b3569ace118cc1c1cd8d5d130ec316b0307d Mon Sep 17 00:00:00 2001 From: Jan200101 -Date: Tue, 11 Jun 2024 13:35:37 +0200 +Date: Tue, 14 Apr 2026 19:04:40 +0200 Subject: [PATCH 1/2] remove native lib directories from rpath Signed-off-by: Jan200101 @@ -9,13 +9,13 @@ Signed-off-by: Jan200101 1 file changed, 9 insertions(+) diff --git a/src/main.zig b/src/main.zig -index 036adbf852..8410c05576 100644 +index 0395a21a5f..86b6d9f86b 100644 --- a/src/main.zig +++ b/src/main.zig -@@ -3945,6 +3945,15 @@ fn createModule( +@@ -4102,6 +4102,15 @@ fn createModule( try create_module.lib_directories.ensureUnusedCapacity(arena, paths.lib_dirs.items.len); - for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(&create_module.lib_directories, path, true); + for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(io, &create_module.lib_directories, path, true); + + for (paths.lib_dirs.items) |native_lib_dir| { + for (0.., create_module.rpath_list.items) |i, rpath_dir| { @@ -29,5 +29,5 @@ index 036adbf852..8410c05576 100644 if (create_module.libc_paths_file) |paths_file| { -- -2.52.0 +2.53.0 diff --git a/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch b/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch index 1ce06be..a8b942f 100644 --- a/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch +++ b/0002-Remove-unsupported-LLVM-targets-for-EPEL.patch @@ -1,6 +1,6 @@ -From ab92fe5f0be7a49fa2c97957bebf6278a1b69aaf Mon Sep 17 00:00:00 2001 +From 803935baf6a4730426afbb746adfd00c0ffc0f39 Mon Sep 17 00:00:00 2001 From: Jan200101 -Date: Sun, 4 Jan 2026 12:41:39 +0100 +Date: Tue, 14 Apr 2026 19:20:26 +0200 Subject: [PATCH 2/2] Remove unsupported LLVM targets for RHEL LLVM for RHEL is only build with a subset of targets @@ -16,130 +16,130 @@ Signed-off-by: Jan200101 3 files changed, 45 insertions(+), 97 deletions(-) diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake -index 5ff5de869c..5430ef9d59 100644 +index 0c08d4f0ac..ed4da12044 100644 --- a/cmake/Findllvm.cmake +++ b/cmake/Findllvm.cmake @@ -83,7 +83,7 @@ if(ZIG_USE_LLVM_CONFIG) OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE " " ";" LLVM_TARGETS_BUILT "${LLVM_TARGETS_BUILT_SPACES}") -- set(ZIG_LLVM_REQUIRED_TARGETS "AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;RISCV;Sparc;SystemZ;VE;WebAssembly;X86;XCore") +- set(ZIG_LLVM_REQUIRED_TARGETS "AArch64;AMDGPU;ARM;AVR;BPF;Hexagon;Lanai;LoongArch;Mips;MSP430;NVPTX;PowerPC;RISCV;SPIRV;Sparc;SystemZ;VE;WebAssembly;X86;XCore") + set(ZIG_LLVM_REQUIRED_TARGETS "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;BPF;WebAssembly;RISCV") set(ZIG_LLVM_REQUIRED_TARGETS_ENABLED TRUE) foreach(TARGET_NAME IN LISTS ZIG_LLVM_REQUIRED_TARGETS) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig -index bd2c7bd022..a98fbab47e 100644 +index 1ba3b272da..1ac1f6adc8 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig -@@ -13016,20 +13016,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { - llvm.LLVMInitializeAMDGPUAsmPrinter(); - llvm.LLVMInitializeAMDGPUAsmParser(); +@@ -4736,20 +4736,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeAMDGPUAsmPrinter(); + bindings.LLVMInitializeAMDGPUAsmParser(); }, - .thumb, .thumbeb, .arm, .armeb => { -- llvm.LLVMInitializeARMTarget(); -- llvm.LLVMInitializeARMTargetInfo(); -- llvm.LLVMInitializeARMTargetMC(); -- llvm.LLVMInitializeARMAsmPrinter(); -- llvm.LLVMInitializeARMAsmParser(); +- bindings.LLVMInitializeARMTarget(); +- bindings.LLVMInitializeARMTargetInfo(); +- bindings.LLVMInitializeARMTargetMC(); +- bindings.LLVMInitializeARMAsmPrinter(); +- bindings.LLVMInitializeARMAsmParser(); - }, - .avr => { -- llvm.LLVMInitializeAVRTarget(); -- llvm.LLVMInitializeAVRTargetInfo(); -- llvm.LLVMInitializeAVRTargetMC(); -- llvm.LLVMInitializeAVRAsmPrinter(); -- llvm.LLVMInitializeAVRAsmParser(); +- bindings.LLVMInitializeAVRTarget(); +- bindings.LLVMInitializeAVRTargetInfo(); +- bindings.LLVMInitializeAVRTargetMC(); +- bindings.LLVMInitializeAVRAsmPrinter(); +- bindings.LLVMInitializeAVRAsmParser(); - }, .bpfel, .bpfeb => { - llvm.LLVMInitializeBPFTarget(); - llvm.LLVMInitializeBPFTargetInfo(); -@@ -13037,34 +13023,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { - llvm.LLVMInitializeBPFAsmPrinter(); - llvm.LLVMInitializeBPFAsmParser(); + bindings.LLVMInitializeBPFTarget(); + bindings.LLVMInitializeBPFTargetInfo(); +@@ -4757,34 +4743,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeBPFAsmPrinter(); + bindings.LLVMInitializeBPFAsmParser(); }, - .hexagon => { -- llvm.LLVMInitializeHexagonTarget(); -- llvm.LLVMInitializeHexagonTargetInfo(); -- llvm.LLVMInitializeHexagonTargetMC(); -- llvm.LLVMInitializeHexagonAsmPrinter(); -- llvm.LLVMInitializeHexagonAsmParser(); +- bindings.LLVMInitializeHexagonTarget(); +- bindings.LLVMInitializeHexagonTargetInfo(); +- bindings.LLVMInitializeHexagonTargetMC(); +- bindings.LLVMInitializeHexagonAsmPrinter(); +- bindings.LLVMInitializeHexagonAsmParser(); - }, - .lanai => { -- llvm.LLVMInitializeLanaiTarget(); -- llvm.LLVMInitializeLanaiTargetInfo(); -- llvm.LLVMInitializeLanaiTargetMC(); -- llvm.LLVMInitializeLanaiAsmPrinter(); -- llvm.LLVMInitializeLanaiAsmParser(); +- bindings.LLVMInitializeLanaiTarget(); +- bindings.LLVMInitializeLanaiTargetInfo(); +- bindings.LLVMInitializeLanaiTargetMC(); +- bindings.LLVMInitializeLanaiAsmPrinter(); +- bindings.LLVMInitializeLanaiAsmParser(); - }, - .mips, .mipsel, .mips64, .mips64el => { -- llvm.LLVMInitializeMipsTarget(); -- llvm.LLVMInitializeMipsTargetInfo(); -- llvm.LLVMInitializeMipsTargetMC(); -- llvm.LLVMInitializeMipsAsmPrinter(); -- llvm.LLVMInitializeMipsAsmParser(); +- bindings.LLVMInitializeMipsTarget(); +- bindings.LLVMInitializeMipsTargetInfo(); +- bindings.LLVMInitializeMipsTargetMC(); +- bindings.LLVMInitializeMipsAsmPrinter(); +- bindings.LLVMInitializeMipsAsmParser(); - }, - .msp430 => { -- llvm.LLVMInitializeMSP430Target(); -- llvm.LLVMInitializeMSP430TargetInfo(); -- llvm.LLVMInitializeMSP430TargetMC(); -- llvm.LLVMInitializeMSP430AsmPrinter(); -- llvm.LLVMInitializeMSP430AsmParser(); +- bindings.LLVMInitializeMSP430Target(); +- bindings.LLVMInitializeMSP430TargetInfo(); +- bindings.LLVMInitializeMSP430TargetMC(); +- bindings.LLVMInitializeMSP430AsmPrinter(); +- bindings.LLVMInitializeMSP430AsmParser(); - }, .nvptx, .nvptx64 => { - llvm.LLVMInitializeNVPTXTarget(); - llvm.LLVMInitializeNVPTXTargetInfo(); -@@ -13086,13 +13044,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { - llvm.LLVMInitializeRISCVAsmPrinter(); - llvm.LLVMInitializeRISCVAsmParser(); + bindings.LLVMInitializeNVPTXTarget(); + bindings.LLVMInitializeNVPTXTargetInfo(); +@@ -4806,13 +4764,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeRISCVAsmPrinter(); + bindings.LLVMInitializeRISCVAsmParser(); }, - .sparc, .sparc64 => { -- llvm.LLVMInitializeSparcTarget(); -- llvm.LLVMInitializeSparcTargetInfo(); -- llvm.LLVMInitializeSparcTargetMC(); -- llvm.LLVMInitializeSparcAsmPrinter(); -- llvm.LLVMInitializeSparcAsmParser(); +- bindings.LLVMInitializeSparcTarget(); +- bindings.LLVMInitializeSparcTargetInfo(); +- bindings.LLVMInitializeSparcTargetMC(); +- bindings.LLVMInitializeSparcAsmPrinter(); +- bindings.LLVMInitializeSparcAsmParser(); - }, .s390x => { - llvm.LLVMInitializeSystemZTarget(); - llvm.LLVMInitializeSystemZTargetInfo(); -@@ -13123,13 +13074,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { - llvm.LLVMInitializeXtensaAsmParser(); + bindings.LLVMInitializeSystemZTarget(); + bindings.LLVMInitializeSystemZTargetInfo(); +@@ -4843,13 +4794,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeXtensaAsmParser(); } }, - .xcore => { -- llvm.LLVMInitializeXCoreTarget(); -- llvm.LLVMInitializeXCoreTargetInfo(); -- llvm.LLVMInitializeXCoreTargetMC(); -- llvm.LLVMInitializeXCoreAsmPrinter(); +- bindings.LLVMInitializeXCoreTarget(); +- bindings.LLVMInitializeXCoreTargetInfo(); +- bindings.LLVMInitializeXCoreTargetMC(); +- bindings.LLVMInitializeXCoreAsmPrinter(); - // There is no LLVMInitializeXCoreAsmParser function. - }, .m68k => { if (build_options.llvm_has_m68k) { - llvm.LLVMInitializeM68kTarget(); -@@ -13148,13 +13092,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { - llvm.LLVMInitializeCSKYAsmParser(); + bindings.LLVMInitializeM68kTarget(); +@@ -4868,13 +4812,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeCSKYAsmParser(); } }, - .ve => { -- llvm.LLVMInitializeVETarget(); -- llvm.LLVMInitializeVETargetInfo(); -- llvm.LLVMInitializeVETargetMC(); -- llvm.LLVMInitializeVEAsmPrinter(); -- llvm.LLVMInitializeVEAsmParser(); +- bindings.LLVMInitializeVETarget(); +- bindings.LLVMInitializeVETargetInfo(); +- bindings.LLVMInitializeVETargetMC(); +- bindings.LLVMInitializeVEAsmPrinter(); +- bindings.LLVMInitializeVEAsmParser(); - }, .arc => { if (build_options.llvm_has_arc) { - llvm.LLVMInitializeARCTarget(); -@@ -13164,21 +13101,29 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { + bindings.LLVMInitializeARCTarget(); +@@ -4884,21 +4821,29 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { // There is no LLVMInitializeARCAsmParser function. } }, - .loongarch32, .loongarch64 => { -- llvm.LLVMInitializeLoongArchTarget(); -- llvm.LLVMInitializeLoongArchTargetInfo(); -- llvm.LLVMInitializeLoongArchTargetMC(); -- llvm.LLVMInitializeLoongArchAsmPrinter(); -- llvm.LLVMInitializeLoongArchAsmParser(); +- bindings.LLVMInitializeLoongArchTarget(); +- bindings.LLVMInitializeLoongArchTargetInfo(); +- bindings.LLVMInitializeLoongArchTargetMC(); +- bindings.LLVMInitializeLoongArchAsmPrinter(); +- bindings.LLVMInitializeLoongArchAsmParser(); - }, + + // Disabled LLVM targets @@ -164,20 +164,20 @@ index bd2c7bd022..a98fbab47e 100644 .spirv32, .spirv64, - => { -- llvm.LLVMInitializeSPIRVTarget(); -- llvm.LLVMInitializeSPIRVTargetInfo(); -- llvm.LLVMInitializeSPIRVTargetMC(); -- llvm.LLVMInitializeSPIRVAsmPrinter(); +- bindings.LLVMInitializeSPIRVTarget(); +- bindings.LLVMInitializeSPIRVTargetInfo(); +- bindings.LLVMInitializeSPIRVTargetMC(); +- bindings.LLVMInitializeSPIRVAsmPrinter(); - }, + => unreachable, // LLVM does does not have a backend for these. - .kalimba, + .alpha, diff --git a/src/target.zig b/src/target.zig -index f8201d691b..8491912bd5 100644 +index 3d04c06f5e..9e19836815 100644 --- a/src/target.zig +++ b/src/target.zig -@@ -166,23 +166,12 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) +@@ -185,23 +185,12 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) } return switch (target.cpu.arch) { @@ -201,10 +201,10 @@ index f8201d691b..8491912bd5 100644 .powerpc, .powerpcle, .powerpc64, -@@ -190,24 +179,38 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) - .amdgcn, - .riscv32, +@@ -211,24 +200,38 @@ pub fn hasLlvmSupport(target: *const std.Target, ofmt: std.Target.ObjectFormat) + .riscv32be, .riscv64, + .riscv64be, - .sparc, - .sparc64, - .spirv32, @@ -250,5 +250,5 @@ index f8201d691b..8491912bd5 100644 .csky, .xtensa, -- -2.52.0 +2.53.0 diff --git a/macros.zig b/macros.zig index 8f43673..990eddc 100644 --- a/macros.zig +++ b/macros.zig @@ -1,6 +1,6 @@ %zig_arches x86_64 aarch64 riscv64 %{mips64} -%zig %{_bindir}/zig +%__zig %{_bindir}/zig %_zig_cache_dir %{_vpath_builddir}/zig-cache %_zig_package_dir %{_zig_cache_dir}/p @@ -27,7 +27,10 @@ # seperated build options %_zig_general_options --verbose --release=%{_zig_release_mode} --build-id=sha1 --summary all %_zig_project_options -Dtarget=%{_zig_target} -Dcpu=%{_zig_cpu} -%_zig_system_integration --system "%{_zig_package_dir}" +# 0.16.0 introduced packaging changes which install packages into this relative directory +# Will be ovewritable in 0.17.0 +# https://codeberg.org/ziglang/zig/pulls/31950 +%_zig_system_integration --system "zig-pkg" %_zig_advanced_options -fallow-so-scripts --cache-dir "%{_zig_cache_dir}" --global-cache-dir "%{_zig_cache_dir}" %_zig_build_options %{?_zig_general_options} %{?_zig_project_options} %{?_zig_system_integration} %{?_zig_advanced_options} %{?zig_build_options} @@ -40,10 +43,11 @@ mkdir -p \ %{_zig_cache_dir} \ %{_zig_package_dir} \ + "zig-pkg" \ } %zig_build %{shrink: \ - %zig \ + %__zig \ build \ %{?_zig_build_options} \ } @@ -56,7 +60,7 @@ } %zig_fetch %{shrink: \ - %zig \ + %__zig \ fetch \ %{?_zig_fetch_options} \ } diff --git a/sources b/sources index b3ceab1..d07a209 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (zig-0.15.2.tar.xz) = 56b0f2b14da8603bf86ab672fd1fe38c2b04d8d90512839104e85b0fbda94aaf07fecf76b238d7b17715f9fee24be46c1830a96a0b5993cff6adef91b83f3201 -SHA512 (zig-0.15.2.tar.xz.minisig) = d951c167561599a11ac1881c0c12d17be5d8ea3d214b96403acaa5b40f62a6bee48602dcbf963046897481525b801023fe419daca6d6811b495c44a242777a13 +SHA512 (zig-0.16.0.tar.xz) = 1404a939c6f233d5f328a4833543d7a2b2d9f0f5081babe6e3ad43daed25bbb0844b28c01c900f64b5bb63ac62b5586457c05380b10494dfefb56f49b58d4a0a +SHA512 (zig-0.16.0.tar.xz.minisig) = 44a2d57061cbe8bd4e9ad587c247883e2e9abefa148ab375617665fe51500a106f488ceaaeaf038c0ff5ce1a70f4eb3b519a44f3211769ea1ebae5ad49b2f1b9 diff --git a/zig.spec b/zig.spec index 8bd9acb..ccb142a 100644 --- a/zig.spec +++ b/zig.spec @@ -10,17 +10,28 @@ %global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U # note here at which Fedora or EL release we need to use compat LLVM packages -%if 0%{?fedora} >= 43 || 0%{?rhel} >= 11 -%global llvm_compat 20 +%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11 +%global llvm_compat 21 %endif -%global llvm_version 20.0.0 +%global llvm_version 21.1.8 %bcond bootstrap 0 %bcond docs %{without bootstrap} %bcond macro %{without bootstrap} %bcond test 1 +# GCC < 16.0 miscompiles on RISC-V +%ifarch riscv64 +%if 0%{?fedora} < 44 +%bcond toolchain_clang 1 +%endif +%endif + +%if %{with toolchain_clang} +%global toolchain clang +%endif + %global zig_cache_dir %{_vpath_builddir}/zig-cache %global zig_build_options %{shrink: \ @@ -49,8 +60,8 @@ } Name: zig -Version: 0.15.2 -Release: 3%{?dist} +Version: 0.16.0 +Release: 1%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software # The minisign file references a specific archive name so we store for ease of use %global archive_name %{name}-%{version}.tar.xz @@ -68,8 +79,12 @@ Patch0: 0001-remove-native-lib-directories-from-rpath.patch # Targets come from https://src.fedoraproject.org/rpms/llvm/blob/rawhide/f/llvm.spec Patch1: 0002-Remove-unsupported-LLVM-targets-for-EPEL.patch +%if %{without toolchain_clang} BuildRequires: gcc BuildRequires: gcc-c++ +%else +BuildRequires: clang +%endif BuildRequires: cmake BuildRequires: llvm%{?llvm_compat}-devel BuildRequires: clang%{?llvm_compat}-devel @@ -82,7 +97,7 @@ BuildRequires: help2man BuildRequires: minisign %if %{without bootstrap} -BuildRequires: (zig >= 0.15 with zig < 0.16) +BuildRequires: (zig >= 0.16 with zig < 0.17) %endif %if %{with test} @@ -98,7 +113,7 @@ Requires: %{name}-libs = %{version} # Apache-2.0 WITH LLVM-exception OR NCSA OR MIT Provides: bundled(compiler-rt) = %{llvm_version} # LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.0-or-later AND Unicode-3.0 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only -Provides: bundled(glibc) = 2.41 +Provides: bundled(glibc) = 2.43 # Apache-2.0 WITH LLVM-exception OR MIT OR NCSA Provides: bundled(libcxx) = %{llvm_version} # Apache-2.0 WITH LLVM-exception OR MIT OR NCSA @@ -246,6 +261,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Wed Apr 15 2026 Jan200101 - 0.16.0-1 +- Update to 0.16.0 + * Sat Jan 17 2026 Fedora Release Engineering - 0.15.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 373fd58fba00a8bc01e887dc14988583ece6631a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:40:29 +0000 Subject: [PATCH 12/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- zig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zig.spec b/zig.spec index ccb142a..25373a5 100644 --- a/zig.spec +++ b/zig.spec @@ -61,7 +61,7 @@ Name: zig Version: 0.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Programming language for maintaining robust, optimal, and reusable software # The minisign file references a specific archive name so we store for ease of use %global archive_name %{name}-%{version}.tar.xz @@ -261,6 +261,9 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 0.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Wed Apr 15 2026 Jan200101 - 0.16.0-1 - Update to 0.16.0 From dc01a78c50f1e84069a3cac1f38fae2a3df3cfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9nich=20Bon=20=C4=86iri=C4=87?= Date: Tue, 14 Jul 2026 23:53:27 -0600 Subject: [PATCH 13/15] refactor: migrate to rpmautospec and clean up spec headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrated zig.spec to utilize %autorelease and %autochangelog, removing the manual changelog section. Restructured and cleaned up the global variable and macro definitions using minimalist section headers. Replaced hardcoded /usr/bin/minisign with the guidelines-compliant %{_bindir}/minisign macro. Co-developed-by: Gemini AI Signed-off-by: Rénich Bon Ćirić --- zig.spec | 220 +++++++++++-------------------------------------------- 1 file changed, 42 insertions(+), 178 deletions(-) diff --git a/zig.spec b/zig.spec index 25373a5..952d4b2 100644 --- a/zig.spec +++ b/zig.spec @@ -1,27 +1,15 @@ +# architecture and toolchain + %if 0%{?rhel} -# Zig depends on a C compiler (gcc) during bootstraping -# older versions of gcc fail to compile the transpiled source so we limit it to x86_64 +# Zig depends on a C compiler (gcc) during bootstrapping. +# Older versions of gcc fail to compile the transpiled source, so limit to x86_64. %global zig_arches x86_64 %else -# https://ziglang.org/download/VERSION/release-notes.html#Support-Table +# Supported architectures: https://ziglang.org/download/VERSION/release-notes.html#Support-Table %global zig_arches x86_64 aarch64 riscv64 %{mips64} %endif -# Signing key from https://ziglang.org/download/ -%global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U -# note here at which Fedora or EL release we need to use compat LLVM packages -%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11 -%global llvm_compat 21 -%endif - -%global llvm_version 21.1.8 - -%bcond bootstrap 0 -%bcond docs %{without bootstrap} -%bcond macro %{without bootstrap} -%bcond test 1 - -# GCC < 16.0 miscompiles on RISC-V +# GCC < 16.0 miscompiles on RISC-V; use Clang instead on older Fedora versions %ifarch riscv64 %if 0%{?fedora} < 44 %bcond toolchain_clang 1 @@ -32,8 +20,32 @@ %global toolchain clang %endif +# minisign public key for source verification (from https://ziglang.org/download/) +%global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U + + +# dependency versions and cache + +# Compatible LLVM/Clang version definitions +%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11 +%global llvm_compat 21 +%endif +%global llvm_version 21.1.8 + +# Build cache directory configuration %global zig_cache_dir %{_vpath_builddir}/zig-cache + +# build conditionals + +%bcond bootstrap 0 +%bcond docs %{without bootstrap} +%bcond macro %{without bootstrap} +%bcond test 1 + + +# build and install options + %global zig_build_options %{shrink: \ --verbose \ --release=fast \ @@ -47,7 +59,7 @@ --cache-dir "%{zig_cache_dir}" \ --global-cache-dir "%{zig_cache_dir}" \ \ - -Dversion-string="%{version}" \ + -Dversion-string="%{?dev_version}%{!?dev_version:%{version}}" \ -Dstatic-llvm=false \ -Denable-llvm=true \ -Dno-langref=true \ @@ -55,14 +67,17 @@ -Dpie \ -Dconfig_h="%{__cmake_builddir}/config.h" \ } -%global zig_install_options %zig_build_options %{shrink: \ + +%global zig_install_options %{shrink: \ + %zig_build_options \ --prefix "%{_prefix}" \ } Name: zig Version: 0.16.0 -Release: 2%{?dist} +Release: %autorelease Summary: Programming language for maintaining robust, optimal, and reusable software + # The minisign file references a specific archive name so we store for ease of use %global archive_name %{name}-%{version}.tar.xz @@ -71,10 +86,12 @@ URL: https://ziglang.org Source0: %{url}/download/%{version}/%{archive_name} Source1: %{url}/download/%{version}/%{archive_name}.minisig Source2: macros.%{name} + # Remove native lib directories from rpath # this is unlikely to be upstreamed in its current state because upstream # wants to work around the shortcomings of NixOS Patch0: 0001-remove-native-lib-directories-from-rpath.patch + # LLVM on RHEL/EPEL only provides fewer targets so we patch the required targets down # Targets come from https://src.fedoraproject.org/rpms/llvm/blob/rawhide/f/llvm.spec Patch1: 0002-Remove-unsupported-LLVM-targets-for-EPEL.patch @@ -162,7 +179,7 @@ This package contains common RPM macros for %{name}. %endif %prep -/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" +%{_bindir}/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" %autosetup -N %patch 0 -p1 @@ -199,7 +216,7 @@ export CCACHE_DISABLE=1 -DZIG_TARGET_MCPU:STRING=baseline \ -DZIG_TARGET_TRIPLE:STRING=native \ \ - -DZIG_VERSION:STRING="%{version}" + -DZIG_VERSION:STRING="%{?dev_version}%{!?dev_version:%{version}}" %if %{with bootstrap} %cmake_build --target stage3 @@ -214,7 +231,7 @@ help2man --no-discard-stderr --no-info "./zig-out/bin/zig" --version-option=vers %if %{with docs} -# Use the newly made stage 3 compiler to generate docs +# Use the newly made stage 3 compiler to generate docs ./zig-out/bin/zig build docs %{zig_build_options} %endif @@ -261,157 +278,4 @@ install -D -pv -m 0644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.%{name} %endif %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 0.16.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Wed Apr 15 2026 Jan200101 - 0.16.0-1 -- Update to 0.16.0 - -* Sat Jan 17 2026 Fedora Release Engineering - 0.15.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Sun Jan 04 2026 Jan200101 - 0.15.2-2 -- Rebuilt for EPEL - -* Sun Oct 12 2025 Jan200101 - 0.15.2-1 -- Update to 0.15.2 - -* Fri Jul 25 2025 Fedora Release Engineering - 0.14.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jun 09 2025 Jan200101 - 0.14.1-1 -- Update to 0.14.1 - -* Tue May 27 2025 Jan200101 - 0.14.0-4 -- add patch to add library directories - -* Fri May 09 2025 Jan200101 - 0.14.0-3 -- add gcc to runtime dependencies - -* Thu Apr 24 2025 Jan200101 - 0.14.0-2 -- fix and re-enable documentation - -* Thu Mar 06 2025 Jan200101 - 0.14.0-1 -- Update to 0.14.0 - -* Mon Jan 27 2025 Jan200101 - 0.13.0-8 -- specify to build against local zig stdlib directory to ensure we are building against the newest stdlib -- use release fast instead of release safe to fix aarch64 builds from running out of memory -- enable position independent executable for the zig build - -* Mon Jan 27 2025 Jan200101 - 0.13.0-7 -- build stage 3 using zig build system -- add user provided options to the end of the build and install options - -* Thu Jan 23 2025 Jan200101 - 0.13.0-6 -- rebuild against fixed llvm - -* Sun Jan 19 2025 Fedora Release Engineering - 0.13.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sun Dec 29 2024 Jan200101 - 0.13.0-4 -- correct macro variables -- set llvm_compat for F41 -- update callaway licenses to follow SPDX - -* Wed Sep 04 2024 Miroslav Suchý - 0.13.0-3 -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 0.13.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jun 11 2024 Jan200101 - 0.13.0-1 -- Update to 0.13.0 - -* Sat Jun 08 2024 Jan200101 - 0.12.1-1 -- Update to 0.12.1 - -* Sat May 25 2024 Jan200101 - 0.12.0-1 -- Update to 0.12.0 - -* Wed Feb 21 2024 Jan Drögehoff - 0.11.0-2 -- Rebuilt for bootstrapping - -* Sat Jan 27 2024 Aleksei Bavshin - 0.11.0-1 -- Update to 0.11.0 - -* Sat Jan 27 2024 Aleksei Bavshin - 0.9.1-6 -- Fix build with `--without macro` -- Skip %%check and test dependencies when tests are disabled -- Drop %%_zig_version macro - -* Sat Jan 27 2024 Benson Muite - 0.9.1-6 -- Verify source signature - -* Sat Jan 27 2024 Fedora Release Engineering - 0.9.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 0.9.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Jan 21 2023 Fedora Release Engineering - 0.9.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 0.9.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Feb 18 2022 Jan Drögehoff - 0.9.1-1 -- Update to 0.9.1 - -* Thu Jan 27 2022 Jan Drögehoff - 0.9.0-3 -- Jan: add rpath patch -- Aleksei Bavshin: rpm macros: set default build flags - -* Sat Jan 22 2022 Fedora Release Engineering - 0.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Dec 20 2021 Jan Drögehoff - 0.9.0-1 -- Update to 0.9.0 - -* Wed Nov 17 2021 Jan Drögehoff - 0.8.1-5 -- Enable documentation on Fedora 35 - -* Tue Nov 09 2021 Tom Stellard - 0.8.1-4 -- Rebuild for llvm-13.0.0 - -* Sat Oct 30 2021 Jan Drögehoff - 0.8.1-3 -- Update LLVM13 Patch - -* Thu Oct 07 2021 Tom Stellard - 0.8.1-2 -- Rebuild for llvm-13.0.0 - -* Sun Sep 12 2021 Jan Drögehoff - 0.8.1-1 -- Update to Zig 0.8.1, add LLVM 13 patch - -* Wed Aug 18 2021 Jan Drögehoff - 0.8.0-8 -- Rebuilt for lld soname bump - -* Fri Jul 23 2021 Fedora Release Engineering - 0.8.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jul 19 2021 Jan Drögehoff - 0.8.0-6 -- add native libc detection patch - -* Sun Jul 04 2021 Jan Drögehoff - 0.8.0-5 -- correct newline in macro that caused DESTDIR to be ignored - -* Mon Jun 28 2021 Jan Drögehoff - 0.8.0-4 -- correct macro once again to allow for proper packaging - -* Thu Jun 24 2021 Jan Drögehoff - 0.8.0-3 -- improve macro for using the zig binary - -* Thu Jun 24 2021 Jan Drögehoff - 0.8.0-2 -- Update patches, correct rpm macro - -* Sat Jun 05 2021 Jan Drögehoff - 0.8.0-1 -- Update to Zig 0.8.0 - -* Sun Dec 13 23:18:24 CET 2020 Jan Drögehoff - 0.7.1-1 -- Update to Zig 0.7.1 - -* Wed Nov 11 17:18:27 CET 2020 Jan Drögehoff - 0.7.0-1 -- Update to Zig 0.7.0 - -* Tue Aug 18 2020 Jan Drögehoff - 0.6.0-1 -- Initial zig spec +%autochangelog From 99107eeb746fd13ef1d8cf3c6a1db20b44f63f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9nich=20Bon=20=C4=86iri=C4=87?= Date: Wed, 15 Jul 2026 02:31:17 -0600 Subject: [PATCH 14/15] style: remove redundant comment from zig.spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-developed-by: Gemini AI Signed-off-by: Rénich Bon Ćirić --- zig.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/zig.spec b/zig.spec index 952d4b2..4aad274 100644 --- a/zig.spec +++ b/zig.spec @@ -32,7 +32,6 @@ %endif %global llvm_version 21.1.8 -# Build cache directory configuration %global zig_cache_dir %{_vpath_builddir}/zig-cache From 57f3a79ce304a73eefe62f719bf5ac13cb15d9a3 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sat, 8 Aug 2026 18:51:30 +0200 Subject: [PATCH 15/15] refactor: add changelog file and revert minisign macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the changelog file to preserve historical package changes for rpmautospec migration, as expected by packaging guidelines. Revert the minisign macro usage back to plain minisign, as macros should only refer to files installed by the current spec. Co-developed-by: Gemini AI Signed-off-by: Rénich Bon Ćirić --- changelog | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ zig.spec | 2 +- 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..cc53a32 --- /dev/null +++ b/changelog @@ -0,0 +1,154 @@ +* Fri Jul 17 2026 Fedora Release Engineering - 0.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Wed Apr 15 2026 Jan200101 - 0.16.0-1 +- Update to 0.16.0 + +* Sat Jan 17 2026 Fedora Release Engineering - 0.15.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Sun Jan 04 2026 Jan200101 - 0.15.2-2 +- Rebuilt for EPEL + +* Sun Oct 12 2025 Jan200101 - 0.15.2-1 +- Update to 0.15.2 + +* Fri Jul 25 2025 Fedora Release Engineering - 0.14.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jun 09 2025 Jan200101 - 0.14.1-1 +- Update to 0.14.1 + +* Tue May 27 2025 Jan200101 - 0.14.0-4 +- add patch to add library directories + +* Fri May 09 2025 Jan200101 - 0.14.0-3 +- add gcc to runtime dependencies + +* Thu Apr 24 2025 Jan200101 - 0.14.0-2 +- fix and re-enable documentation + +* Thu Mar 06 2025 Jan200101 - 0.14.0-1 +- Update to 0.14.0 + +* Mon Jan 27 2025 Jan200101 - 0.13.0-8 +- specify to build against local zig stdlib directory to ensure we are building against the newest stdlib +- use release fast instead of release safe to fix aarch64 builds from running out of memory +- enable position independent executable for the zig build + +* Mon Jan 27 2025 Jan200101 - 0.13.0-7 +- build stage 3 using zig build system +- add user provided options to the end of the build and install options + +* Thu Jan 23 2025 Jan200101 - 0.13.0-6 +- rebuild against fixed llvm + +* Sun Jan 19 2025 Fedora Release Engineering - 0.13.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Dec 29 2024 Jan200101 - 0.13.0-4 +- correct macro variables +- set llvm_compat for F41 +- update callaway licenses to follow SPDX + +* Wed Sep 04 2024 Miroslav Suchý - 0.13.0-3 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 0.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 11 2024 Jan200101 - 0.13.0-1 +- Update to 0.13.0 + +* Sat Jun 08 2024 Jan200101 - 0.12.1-1 +- Update to 0.12.1 + +* Sat May 25 2024 Jan200101 - 0.12.0-1 +- Update to 0.12.0 + +* Wed Feb 21 2024 Jan Drögehoff - 0.11.0-2 +- Rebuilt for bootstrapping + +* Sat Jan 27 2024 Aleksei Bavshin - 0.11.0-1 +- Update to 0.11.0 + +* Sat Jan 27 2024 Aleksei Bavshin - 0.9.1-6 +- Fix build with `--without macro` +- Skip %%check and test dependencies when tests are disabled +- Drop %%_zig_version macro + +* Sat Jan 27 2024 Benson Muite - 0.9.1-6 +- Verify source signature + +* Sat Jan 27 2024 Fedora Release Engineering - 0.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Feb 18 2022 Jan Drögehoff - 0.9.1-1 +- Update to 0.9.1 + +* Thu Jan 27 2022 Jan Drögehoff - 0.9.0-3 +- Jan: add rpath patch +- Aleksei Bavshin: rpm macros: set default build flags + +* Sat Jan 22 2022 Fedora Release Engineering - 0.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Dec 20 2021 Jan Drögehoff - 0.9.0-1 +- Update to 0.9.0 + +* Wed Nov 17 2021 Jan Drögehoff - 0.8.1-5 +- Enable documentation on Fedora 35 + +* Tue Nov 09 2021 Tom Stellard - 0.8.1-4 +- Rebuild for llvm-13.0.0 + +* Sat Oct 30 2021 Jan Drögehoff - 0.8.1-3 +- Update LLVM13 Patch + +* Thu Oct 07 2021 Tom Stellard - 0.8.1-2 +- Rebuild for llvm-13.0.0 + +* Sun Sep 12 2021 Jan Drögehoff - 0.8.1-1 +- Update to Zig 0.8.1, add LLVM 13 patch + +* Wed Aug 18 2021 Jan Drögehoff - 0.8.0-8 +- Rebuilt for lld soname bump + +* Fri Jul 23 2021 Fedora Release Engineering - 0.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jul 19 2021 Jan Drögehoff - 0.8.0-6 +- add native libc detection patch + +* Sun Jul 04 2021 Jan Drögehoff - 0.8.0-5 +- correct newline in macro that caused DESTDIR to be ignored + +* Mon Jun 28 2021 Jan Drögehoff - 0.8.0-4 +- correct macro once again to allow for proper packaging + +* Thu Jun 24 2021 Jan Drögehoff - 0.8.0-3 +- improve macro for using the zig binary + +* Thu Jun 24 2021 Jan Drögehoff - 0.8.0-2 +- Update patches, correct rpm macro + +* Sat Jun 05 2021 Jan Drögehoff - 0.8.0-1 +- Update to Zig 0.8.0 + +* Sun Dec 13 23:18:24 CET 2020 Jan Drögehoff - 0.7.1-1 +- Update to Zig 0.7.1 + +* Wed Nov 11 17:18:27 CET 2020 Jan Drögehoff - 0.7.0-1 +- Update to Zig 0.7.0 + +* Tue Aug 18 2020 Jan Drögehoff - 0.6.0-1 +- Initial zig spec diff --git a/zig.spec b/zig.spec index 4aad274..6aea38e 100644 --- a/zig.spec +++ b/zig.spec @@ -178,7 +178,7 @@ This package contains common RPM macros for %{name}. %endif %prep -%{_bindir}/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" +minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -Q | grep -F "file:%{archive_name}" %autosetup -N %patch 0 -p1