* [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd system.
@ 2015-08-14 14:39 Manolis Ragkousis
2015-08-16 8:17 ` Manolis Ragkousis
0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-08-14 14:39 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
Hello everyone,
This patch allows guix to build the final toolchain on a native Hurd
system, provided the tarballs
and a couple of patches for glibc/hurd. The latter will be a different
patch, after the Hurd guys review
them.
Manolis
[-- Attachment #2: 0002-gnu-commencement-Add-support-for-a-native-GNU-Hurd-s.patch --]
[-- Type: text/x-patch, Size: 9341 bytes --]
From a3d8c28775103c58012b76437a3ff0911bc158b0 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 14 Aug 2015 16:12:13 +0300
Subject: [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd
system.
* gnu/packages/commencement.scm (kernel-headers-boot0): New procedure.
(flex-boot0, bison-boot0, gnumach-headers-boot0, mig-boot0,
hurd-headers-boot0, hurd-minimal-boot0, hurd-kernel-headers-boot0): New variables.
(glibc-final-with-bootstrap-bash)[propagated-inputs]: Replace with kernel-headers-boot0.
[inputs]: Add "mig".
(glibc-final)[arguments]: Replace with kernel-headers-boot0.
---
gnu/packages/commencement.scm | 122 ++++++++++++++++++++++++++++++++++++------
1 file changed, 106 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d3f239f..1bfb593 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -27,15 +27,18 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages indent)
#:use-module (gnu packages file)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages guile)
#:use-module (gnu packages gettext)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages hurd)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
#:use-module (guix packages)
@@ -46,7 +49,8 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 vlist)
- #:use-module (ice-9 match))
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 regex))
;;; Commentary:
;;;
@@ -265,6 +269,43 @@
(current-source-location)
#:guile %bootstrap-guile)))
+(define flex-boot0
+ ;; This flex is needed to build Mig.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (indent (package-with-bootstrap-guile
+ (package-with-explicit-inputs indent %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (flex (package (inherit flex)
+ (native-inputs `())
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '())
+ (arguments '(#:tests? #f)))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs flex %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define bison-boot0
+ ;; This Bison is needed to build Mig so we need it early in the process.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (bison (package (inherit bison)
+ (native-inputs `(("perl" ,perl-boot0)))
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '()) ;remove Flex...
+ (arguments '(#:tests? #f
+ #:validate-runpath? #f))))) ;... and thus disable tests
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
(define (linux-libre-headers-boot0)
"Return Linux-Libre header files for the bootstrap environment."
;; Note: this is wrapped in a thunk to nicely handle circular dependencies
@@ -278,6 +319,58 @@
`(("perl" ,perl-boot0)
,@%boot0-inputs)))))
+(define gnumach-headers-boot0
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs gnumach-headers
+ %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+
+(define mig-boot0
+ (let ((mig (package (inherit mig)
+ (native-inputs `(("bison" ,bison-boot0)
+ ("flex" ,flex-boot0)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs mig %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-headers-boot0
+ (let ((hurd-headers (package (inherit hurd-headers)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-headers %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-minimal-boot0
+ (let ((hurd-minimal (package (inherit hurd-minimal)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-minimal %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define (hurd-kernel-headers-boot0)
+ "Return Hurd header and minimal-lib files for the bootstrap environment.".
+ (package-with-bootstrap-guile
+ (package (inherit hurd-kernel-headers)
+ (arguments `(#:guile ,%bootstrap-guile
+ ,@(package-arguments hurd-kernel-headers)))
+ (inputs
+ `(("gnumach-headers" ,gnumach-headers-boot0)
+ ("hurd-headers" ,hurd-headers-boot0)
+ ("hurd-minimal" ,hurd-minimal-boot0)
+ ,@%boot0-inputs)))))
+
+ (define* (kernel-headers-boot0 #:optional (system (%current-system)))
+ (match system
+ ("i586-pc-gnu" (hurd-kernel-headers-boot0))
+ (_ (linux-libre-headers-boot0))))
+
(define texinfo-boot0
;; Texinfo used to build libc's manual.
;; We build without ncurses because it fails to build at this stage, and
@@ -334,7 +427,7 @@
"export CPATH\n"
all "\n"))))
,phases)))))
- (propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
+ (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
@@ -343,6 +436,11 @@
;; it in $CPATH, hence the 'pre-configure' phase above.
,@%boot1-inputs
+ ;; A native Mig is needed to build Glibc on Hurd.
+ ,@(if (string-match "i586-gnu" (%current-system))
+ `(("mig" ,mig-boot0))
+ '())
+
;; A native GCC is needed to build `cross-rpcgen'.
("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
@@ -404,19 +502,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define bison-boot1
;; XXX: This Bison is needed to rebuild Bash's parser, which is modified by
;; its CVE patches. Remove it when it's no longer needed.
- (let* ((m4 (package-with-bootstrap-guile
- (package-with-explicit-inputs m4 %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile)))
- (bison (package (inherit bison)
- (native-inputs `(("perl" ,perl-boot0)))
- (propagated-inputs `(("m4" ,m4)))
- (inputs '()) ;remove Flex...
- (arguments '(#:tests? #f))))) ;... and thus disable tests
- (package-with-bootstrap-guile
- (package-with-explicit-inputs bison %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
+ (let ((bison (package (inherit bison-boot0))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot1-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
(define static-bash-for-glibc
;; A statically-linked Bash to be embedded in GLIBC-FINAL, for use by
@@ -489,7 +579,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; if 'allowed-references' were per-output.
(arguments
`(#:allowed-references
- ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0)
+ ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0)
(package-outputs glibc-final-with-bootstrap-bash))
,@(package-arguments glibc-final-with-bootstrap-bash)))))
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd system.
2015-08-14 14:39 [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd system Manolis Ragkousis
@ 2015-08-16 8:17 ` Manolis Ragkousis
2015-08-16 17:37 ` Manolis Ragkousis
0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-08-16 8:17 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 15 bytes --]
Updated patch.
[-- Attachment #2: 0001-gnu-commencement-Add-support-for-a-native-GNU-Hurd-s.patch --]
[-- Type: text/x-patch, Size: 9252 bytes --]
From f0d7050f2582e48c321b7a9158a2b7c83c521015 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 14 Aug 2015 16:12:13 +0300
Subject: [PATCH] gnu: commencement: Add support for a native GNU/Hurd system.
* gnu/packages/commencement.scm (kernel-headers-boot0): New procedure.
(flex-boot0, bison-boot0, gnumach-headers-boot0, mig-boot0,
hurd-headers-boot0, hurd-minimal-boot0, hurd-kernel-headers-boot0): New variables.
(glibc-final-with-bootstrap-bash)[propagated-inputs]: Replace with kernel-headers-boot0.
[inputs]: Add "mig".
(glibc-final)[arguments]: Replace with kernel-headers-boot0.
---
gnu/packages/commencement.scm | 122 ++++++++++++++++++++++++++++++++++++------
1 file changed, 106 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d3f239f..e9ef305 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -27,15 +27,18 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages indent)
#:use-module (gnu packages file)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages guile)
#:use-module (gnu packages gettext)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages hurd)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
#:use-module (guix packages)
@@ -46,7 +49,8 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 vlist)
- #:use-module (ice-9 match))
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 regex))
;;; Commentary:
;;;
@@ -265,6 +269,43 @@
(current-source-location)
#:guile %bootstrap-guile)))
+(define flex-boot0
+ ;; This Flex is needed to build Mig.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (indent (package-with-bootstrap-guile
+ (package-with-explicit-inputs indent %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (flex (package (inherit flex)
+ (native-inputs `())
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '())
+ (arguments '(#:tests? #f)))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs flex %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define bison-boot0
+ ;; This Bison is needed to build Mig so we need it early in the process.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (bison (package (inherit bison)
+ (native-inputs `(("perl" ,perl-boot0)))
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '()) ;remove Flex...
+ (arguments '(#:tests? #f
+ #:validate-runpath? #f))))) ;... and thus disable tests
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
(define (linux-libre-headers-boot0)
"Return Linux-Libre header files for the bootstrap environment."
;; Note: this is wrapped in a thunk to nicely handle circular dependencies
@@ -278,6 +319,58 @@
`(("perl" ,perl-boot0)
,@%boot0-inputs)))))
+(define gnumach-headers-boot0
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs gnumach-headers
+ %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+
+(define mig-boot0
+ (let ((mig (package (inherit mig)
+ (native-inputs `(("bison" ,bison-boot0)
+ ("flex" ,flex-boot0)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs mig %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-headers-boot0
+ (let ((hurd-headers (package (inherit hurd-headers)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-headers %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-minimal-boot0
+ (let ((hurd-minimal (package (inherit hurd-minimal)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-minimal %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define (hurd-kernel-headers-boot0)
+ "Return Hurd header and minimal-lib files for the bootstrap environment.".
+ (package-with-bootstrap-guile
+ (package (inherit hurd-kernel-headers)
+ (arguments `(#:guile ,%bootstrap-guile
+ ,@(package-arguments hurd-kernel-headers)))
+ (inputs
+ `(("gnumach-headers" ,gnumach-headers-boot0)
+ ("hurd-headers" ,hurd-headers-boot0)
+ ("hurd-minimal" ,hurd-minimal-boot0)
+ ,@%boot0-inputs)))))
+
+ (define* (kernel-headers-boot0 #:optional (system (%current-system)))
+ (match system
+ ("i586-gnu" (hurd-kernel-headers-boot0))
+ (_ (linux-libre-headers-boot0))))
+
(define texinfo-boot0
;; Texinfo used to build libc's manual.
;; We build without ncurses because it fails to build at this stage, and
@@ -334,7 +427,7 @@
"export CPATH\n"
all "\n"))))
,phases)))))
- (propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
+ (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
@@ -343,6 +436,11 @@
;; it in $CPATH, hence the 'pre-configure' phase above.
,@%boot1-inputs
+ ;; A native Mig is needed to build Glibc on Hurd.
+ ,@(if (string-match "i586-gnu" (%current-system))
+ `(("mig" ,mig-boot0))
+ '())
+
;; A native GCC is needed to build `cross-rpcgen'.
("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
@@ -404,19 +502,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define bison-boot1
;; XXX: This Bison is needed to rebuild Bash's parser, which is modified by
;; its CVE patches. Remove it when it's no longer needed.
- (let* ((m4 (package-with-bootstrap-guile
- (package-with-explicit-inputs m4 %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile)))
- (bison (package (inherit bison)
- (native-inputs `(("perl" ,perl-boot0)))
- (propagated-inputs `(("m4" ,m4)))
- (inputs '()) ;remove Flex...
- (arguments '(#:tests? #f))))) ;... and thus disable tests
- (package-with-bootstrap-guile
- (package-with-explicit-inputs bison %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
+ (let ((bison (package (inherit bison-boot0))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot1-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
(define static-bash-for-glibc
;; A statically-linked Bash to be embedded in GLIBC-FINAL, for use by
@@ -489,7 +579,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; if 'allowed-references' were per-output.
(arguments
`(#:allowed-references
- ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0)
+ ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0)
(package-outputs glibc-final-with-bootstrap-bash))
,@(package-arguments glibc-final-with-bootstrap-bash)))))
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd system.
2015-08-16 8:17 ` Manolis Ragkousis
@ 2015-08-16 17:37 ` Manolis Ragkousis
2015-08-18 11:07 ` Manolis Ragkousis
0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-08-16 17:37 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
I forgot to add the part that points libpthread's makefile to the
libihash lib to link against.
Unless I do that, ld fails to find -lihash.
Updated patch.
[-- Attachment #2: 0001-gnu-commencement-Add-support-for-a-native-GNU-Hurd-s.patch --]
[-- Type: text/x-patch, Size: 10056 bytes --]
From 690c42a18df0e4fff6145e0a9c4258ce5cefee7b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 14 Aug 2015 16:12:13 +0300
Subject: [PATCH] gnu: commencement: Add support for a native GNU/Hurd system.
* gnu/packages/commencement.scm (kernel-headers-boot0): New procedure.
(flex-boot0, bison-boot0, gnumach-headers-boot0, mig-boot0,
hurd-headers-boot0, hurd-minimal-boot0, hurd-kernel-headers-boot0): New variables.
(glibc-final-with-bootstrap-bash)[propagated-inputs]: Replace with kernel-headers-boot0.
[inputs]: Add "mig".
(glibc-final)[arguments]: Replace with kernel-headers-boot0.
---
gnu/packages/commencement.scm | 131 ++++++++++++++++++++++++++++++++++++------
1 file changed, 115 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d3f239f..ac12843 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -27,15 +27,18 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
+ #:use-module (gnu packages indent)
#:use-module (gnu packages file)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages guile)
#:use-module (gnu packages gettext)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages hurd)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
#:use-module (guix packages)
@@ -46,7 +49,8 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 vlist)
- #:use-module (ice-9 match))
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 regex))
;;; Commentary:
;;;
@@ -265,6 +269,43 @@
(current-source-location)
#:guile %bootstrap-guile)))
+(define flex-boot0
+ ;; This Flex is needed to build Mig.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (indent (package-with-bootstrap-guile
+ (package-with-explicit-inputs indent %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (flex (package (inherit flex)
+ (native-inputs `())
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '())
+ (arguments '(#:tests? #f)))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs flex %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define bison-boot0
+ ;; This Bison is needed to build Mig so we need it early in the process.
+ (let* ((m4 (package-with-bootstrap-guile
+ (package-with-explicit-inputs m4 %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+ (bison (package (inherit bison)
+ (native-inputs `(("perl" ,perl-boot0)))
+ (propagated-inputs `(("m4" ,m4)))
+ (inputs '()) ;remove Flex...
+ (arguments '(#:tests? #f
+ #:validate-runpath? #f))))) ;... and thus disable tests
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
(define (linux-libre-headers-boot0)
"Return Linux-Libre header files for the bootstrap environment."
;; Note: this is wrapped in a thunk to nicely handle circular dependencies
@@ -278,6 +319,58 @@
`(("perl" ,perl-boot0)
,@%boot0-inputs)))))
+(define gnumach-headers-boot0
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs gnumach-headers
+ %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile)))
+
+(define mig-boot0
+ (let ((mig (package (inherit mig)
+ (native-inputs `(("bison" ,bison-boot0)
+ ("flex" ,flex-boot0)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs mig %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-headers-boot0
+ (let ((hurd-headers (package (inherit hurd-headers)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-headers %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define hurd-minimal-boot0
+ (let ((hurd-minimal (package (inherit hurd-minimal)
+ (native-inputs `(("mig" ,mig)))
+ (inputs '()))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs hurd-minimal %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
+(define (hurd-kernel-headers-boot0)
+ "Return Hurd header and minimal-lib files for the bootstrap environment.".
+ (package-with-bootstrap-guile
+ (package (inherit hurd-kernel-headers)
+ (arguments `(#:guile ,%bootstrap-guile
+ ,@(package-arguments hurd-kernel-headers)))
+ (inputs
+ `(("gnumach-headers" ,gnumach-headers-boot0)
+ ("hurd-headers" ,hurd-headers-boot0)
+ ("hurd-minimal" ,hurd-minimal-boot0)
+ ,@%boot0-inputs)))))
+
+ (define* (kernel-headers-boot0 #:optional (system (%current-system)))
+ (match system
+ ("i586-gnu" (hurd-kernel-headers-boot0))
+ (_ (linux-libre-headers-boot0))))
+
(define texinfo-boot0
;; Texinfo used to build libc's manual.
;; We build without ncurses because it fails to build at this stage, and
@@ -327,6 +420,15 @@
(setenv "NATIVE_CPATH" (getenv "CPATH"))
(unsetenv "CPATH")
+ ;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
+ ,@(if (string-match "i586-gnu" (%current-system))
+ `((substitute* "libpthread/Makefile"
+ (("LDLIBS-pthread.so =.*")
+ (string-append "LDLIBS-pthread.so = "
+ (assoc-ref %build-inputs "kernel-headers")
+ "/lib/libihash.a\n"))))
+ '())
+
;; 'rpcgen' needs native libc headers to be built.
(substitute* "sunrpc/Makefile"
(("sunrpc-CPPFLAGS =.*" all)
@@ -334,7 +436,7 @@
"export CPATH\n"
all "\n"))))
,phases)))))
- (propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
+ (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
@@ -343,6 +445,11 @@
;; it in $CPATH, hence the 'pre-configure' phase above.
,@%boot1-inputs
+ ;; A native Mig is needed to build Glibc on Hurd.
+ ,@(if (string-match "i586-gnu" (%current-system))
+ `(("mig" ,mig-boot0))
+ '())
+
;; A native GCC is needed to build `cross-rpcgen'.
("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
@@ -404,19 +511,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define bison-boot1
;; XXX: This Bison is needed to rebuild Bash's parser, which is modified by
;; its CVE patches. Remove it when it's no longer needed.
- (let* ((m4 (package-with-bootstrap-guile
- (package-with-explicit-inputs m4 %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile)))
- (bison (package (inherit bison)
- (native-inputs `(("perl" ,perl-boot0)))
- (propagated-inputs `(("m4" ,m4)))
- (inputs '()) ;remove Flex...
- (arguments '(#:tests? #f))))) ;... and thus disable tests
- (package-with-bootstrap-guile
- (package-with-explicit-inputs bison %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
+ (let ((bison (package (inherit bison-boot0))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs bison %boot1-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
(define static-bash-for-glibc
;; A statically-linked Bash to be embedded in GLIBC-FINAL, for use by
@@ -489,7 +588,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; if 'allowed-references' were per-output.
(arguments
`(#:allowed-references
- ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0)
+ ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0)
(package-outputs glibc-final-with-bootstrap-bash))
,@(package-arguments glibc-final-with-bootstrap-bash)))))
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-18 11:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 14:39 [PATCH 2/2] gnu: commencement: Add support for a native GNU/Hurd system Manolis Ragkousis
2015-08-16 8:17 ` Manolis Ragkousis
2015-08-16 17:37 ` Manolis Ragkousis
2015-08-18 11:07 ` Manolis Ragkousis
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).