mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add zig-0.12.
* gnu/packages/patches/zig-0.12-fix-runpath.patch: New file. * gnu/packages/patches/zig-0.12-use-baseline-cpu-by-default.patch: New file. * gnu/packages/patches/zig-0.12-use-system-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Regisiter them. * gnu/packages/zig.scm (zig-0.12-glibc-abi-tool,zig-0.12): New variables. Change-Id: I700d0afa2b373bf24a4f3527548e86dbed1aff17
This commit is contained in:
parent
a0d5fc28b8
commit
368c1f4c5e
5 changed files with 341 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
From 3e9875c721f6e5b48b8c63560f049dd1bc398293 Mon Sep 17 00:00:00 2001
|
||||
From: Ekaitz Zarraga <ekaitz@elenq.tech>
|
||||
Date: Sat, 18 Nov 2023 15:04:16 +0100
|
||||
Subject: [PATCH 4/5] Use `baseline` cpu by default.
|
||||
|
||||
This helps Guix tune the package later. Tunning will only add
|
||||
`-Dcpu=whatever` which should override the standard behaviour.
|
||||
|
||||
Zig by default uses `native`, which interferes with our build process.
|
||||
In our previous zig-build-system we chose to add `-Dcpu=baseline` flag
|
||||
in each `zig build` execution, but that doesn't allow us to tune the
|
||||
package later. Tunning is only designed to add extra flags in the
|
||||
command line call, and we already had one set for the baseline case.
|
||||
With this patch we set the standard behavior to `baseline` so we don't
|
||||
need to add the `-Dcpu=baseline` flag in the zig-build-system and we can
|
||||
tune with no issues.
|
||||
---
|
||||
lib/std/Target/Query.zig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/std/Target/Query.zig b/lib/std/Target/Query.zig
|
||||
index 8871e360a5..797d6a74db 100644
|
||||
--- a/lib/std/Target/Query.zig
|
||||
+++ b/lib/std/Target/Query.zig
|
||||
@@ -6,7 +6,7 @@
|
||||
/// `null` means native.
|
||||
cpu_arch: ?Target.Cpu.Arch = null,
|
||||
|
||||
-cpu_model: CpuModel = CpuModel.determined_by_cpu_arch,
|
||||
+cpu_model: CpuModel = CpuModel.baseline,
|
||||
|
||||
/// Sparse set of CPU features to add to the set from `cpu_model`.
|
||||
cpu_features_add: Target.Cpu.Feature.Set = Target.Cpu.Feature.Set.empty,
|
||||
--
|
||||
2.46.0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue