gnu: Use hurd-triplet? to check if GNU/Hurd.

* gnu/packages/make-bootstrap.scm (hurd-triplet?): Move it from here..
* gnu/packages/hurd.scm: ..to here. New exported procedure.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)
  [arguments]: Replace string-match.
  [inputs]: Same.
* gnu/packages/cross-base.scm (cross-libc)[native-inputs]: Same.
This commit is contained in:
Manolis Ragkousis 2017-01-02 21:07:59 +02:00
parent 6a37872cd2
commit 62596a158b
No known key found for this signature in database
GPG key ID: 327C1EF38DF54C32
4 changed files with 9 additions and 8 deletions

View file

@ -474,7 +474,7 @@ (define glibc-final-with-bootstrap-bash
(unsetenv "CPATH") (unsetenv "CPATH")
;; Tell 'libpthread' where to find 'libihash' on Hurd systems. ;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
,@(if (string-match "i586-gnu" (%current-system)) ,@(if (hurd-triplet? (%current-system))
`((substitute* "libpthread/Makefile" `((substitute* "libpthread/Makefile"
(("LDLIBS-pthread.so =.*") (("LDLIBS-pthread.so =.*")
(string-append "LDLIBS-pthread.so = " (string-append "LDLIBS-pthread.so = "
@ -499,7 +499,7 @@ (define glibc-final-with-bootstrap-bash
,@%boot1-inputs ,@%boot1-inputs
;; A native MiG is needed to build Glibc on Hurd. ;; A native MiG is needed to build Glibc on Hurd.
,@(if (string-match "i586-gnu" (%current-system)) ,@(if (hurd-triplet? (%current-system))
`(("mig" ,mig-boot0)) `(("mig" ,mig-boot0))
'()) '())

View file

@ -468,7 +468,7 @@ (define (cross-libc-for-target target)
(native-inputs `(("cross-gcc" ,xgcc) (native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils) ("cross-binutils" ,xbinutils)
,@(if (string-match (or "i586-pc-gnu" "i586-gnu") target) ,@(if (hurd-triplet? target)
`(("cross-mig" `(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders) ,@(assoc-ref (package-native-inputs xheaders)
"cross-mig"))) "cross-mig")))

View file

@ -28,7 +28,12 @@ (define-module (gnu packages hurd)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (guix git-download)) #:use-module (guix git-download)
#:export (hurd-triplet?))
(define (hurd-triplet? triplet)
(and (string-suffix? "-gnu" triplet)
(not (string-contains triplet "linux"))))
(define-public gnumach-headers (define-public gnumach-headers
(package (package

View file

@ -337,10 +337,6 @@ (define (%glibc-stripped)
;; GNU libc's essential shared libraries, dynamic linker, and headers, ;; GNU libc's essential shared libraries, dynamic linker, and headers,
;; with all references to store directories stripped. As a result, ;; with all references to store directories stripped. As a result,
;; libc.so is unusable and need to be patched for proper relocation. ;; libc.so is unusable and need to be patched for proper relocation.
(define (hurd-triplet? triplet)
(and (string-suffix? "-gnu" triplet)
(not (string-contains triplet "linux"))))
(let ((glibc (glibc-for-bootstrap))) (let ((glibc (glibc-for-bootstrap)))
(package (inherit glibc) (package (inherit glibc)
(name "glibc-stripped") (name "glibc-stripped")