From cf74ecc94782bf3dc5588dc8988f39d34d3fa238 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Wed, 13 Nov 2024 21:29:54 +0800 Subject: 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]: Adjust patch name. [native-inputs]: Replace zig-0.9-glibc-abi-tool with zig-0.10-glibc-abi-tool. --- gnu/packages/patches/zig-0.9-fix-runpath.patch | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gnu/packages/patches/zig-0.9-fix-runpath.patch (limited to 'gnu/packages/patches/zig-0.9-fix-runpath.patch') 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 +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 + -- cgit v1.2.3