* (unknown), @ 2017-01-02 19:22 manolis837 2017-01-02 19:22 ` [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd manolis837 0 siblings, 1 reply; 6+ messages in thread From: manolis837 @ 2017-01-02 19:22 UTC (permalink / raw) To: guix-devel Hello everyone, The idea behind this patch is to remove the ugly (string-match (or "i586-pc-gnu" "i586-gnu") ...) I had everywhere. Manolis ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. 2017-01-02 19:22 (unknown), manolis837 @ 2017-01-02 19:22 ` manolis837 2017-01-02 20:11 ` Kei Kebreau 0 siblings, 1 reply; 6+ messages in thread From: manolis837 @ 2017-01-02 19:22 UTC (permalink / raw) To: guix-devel 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. 2017-01-02 19:22 ` [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd manolis837 @ 2017-01-02 20:11 ` Kei Kebreau 2017-01-02 20:23 ` Manolis Ragkousis 0 siblings, 1 reply; 6+ messages in thread From: Kei Kebreau @ 2017-01-02 20:11 UTC (permalink / raw) To: manolis837; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 3957 bytes --] manolis837@gmail.com writes: > 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") 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? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. 2017-01-02 20:11 ` Kei Kebreau @ 2017-01-02 20:23 ` Manolis Ragkousis 2017-01-03 14:56 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Manolis Ragkousis @ 2017-01-02 20:23 UTC (permalink / raw) To: Kei Kebreau; +Cc: Guix-devel Hello Kei, On 2 January 2017 at 22:11, Kei Kebreau <kei@openmailbox.org> wrote: > > 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? If you merge master into core-updates locally, it's as simple as `guix build --target=i586-pc-gnu bootstrap-tarballs' You need to merge the two branches, because the one needs some patches from the other. Manolis ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. 2017-01-02 20:23 ` Manolis Ragkousis @ 2017-01-03 14:56 ` Ludovic Courtès 2017-01-03 15:08 ` Manolis Ragkousis 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2017-01-03 14:56 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel Hi! Manolis Ragkousis <manolis837@gmail.com> skribis: > Hello Kei, > > On 2 January 2017 at 22:11, Kei Kebreau <kei@openmailbox.org> wrote: >> >> 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? > > If you merge master into core-updates locally, it's as simple as `guix > build --target=i586-pc-gnu bootstrap-tarballs' Woohoo! > You need to merge the two branches, because the one needs some patches > from the other. Is it just 9b5f498deff516a9799a132fb04b40fb9ccfd7a6? That commit could also go to master. Thank you Manolis! Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. 2017-01-03 14:56 ` Ludovic Courtès @ 2017-01-03 15:08 ` Manolis Ragkousis 0 siblings, 0 replies; 6+ messages in thread From: Manolis Ragkousis @ 2017-01-03 15:08 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel Hello, On 01/03/17 16:56, Ludovic Courtès wrote: > Is it just 9b5f498deff516a9799a132fb04b40fb9ccfd7a6? That commit could > also go to master. Actually we also need b810a85019ab3c4ee1f889d0751b8eb06157dadc which sets gcc-5 as default. The latest Hurish glibc needs it. Manolis ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-03 15:08 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-02 19:22 (unknown), manolis837 2017-01-02 19:22 ` [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd manolis837 2017-01-02 20:11 ` Kei Kebreau 2017-01-02 20:23 ` Manolis Ragkousis 2017-01-03 14:56 ` Ludovic Courtès 2017-01-03 15:08 ` Manolis Ragkousis
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.