~ruther/guix-local

62596a158b4878e3f4b64f3e0f3a3f846228afd4 — Manolis Ragkousis 9 years ago 6a37872
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.
M gnu/packages/commencement.scm => gnu/packages/commencement.scm +2 -2
@@ 474,7 474,7 @@ the bootstrap environment."
                 (unsetenv "CPATH")

                 ;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
                 ,@(if (string-match "i586-gnu" (%current-system))
                 ,@(if (hurd-triplet? (%current-system))
                       `((substitute* "libpthread/Makefile"
                           (("LDLIBS-pthread.so =.*")
                            (string-append "LDLIBS-pthread.so = "


@@ 499,7 499,7 @@ the bootstrap environment."
        ,@%boot1-inputs

        ;; 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))
              '())


M gnu/packages/cross-base.scm => gnu/packages/cross-base.scm +1 -1
@@ 468,7 468,7 @@ XBINUTILS and the cross tool chain."

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

M gnu/packages/hurd.scm => gnu/packages/hurd.scm +6 -1
@@ 28,7 28,12 @@
  #:use-module (gnu packages bison)
  #:use-module (gnu packages perl)
  #: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
  (package

M gnu/packages/make-bootstrap.scm => gnu/packages/make-bootstrap.scm +0 -4
@@ 337,10 337,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
  ;; GNU libc's essential shared libraries, dynamic linker, and headers,
  ;; with all references to store directories stripped.  As a result,
  ;; 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)))
    (package (inherit glibc)
      (name "glibc-stripped")