utils: Define 'target-hurd?' predicate.

It behaves similarily to the other target-...? procedures.
The usage of hurd-triplet? / target-hurd? in libgc appears
incorrect to me, as (%current-system) is normally never false.

* gnu/packages/hurd.scm (hurd-triplet?): Move to ...
* guix/util.scm (target-hurd?): ... here, let its argument
  default to (%current-target-system) or (%current-system),
  and write a docstring.
* gnu/packages/hurd.scm
  (hurd-target?, hurd-system?): Use target-hurd? instead of
  hurd-triplet?.
* gnu/packages/bdw-gc.scm (libgc): Likewise.
* gnu/packages/cross-base.scm
  (cross-libc)[arguments]<#:configure-flags>: Likewise.
  (cross-libc)[arguments]<#:phases>: Likewise.
  (cross-libc)[arguments]<#:native-inputs>: Likewise.
* gnu/packages/make-boostrap.scm
  (%glibc-stripped)[inputs]: Likewise.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
Maxime Devos 2021-07-14 13:12:47 +02:00 committed by Mathieu Othacehe
parent ef71965c16
commit 637a1e7dcc
No known key found for this signature in database
GPG key ID: 8354763531769CA6
5 changed files with 16 additions and 13 deletions

View file

@ -505,7 +505,7 @@ and the cross tool chain."
,@(package-arguments libc))
((#:configure-flags flags)
`(cons ,(string-append "--host=" target)
,(if (hurd-triplet? target)
,(if (target-hurd? target)
`(cons "--disable-werror" ,flags)
flags)))
((#:phases phases)
@ -519,7 +519,7 @@ and the cross tool chain."
(setenv "CROSS_LIBRARY_PATH"
(string-append kernel "/lib")) ; for Hurd's libihash
#t)))
,@(if (hurd-triplet? target)
,@(if (target-hurd? target)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
@ -536,7 +536,7 @@ and the cross tool chain."
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
,@(if (hurd-triplet? target)
,@(if (target-hurd? target)
`(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders)
"cross-mig")))