guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

25/38: gnu: cross-libc: Support cross-building for the 64bit Hurd.


From: guix-commits
Subject: 25/38: gnu: cross-libc: Support cross-building for the 64bit Hurd.
Date: Thu, 7 Nov 2024 10:56:10 -0500 (EST)

janneke pushed a commit to branch hurd-team
in repository guix.

commit 43cfdd7ff144afa499524edf2181845373b2ad25
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/cross-base.scm (cross-libc*)[arguments]: Do not assume CPU is
    i386, also cater for x86_64.  Only fix CPU symlink for gcc < 14.
---
 gnu/packages/cross-base.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 7b32a6b64e..824fadb6d9 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -738,17 +738,24 @@ 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")
                                (("/[^ ]+/lib/libc.so.0.3")
                                 (string-append out "/lib/libc.so.0.3"
-                                               " libmachuser.so 
libhurduser.so"))))))
-                       (add-after 'install 'create-machine-symlink
+                                               " libmachuser.so 
libhurduser.so")))))))
+                     '())
+               ,@(if (and (target-hurd? target)
+                          (version>? "14" (package-version xgcc)))
+                     `((add-after 'install 'create-machine-symlink
                          (lambda* (#:key outputs #:allow-other-keys)
                            (let ((out (assoc-ref outputs "out"))
-                                 (cpu "i386"))
+                                 (cpu ,(match target
+                                         ((? target-x86-32?)
+                                          "i386")
+                                         ((? target-x86-64?)
+                                          "x86_64"))))
                              (symlink cpu
                                       (string-append out
                                                      
"/include/mach/machine"))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]