summaryrefslogtreecommitdiff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-12-16 15:36:48 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-16 16:28:07 +0100
commit92391eaf8df8fecbf6844c57ce5bcd3014eb5d28 (patch)
tree277791478f65b915ee3dc3e3b901154e380ffd3c /gnu/packages/cross-base.scm
parent8327e733966cc4a93dfaadd1a761ca1088078baa (diff)
downloadpatches-92391eaf8df8fecbf6844c57ce5bcd3014eb5d28.tar
patches-92391eaf8df8fecbf6844c57ce5bcd3014eb5d28.tar.gz
gnu: glibc: Add patch implementing "pid/…" magic lookup on the Hurd.
This patch is missing from glibc 2.28 and is needed to support /proc/self lookup when using the Hurd's procfs, which in turn is needed for our 'guile-relocatable.patch'. See <https://lists.gnu.org/archive/html/bug-hurd/2018-12/msg00024.html>. * gnu/packages/patches/glibc-hurd-magic-pid.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc)[arguments]: Add 'apply-hurd-patch' phase. [native-inputs]: Add "hurd-magic-pid-patch" input. * gnu/packages/cross-base.scm (cross-libc)[arguments]: Duplicate 'apply-hurd-patch' phase.
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2fcb7fb36b..bb3d6d916a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -454,6 +454,23 @@ XBINUTILS and the cross tool chain."
flags)))
((#:phases phases)
`(modify-phases ,phases
+ ;; XXX: The hack below allows us to make sure the
+ ;; 'apply-hurd-patch' phase gets added in the first
+ ;; cross-libc, but does *not* get added twice subsequently
+ ;; when cross-building another libc.
+ ,@(if (and (hurd-triplet? target)
+ (not (hurd-target?)))
+ `((add-after 'unpack 'apply-hurd-patch
+ (lambda* (#:key inputs native-inputs
+ #:allow-other-keys)
+ ;; TODO: Move this to 'patches' field.
+ (let ((patch (or (assoc-ref native-inputs
+ "hurd-magic-pid-patch")
+ (assoc-ref inputs
+ "hurd-magic-pid-patch"))))
+ (invoke "patch" "-p1" "--force" "--input"
+ patch)))))
+ '())
(add-before 'configure 'set-cross-kernel-headers-path
(lambda* (#:key inputs #:allow-other-keys)
(let* ((kernel (assoc-ref inputs "kernel-headers"))
@@ -477,7 +494,9 @@ XBINUTILS and the cross tool chain."
,@(if (hurd-triplet? target)
`(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders)
- "cross-mig")))
+ "cross-mig"))
+ ("hurd-magic-pid-patch"
+ ,(search-patch "glibc-hurd-magic-pid.patch")))
'())
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc)))))))