~ruther/guix-local

0ff267cdf23a4121c6f7465ec90d6c6844933270 — Janneke Nieuwenhuizen 2 years ago feae333
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
2 files changed, 18 insertions(+), 5 deletions(-)

M gnu/packages/base.scm
M gnu/packages/cross-base.scm
M gnu/packages/base.scm => gnu/packages/base.scm +9 -2
@@ 1075,11 1075,18 @@ the store.")
                 ,@(if (target-hurd?)
                       '((add-after 'install 'augment-libc.so
                           (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")
                                 (("/[^ ]+/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)))

M gnu/packages/cross-base.scm => gnu/packages/cross-base.scm +9 -3
@@ 742,12 742,18 @@ returned."
               ,@(if (target-hurd? target)
                     '((add-after 'install 'augment-libc.so
                         (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")
                               (("/[^ ]+/lib/libc.so.0.3")
                                (string-append out "/lib/libc.so.0.3"
                                               " libmachuser.so libhurduser.so"))))
                           #t)))
                                               " 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"))))))
                     '())))))

      ;; Shadow the native "kernel-headers" because glibc's recipe expects the