summaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm75
1 files changed, 51 insertions, 24 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c52b6e8389..5f3faad105 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -170,6 +170,26 @@
,cf)))))
(inputs %boot0-inputs))))
+(define libstdc++-boot0
+ ;; GCC's libcc1 is always built as a shared library (the top-level
+ ;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer
+ ;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on
+ ;; C++14 features missing in our bootstrap compiler.
+ (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9))))
+ (package
+ (inherit lib)
+ (name "libstdc++-boot0")
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:implicit-inputs? #f
+
+ ;; XXX: libstdc++.so NEEDs ld.so for some reason.
+ #:validate-runpath? #f
+
+ ,@(package-arguments lib)))
+ (inputs %boot0-inputs)
+ (native-inputs '()))))
+
(define gcc-boot0
(package-with-bootstrap-guile
(package (inherit gcc)
@@ -255,14 +275,13 @@
("mpc-source" ,(package-source mpc))
("binutils-cross" ,binutils-boot0)
+ ;; The libstdc++ that libcc1 links against.
+ ("libstdc++" ,libstdc++-boot0)
+
;; Call it differently so that the builder can check whether
;; the "libc" input is #f.
("libc-native" ,@(assoc-ref %boot0-inputs "libc"))
- ,@(alist-delete "libc" %boot0-inputs)))
-
- ;; No need for Texinfo at this stage.
- (native-inputs (alist-delete "texinfo"
- (package-native-inputs gcc))))))
+ ,@(alist-delete "libc" %boot0-inputs))))))
(define perl-boot0
(let ((perl (package
@@ -270,21 +289,24 @@
(name "perl-boot0")
(replacement #f)
(arguments
- (substitute-keyword-arguments (package-arguments perl)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Pthread support is missing in the bootstrap compiler
- ;; (broken spec file), so disable it.
- (add-before 'configure 'disable-pthreads
- (lambda _
- (substitute* "Configure"
- (("^libswanted=(.*)pthread" _ before)
- (string-append "libswanted=" before))))))))))))
- (package-with-bootstrap-guile
- (package-with-explicit-inputs perl
- %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
+ ;; At the very least, this must not depend on GCC & co.
+ (let ((args `(#:disallowed-references
+ ,(list %bootstrap-binutils))))
+ (substitute-keyword-arguments (package-arguments perl)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Pthread support is missing in the bootstrap compiler
+ ;; (broken spec file), so disable it.
+ (add-before 'configure 'disable-pthreads
+ (lambda _
+ (substitute* "Configure"
+ (("^libswanted=(.*)pthread" _ before)
+ (string-append "libswanted=" before)))))))))))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs perl
+ %boot0-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
(define (linux-libre-headers-boot0)
"Return Linux-Libre header files for the bootstrap environment."
@@ -306,7 +328,12 @@
;; Also, use %BOOT0-INPUTS to avoid building Perl once more.
(let ((texinfo (package (inherit texinfo)
(native-inputs '())
- (inputs `(("perl" ,perl-boot0))))))
+ (inputs `(("perl" ,perl-boot0)))
+
+ ;; Some of Texinfo 6.1's tests would fail with "Couldn't
+ ;; set UTF-8 character type in locale" but we don't have a
+ ;; UTF-8 locale at this stage, so skip them.
+ (arguments '(#:tests? #f)))))
(package-with-bootstrap-guile
(package-with-explicit-inputs texinfo %boot0-inputs
(current-source-location)
@@ -355,7 +382,7 @@
"export CPATH\n"
all "\n"))))
,phases)))))
- (propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
+ (propagated-inputs `(("kernel-headers" ,(linux-libre-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
@@ -874,10 +901,10 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.")
(gcc-toolchain gcc-4.8))
(define-public gcc-toolchain-4.9
- (gcc-toolchain gcc-final))
+ (gcc-toolchain gcc-4.9))
(define-public gcc-toolchain-5
- (gcc-toolchain gcc-5))
+ (gcc-toolchain gcc-final))
(define-public gcc-toolchain-6
(gcc-toolchain gcc-6))