gnu: glibc/hurd: Install include/mach/machine symlink.

* gnu/packages/base.scm (glibc): When building for the Hurd, add phase
`create-machine-symlink'.
* gnu/packages/cross-base.scm (cross-libc*): Likewise.

Change-Id: I61fa081ce081f05bed918a438fd9d4eec94ef4bf
This commit is contained in:
Janneke Nieuwenhuizen 2024-01-19 13:22:02 +01:00 committed by Ludovic Courtès
parent feae33359f
commit 0ff267cdf2
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 18 additions and 5 deletions

View file

@ -1075,11 +1075,18 @@ (define (linker-script? file)
,@(if (target-hurd?) ,@(if (target-hurd?)
'((add-after 'install 'augment-libc.so '((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libc.so") (substitute* (string-append out "/lib/libc.so")
(("/[^ ]+/lib/libc.so.0.3") (("/[^ ]+/lib/libc.so.0.3")
(string-append out "/lib/libc.so.0.3" (string-append out "/lib/libc.so.0.3"
" libmachuser.so libhurduser.so"))))))) " 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"))))))
'())))) '()))))
(inputs `(("static-bash" ,static-bash))) (inputs `(("static-bash" ,static-bash)))

View file

@ -742,12 +742,18 @@ (define cross-binutils
,@(if (target-hurd? target) ,@(if (target-hurd? target)
'((add-after 'install 'augment-libc.so '((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libc.so") (substitute* (string-append out "/lib/libc.so")
(("/[^ ]+/lib/libc.so.0.3") (("/[^ ]+/lib/libc.so.0.3")
(string-append out "/lib/libc.so.0.3" (string-append out "/lib/libc.so.0.3"
" libmachuser.so libhurduser.so")))) " libmachuser.so libhurduser.so"))))))
#t))) (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"))))))
'()))))) '())))))
;; Shadow the native "kernel-headers" because glibc's recipe expects the ;; Shadow the native "kernel-headers" because glibc's recipe expects the