@@ -1079,7 +1079,7 @@ (define-public glibc
(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")
@@ -1089,7 +1089,12 @@ (define-public glibc
(add-after 'install 'create-machine-symlink
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (cpu "i386")
+ (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)
@@ -311,7 +311,7 @@ (define* (glibc-dynamic-linker
gnu-triplet->nix-system)
(%current-system))))
"Return the name of Glibc's dynamic linker for SYSTEM."
- ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
+ ;; See the appropriate 'shlib-versions' file in libc.
(let ((platform (false-if-platform-not-found
(lookup-platform-by-system system))))
(cond
@@ -738,7 +738,7 @@ (define* (cross-libc* target
(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")
@@ -748,7 +748,11 @@ (define* (cross-libc* target
(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")))
(machine (string-append
out "/include/mach/machine")))
(unless (file-exists? machine)