summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2025-05-24 08:28:33 +0800
committerHilton Chain <hako@ultrarare.space>2025-05-24 08:57:13 +0800
commit8b809c331173388dcb6c0e88178d6cc76a1da3b1 (patch)
treeffe63f8635429867bd328c28b6faca6f610e181c
parentce267b3765ef1a6177971aa0042deaeec750ea97 (diff)
gnu: zig: Update to 0.14.1.
* gnu/packages/patches/zig-0.14-fix-runpath.patch: Update patch. * gnu/packages/zig.scm (zig-0.14): Update to 0.14.1. Change-Id: I8e3dc0b0817b50d10dde56639aa5e1c715e525c7
-rw-r--r--gnu/packages/patches/zig-0.14-fix-runpath.patch39
-rw-r--r--gnu/packages/zig.scm4
2 files changed, 14 insertions, 29 deletions
diff --git a/gnu/packages/patches/zig-0.14-fix-runpath.patch b/gnu/packages/patches/zig-0.14-fix-runpath.patch
index 324544165e..3bfe637191 100644
--- a/gnu/packages/patches/zig-0.14-fix-runpath.patch
+++ b/gnu/packages/patches/zig-0.14-fix-runpath.patch
@@ -1,4 +1,4 @@
-From d5c31f6d99a3d02c8b0efba13e1a1e82e0e36f96 Mon Sep 17 00:00:00 2001
+From 467261b7e31dbb56aa06318bdd2e7260a80b313a Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako@ultrarare.space>
Date: Fri, 29 Nov 2024 14:13:46 +0800
Subject: [PATCH] Fix RUNPATH issue.
@@ -6,30 +6,15 @@ Subject: [PATCH] Fix RUNPATH issue.
Add needed libraries and libc to RUNPATH when CROSS_LIBRARY_PATH or LIBRARY_PATH
is set.
---
- lib/std/Build/Step/Compile.zig | 3 +++
- src/link/Elf.zig | 14 ++++++++++++++
- src/main.zig | 34 +++++++++++++++++++++++++++++++++-
- 3 files changed, 50 insertions(+), 1 deletion(-)
+ src/link/Elf.zig | 14 ++++++++++++++
+ src/main.zig | 34 +++++++++++++++++++++++++++++++++-
+ 2 files changed, 47 insertions(+), 1 deletion(-)
-diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
-index 1dd444abf2..df7f4a56db 100644
---- a/lib/std/Build/Step/Compile.zig
-+++ b/lib/std/Build/Step/Compile.zig
-@@ -778,6 +778,9 @@ fn runPkgConfig(compile: *Compile, lib_name: []const u8) !PkgConfigResult {
- try zig_cflags.appendSlice(&[_][]const u8{ "-D", macro });
- } else if (mem.startsWith(u8, arg, "-D")) {
- try zig_cflags.append(arg);
-+ } else if (mem.startsWith(u8, arg, "-Wl,-rpath=")) {
-+ const dir = arg["-Wl,-rpath=".len..];
-+ try zig_libs.appendSlice(&[_][]const u8{ "-L", dir });
- } else if (b.debug_pkg_config) {
- return compile.step.fail("unknown pkg-config flag '{s}'", .{arg});
- }
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
-index 608ff2fe3a..2b9fe803fd 100644
+index 591786cfbc..253c7f6732 100644
--- a/src/link/Elf.zig
+++ b/src/link/Elf.zig
-@@ -1037,6 +1037,13 @@ fn dumpArgvInit(self: *Elf, arena: Allocator) !void {
+@@ -1054,6 +1054,13 @@ fn dumpArgvInit(self: *Elf, arena: Allocator) !void {
try argv.appendSlice(gpa, &.{ "-rpath", rpath });
}
@@ -43,7 +28,7 @@ index 608ff2fe3a..2b9fe803fd 100644
try argv.appendSlice(gpa, &.{
"-z",
try std.fmt.allocPrint(arena, "stack-size={d}", .{self.base.stack_size}),
-@@ -1857,6 +1864,13 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s
+@@ -1888,6 +1895,13 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s
try argv.appendSlice(&.{ "-rpath", rpath });
}
@@ -58,10 +43,10 @@ index 608ff2fe3a..2b9fe803fd 100644
try argv.appendSlice(&.{ "-wrap", symbol_name });
}
diff --git a/src/main.zig b/src/main.zig
-index 79493aa624..505bb7570a 100644
+index 141fd42aab..81cdf6a507 100644
--- a/src/main.zig
+++ b/src/main.zig
-@@ -3901,7 +3901,7 @@ fn createModule(
+@@ -4022,7 +4022,7 @@ fn createModule(
create_module.want_native_include_dirs = true;
}
@@ -70,7 +55,7 @@ index 79493aa624..505bb7570a 100644
try create_module.rpath_list.ensureUnusedCapacity(arena, create_module.lib_directories.items.len);
for (create_module.lib_directories.items) |lib_directory| {
create_module.rpath_list.appendAssumeCapacity(lib_directory.path.?);
-@@ -3976,6 +3976,28 @@ fn createModule(
+@@ -4096,6 +4096,28 @@ fn createModule(
else => {},
};
@@ -99,7 +84,7 @@ index 79493aa624..505bb7570a 100644
create_module.resolved_options = Compilation.Config.resolve(create_module.opts) catch |err| switch (err) {
error.WasiExecModelRequiresWasi => fatal("only WASI OS targets support execution model", .{}),
error.SharedMemoryIsWasmOnly => fatal("only WebAssembly CPU targets support shared memory", .{}),
-@@ -7495,3 +7517,13 @@ fn addLibDirectoryWarn2(
+@@ -7748,3 +7770,13 @@ fn addLibDirectoryWarn2(
.path = path,
});
}
@@ -114,5 +99,5 @@ index 79493aa624..505bb7570a 100644
+ return true;
+}
--
-2.46.0
+2.49.0
diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index 23acfd19b1..6b3f66095c 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -1861,12 +1861,12 @@ toolchain. Among other features it provides
(package
(inherit zig-0.13)
(name "zig")
- (version "0.14.0")
+ (version "0.14.1")
(source
(origin
(inherit (zig-source
version version
- "0ndrwir81zhkwviwnzwqc4vszc1klv1fnlf66nmdwijrkqi5wasp"))
+ "0cnc3bzl965ckm70ayd6a29zn5h9cy3qzyfncp4n7mzkiwhlj58f"))
(patches
(search-patches
"zig-0.14-use-baseline-cpu-by-default.patch"