From: manolis837@gmail.com
To: guix-devel@gnu.org
Subject: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd.
Date: Mon, 2 Jan 2017 21:22:22 +0200 [thread overview]
Message-ID: <20170102192222.17305-2-manolis837@gmail.com> (raw)
In-Reply-To: <20170102192222.17305-1-manolis837@gmail.com>
From: Manolis Ragkousis <manolis837@gmail.com>
* 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")
--
2.11.0
next prev parent reply other threads:[~2017-01-02 19:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-02 19:22 (unknown), manolis837
2017-01-02 19:22 ` manolis837 [this message]
2017-01-02 20:11 ` [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd Kei Kebreau
2017-01-02 20:23 ` Manolis Ragkousis
2017-01-03 14:56 ` Ludovic Courtès
2017-01-03 15:08 ` Manolis Ragkousis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170102192222.17305-2-manolis837@gmail.com \
--to=manolis837@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).