[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd.
From: |
Kei Kebreau |
Subject: |
Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. |
Date: |
Mon, 02 Jan 2017 15:11:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
address@hidden writes:
> From: Manolis Ragkousis <address@hidden>
>
> * 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.
> ---
> gnu/packages/commencement.scm | 4 ++--
> gnu/packages/cross-base.scm | 2 +-
> gnu/packages/hurd.scm | 7 ++++++-
> gnu/packages/make-bootstrap.scm | 4 ----
> 4 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index fa72e1a38..273e3ca80 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -497,7 +497,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 = "
> @@ -522,7 +522,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))
> '())
>
> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> index 763bbf50e..a3dfb8f47 100644
> --- a/gnu/packages/cross-base.scm
> +++ b/gnu/packages/cross-base.scm
> @@ -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")))
> diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
> index 3b79eab3d..557091d05 100644
> --- a/gnu/packages/hurd.scm
> +++ b/gnu/packages/hurd.scm
> @@ -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
> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
> index 44a7fd3a1..e5c614cee 100644
> --- a/gnu/packages/make-bootstrap.scm
> +++ b/gnu/packages/make-bootstrap.scm
> @@ -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")
LGTM. I assume this one will be pushed to master as well?
P.S. Is there currently a way to successfully build the bootstrap
binaries for Hurd from Guix on x86_64 Linux?
signature.asc
Description: PGP signature