summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2020-03-09 14:38:18 +0100
committerLudovic Courtès <ludo@gnu.org>2020-04-01 00:12:31 +0200
commitb3bd47569637702652c2e7da0ddee8e879b52d71 (patch)
tree15092706869da555a2cb98dcdec91897406686ca
parentd82539d35fc5a550118975f19b624fe040910f42 (diff)
downloadpatches-b3bd47569637702652c2e7da0ddee8e879b52d71.tar
patches-b3bd47569637702652c2e7da0ddee8e879b52d71.tar.gz
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.
-rw-r--r--gnu/packages/cross-base.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 13237fb8a8..ab866eebc6 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -491,7 +491,17 @@ and the cross tool chain."
',%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.