[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23/48: gnu: cross-libc: Support cross-building for the 64bit Hurd.
From: |
guix-commits |
Subject: |
23/48: gnu: cross-libc: Support cross-building for the 64bit Hurd. |
Date: |
Sat, 9 Nov 2024 08:12:36 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit b30c39536f69713cd38865c7e25b729eabfc22ed
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Nov 6 12:26:47 2024 +0100
gnu: cross-libc: Support cross-building for the 64bit Hurd.
* gnu/packages/base.scm (glibc)[arguments]: When building for the Hurd, in
phase "create-machine-symlink", do not assume CPU is i386, also cater for
x86_64.
* gnu/packages/cross-base.scm (cross-libc*)[arguments]: Likewise.
Change-Id: Ib009b7bd301b543b8629382330cca9d963b7a812
---
gnu/packages/base.scm | 18 ++++++++++++------
gnu/packages/cross-base.scm | 17 +++++++++++------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e8121ae2c..02ef71f20d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1079,7 +1079,7 @@ the store.")
(string-append locale "/C.UTF-8")))))
,@(if (target-hurd?)
- '((add-after 'install 'augment-libc.so
+ `((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libc.so")
@@ -1088,11 +1088,17 @@ the store.")
" libmachuser.so
libhurduser.so"))))))
(add-after 'install 'create-machine-symlink
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (cpu "i386"))
- (symlink cpu
- (string-append out
-
"/include/mach/machine"))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (cpu ,(match (or (%current-target-system)
+ (%current-system))
+ ((? target-x86-32?)
+ "i386")
+ ((? target-x86-64?)
+ "x86_64")))
+ (machine (string-append
+ out "/include/mach/machine")))
+ (unless (file-exists? machine)
+ (symlink cpu machine))))))
'()))))
(inputs `(("static-bash" ,static-bash)))
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 7b32a6b64e..3827e87aec 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -738,7 +738,7 @@ returned."
(delete 'install-utf8-c-locale)
,@(if (target-hurd? target)
- '((add-after 'install 'augment-libc.so
+ `((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libc.so")
@@ -747,11 +747,16 @@ returned."
" libmachuser.so
libhurduser.so"))))))
(add-after 'install 'create-machine-symlink
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (cpu "i386"))
- (symlink cpu
- (string-append out
-
"/include/mach/machine"))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (cpu ,(match target
+ ((? target-x86-32?)
+ "i386")
+ ((? target-x86-64?)
+ "x86_64")))
+ (machine (string-append
+ out "/include/mach/machine")))
+ (unless (file-exists? machine)
+ (symlink cpu machine))))))
'())))))
;; Shadow the native "kernel-headers" because glibc's recipe expects the
- 12/48: installer: Use "partitioning-page" consistently., (continued)
- 12/48: installer: Use "partitioning-page" consistently., guix-commits, 2024/11/09
- 15/48: installer: Add dry-run?, guix-commits, 2024/11/09
- 16/48: installer: Add "Kernel" page to select the Hurd., guix-commits, 2024/11/09
- 27/48: gnu: patch: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 28/48: gnu: libxcrypt: Support the 64bit Hurd., guix-commits, 2024/11/09
- 34/48: gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd., guix-commits, 2024/11/09
- 46/48: gnu: inetutils: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 06/48: gnu: hurd: Support second boot., guix-commits, 2024/11/09
- 10/48: installer: Remove unused (newt) imports., guix-commits, 2024/11/09
- 33/48: gnu: Add libgpg-error-1.50., guix-commits, 2024/11/09
- 23/48: gnu: cross-libc: Support cross-building for the 64bit Hurd.,
guix-commits <=
- 42/48: gnu: rumpkernel: Support the 64bit Hurd., guix-commits, 2024/11/09
- 31/48: DRAFT gnu: bootstrap: Add support for x86_64-gnu., guix-commits, 2024/11/09
- 44/48: gnu: git-minimal: Fix build for the 64bit Hurd., guix-commits, 2024/11/09
- 41/48: gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337., guix-commits, 2024/11/09
- 11/48: installer: Align comments., guix-commits, 2024/11/09
- 37/48: gnu: pciutils: Support the 64bit Hurd., guix-commits, 2024/11/09
- 29/48: gnu: libstdc++: Support the 64bit Hurd., guix-commits, 2024/11/09
- 07/48: hurd-boot: Support second boot., guix-commits, 2024/11/09
- 18/48: installer: Support dry-run from Guile via store., guix-commits, 2024/11/09
- 30/48: gnu: gcc-13, gcc-14: Support being used as parent for gcc-static., guix-commits, 2024/11/09