gnu: cross-libc: Build fix for the Hurd.

This fixes cross building of coreutils, e.g.

    ./pre-inst-env guix build --target=i586-pc-gnu coreutils

* gnu/packages/cross-base.scm (cross-libc): Add -lhurduser, -lmachuser for the
Hurd.
This commit is contained in:
Jan Nieuwenhuizen 2020-03-09 14:38:18 +01:00
parent 096a8e35e7
commit ee1cf1dd80
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -513,7 +513,17 @@ (define* (cross-libc target
',%gcc-cross-include-paths)
(setenv "CROSS_LIBRARY_PATH"
(string-append kernel "/lib")) ; for Hurd's libihash
#t)))))))
#t)))
,@(if (hurd-triplet? target)
'((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"))))
#t)))
'())))))
;; Shadow the native "kernel-headers" because glibc's recipe expects the
;; "kernel-headers" input to point to the right thing.