summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/zig-0.9-fix-runpath.patch
diff options
context:
space:
mode:
authorHilton Chain <[email protected]>2024-11-13 21:29:54 +0800
committerHilton Chain <[email protected]>2024-12-31 10:54:05 +0800
commitcf74ecc94782bf3dc5588dc8988f39d34d3fa238 (patch)
tree8c5dfee4c2ce483b1e823d8249bda7c2396c84d3 /gnu/packages/patches/zig-0.9-fix-runpath.patch
parentfa0e38cbaec13d84d34505f9e01d14345e653a08 (diff)
gnu: zig-0.9: Update patches.
* gnu/packages/patches/zig-0.9-fix-runpath.patch: New file. * gnu/packages/patches/zig-use-baseline-cpu-by-default.patch: Rename to... * gnu/packages/patches/zig-0.9-use-baseline-cpu-by-default.patch: ...this. * gnu/packages/patches/zig-use-system-paths.patch: Rename to... * gnu/packages/patches/zig-0.9-use-system-paths.patch: ...this and update. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/zig.scm (zig-0.9-glibc-abi-tool,zig-0.10-glibc-abi-tool): New variables. (zig-0.9)[source]: Use zig-source. Add patches. [arguments]<#:phases>: Generate and install abilists. [native-inputs]: Add zig-0.9-glibc-abi-tool. (zig-0.10)[source]<patches>: Adjust patch name. [native-inputs]: Replace zig-0.9-glibc-abi-tool with zig-0.10-glibc-abi-tool.
Diffstat (limited to 'gnu/packages/patches/zig-0.9-fix-runpath.patch')
-rw-r--r--gnu/packages/patches/zig-0.9-fix-runpath.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/patches/zig-0.9-fix-runpath.patch b/gnu/packages/patches/zig-0.9-fix-runpath.patch
new file mode 100644
index 0000000000..65677f6b06
--- /dev/null
+++ b/gnu/packages/patches/zig-0.9-fix-runpath.patch
@@ -0,0 +1,27 @@
+From 97d6b38ee78941b96bfd30dc2c814fd9c38561e3 Mon Sep 17 00:00:00 2001
+From: Hilton Chain <[email protected]>
+Date: Wed, 27 Nov 2024 11:55:44 +0800
+Subject: [PATCH] Fix RUNPATH issue.
+
+Add needed libraries and libc to RUNPATH when CROSS_LIBRARY_PATH or LIBRARY_PATH
+is set.
+---
+ src/Compilation.zig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Compilation.zig b/src/Compilation.zig
+index b44c7da78d..be28538e6a 100644
+--- a/src/Compilation.zig
++++ b/src/Compilation.zig
+@@ -1515,7 +1515,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
+ .llvm_cpu_features = llvm_cpu_features,
+ .skip_linker_dependencies = options.skip_linker_dependencies,
+ .parent_compilation_link_libc = options.parent_compilation_link_libc,
+- .each_lib_rpath = options.each_lib_rpath orelse options.is_native_os,
++ .each_lib_rpath = std.zig.system.NativePaths.isGuix(arena) or options.each_lib_rpath orelse false,
+ .disable_lld_caching = options.disable_lld_caching,
+ .subsystem = options.subsystem,
+ .is_test = options.is_test,
+--
+2.46.0
+