From 557b5557d83d29b1616b6e19dabe4d4d1ef7fcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 10 Dec 2015 11:54:57 +0100 Subject: gnu: commencement: Restrict allowed references for libstdc++. * gnu/packages/commencement.scm (libstdc++)[arguments]: Add #:allowed-references. --- gnu/packages/commencement.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 73b0ce4364..102f2aee0f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -526,7 +526,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (arguments `(#:guile ,%bootstrap-guile #:implicit-inputs? #f - + #:allowed-references ("out") #:out-of-source? #t #:phases (alist-cons-before 'configure 'chdir -- cgit v1.2.3 From 52cfd8cb54e011f3446bf6697a69783b60ef835d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 11 Dec 2015 23:42:39 +0100 Subject: gnu: gcc-final: Remove unnecessary CPPFLAGS. * gnu/packages/commencement.scm (gcc-final)[arguments]: Remove unnecessary CPPFLAGS from #:make-flags. --- gnu/packages/commencement.scm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 102f2aee0f..b958544e25 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -582,18 +582,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ((_ rest ...) (loop rest))))) ((#:make-flags flags) - ;; Since $LIBRARY_PATH and $CPATH are not honored, add the - ;; relevant flags. - `(cons (string-append "CPPFLAGS=-I" - (assoc-ref %build-inputs "libstdc++") - "/include") - (map (lambda (flag) - (if (string-prefix? "LDFLAGS=" flag) - (string-append flag " -L" - (assoc-ref %build-inputs "libstdc++") - "/lib") - flag)) - ,flags))) + ;; Since $LIBRARY_PATH is not honored, add the relevant flags. + `(map (lambda (flag) + (if (string-prefix? "LDFLAGS=" flag) + (string-append flag " -L" + (assoc-ref %build-inputs "libstdc++") + "/lib") + flag)) + ,flags)) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) -- cgit v1.2.3 From 98bd851ee891ca4a84e061fe1e78ba78c292b096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 11 Dec 2015 23:45:29 +0100 Subject: gnu: gcc: Use the system zlib. * gnu/packages/gcc.scm (gcc-4.7) : Pass '--with-system-zlib'. * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Remove '--with-system-zlib' from the configure flags. * gnu/packages/commencement.scm (zlib-final): New variable. (gcc-final)[arguments]: Add ZLIB-FINAL to #:allowed-references. Pass -L and -Wl,-rpath for zlib in LDFLAGS, as a configure flag. [inputs]: Add LD-WRAPPER-BOOT3 and ZLIB-FINAL. --- gnu/packages/commencement.scm | 49 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index b958544e25..1b0497227f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -204,7 +204,8 @@ "--disable-libssp" "--disable-libquadmath" "--disable-decimal-float") - (remove (cut string-match "--enable-languages.*" <>) + (remove (cut string-match + "--(with-system-zlib|enable-languages.*)" <>) ,flags))) ((#:phases phases) `(alist-cons-after @@ -548,6 +549,25 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (propagated-inputs '()) (synopsis "GNU C++ standard library (intermediate)")))) +(define zlib-final + ;; Zlib used by GCC-FINAL. + (package-with-bootstrap-guile + (package + (inherit zlib) + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f + #:allowed-references ("out" ,glibc-final) + ,@(package-arguments zlib))) + (inputs %boot2-inputs)))) + +(define ld-wrapper-boot3 + ;; A linker wrapper that uses the bootstrap Guile. + (make-ld-wrapper "ld-wrapper-boot3" + #:binutils binutils-final + #:guile %bootstrap-guile + #:bash (car (assoc-ref %boot2-inputs "bash")))) + (define gcc-final ;; The final GCC. (package (inherit gcc-boot0) @@ -562,7 +582,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" `(#:guile ,%bootstrap-guile #:implicit-inputs? #f - #:allowed-references ("out" "lib" + #:allowed-references ("out" "lib" ,zlib-final ,glibc-final ,static-bash-for-glibc) ;; Things like libasan.so and libstdc++.so NEED ld.so for some @@ -583,13 +603,15 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (loop rest))))) ((#:make-flags flags) ;; Since $LIBRARY_PATH is not honored, add the relevant flags. - `(map (lambda (flag) - (if (string-prefix? "LDFLAGS=" flag) - (string-append flag " -L" - (assoc-ref %build-inputs "libstdc++") - "/lib") - flag)) - ,flags)) + `(let ((zlib (assoc-ref %build-inputs "zlib"))) + (map (lambda (flag) + (if (string-prefix? "LDFLAGS=" flag) + (string-append flag " -L" + (assoc-ref %build-inputs "libstdc++") + "/lib -L" zlib "/lib -Wl,-rpath=" + zlib "/lib") + flag)) + ,flags))) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) @@ -604,17 +626,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp))) ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) + ("ld-wrapper" ,ld-wrapper-boot3) ("binutils" ,binutils-final) ("libstdc++" ,libstdc++) + ("zlib" ,zlib-final) ,@%boot2-inputs)))) -(define ld-wrapper-boot3 - ;; A linker wrapper that uses the bootstrap Guile. - (make-ld-wrapper "ld-wrapper-boot3" - #:binutils binutils-final - #:guile %bootstrap-guile - #:bash (car (assoc-ref %boot2-inputs "bash")))) - (define %boot3-inputs ;; 4th stage inputs. `(("gcc" ,gcc-final) -- cgit v1.2.3 From 4de35074833742e45237464bb1727ce1a55f3336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 12 Dec 2015 22:14:57 +0100 Subject: gnu: perl: Update to 5.22.0. * gnu/packages/perl.scm (perl)[source]: Update to 5.22.0. Remove "perl-module-pluggable-search.patch" since Module::Pluggable appears to be gone. [arguments] : Adjust Cwd.pm file name. Replace -std=c89 with -std=gnu89. * gnu/packages/commencement.scm (perl-boot0): Add 'disable-pthreads' phase. * gnu/packages/patches/perl-no-sys-dirs.patch: Update. * gnu/packages/patches/perl-module-pluggable-search.patch: Remove. * gnu-system.am (dist_patch_DATA): Adjust accordingly. --- gnu/packages/commencement.scm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 1b0497227f..3ddaa98c2f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -260,11 +260,24 @@ (package-native-inputs gcc)))))) (define perl-boot0 - (package-with-bootstrap-guile - (package-with-explicit-inputs perl - %boot0-inputs - (current-source-location) - #:guile %bootstrap-guile))) + (let ((perl (package + (inherit perl) + (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)))) (define (linux-libre-headers-boot0) "Return Linux-Libre header files for the bootstrap environment." -- cgit v1.2.3 From 775e6fe456106298e5b2cb0e3564e2147928f0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 13 Dec 2015 11:35:53 +0100 Subject: gnu: commencement: Initial Texinfo uses initial Perl. * gnu/packages/commencement.scm (texinfo-boot0)[inputs]: Use PERL-BOOT0. --- gnu/packages/commencement.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 3ddaa98c2f..116ca7c647 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -299,7 +299,7 @@ ;; Also, use %BOOT0-INPUTS to avoid building Perl once more. (let ((texinfo (package (inherit texinfo) (native-inputs '()) - (inputs (alist-delete "ncurses" (package-inputs texinfo)))))) + (inputs `(("perl" ,perl-boot0)))))) (package-with-bootstrap-guile (package-with-explicit-inputs texinfo %boot0-inputs (current-source-location) -- cgit v1.2.3 From 304e4f513580ed0f141f5ea6ae8289b4476e2ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 15 Dec 2015 18:03:29 +0100 Subject: gnu: grep: Add missing dependency on Perl. * gnu/packages/base.scm (grep)[native-inputs]: New field. * gnu/packages/commencement.scm (grep-final): Likewise. --- gnu/packages/commencement.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 116ca7c647..8aa32e859d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -728,7 +728,9 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ;; The final grep. Gzip holds a reference to it (via zgrep), so it must be ;; built before gzip. (package-with-bootstrap-guile - (package-with-explicit-inputs grep + (package-with-explicit-inputs (package + (inherit grep) + (native-inputs `(("perl" ,perl-boot0)))) %boot5-inputs (current-source-location) #:guile guile-final))) -- cgit v1.2.3 From 8309c3899aee9429df51eba4566c67d0cc27f68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 18 Dec 2015 16:58:09 +0100 Subject: gnu: commencement: Use GMP 6.0.0a for bootstrapping. * gnu/packages/multiprecision.scm (gmp-6.0): New variable. * gnu/packages/commencement.scm (gcc-boot0, gcc-final): Use it. * gnu/packages/patches/gmp-arm-asm-nothumb.patch: New file, reinstated from before e414a7d. * gnu-system.am (dist_patch_DATA): Add it. --- gnu/packages/commencement.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8aa32e859d..eda04325f0 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -231,7 +231,7 @@ (package-full-name lib) char-set:letter) ,(package-name lib))) - (list gmp mpfr mpc)))) + (list gmp-6.0 mpfr mpc)))) (alist-cons-after 'install 'symlink-libgcc_eh (lambda* (#:key outputs #:allow-other-keys) @@ -245,7 +245,7 @@ (symlink "libgcc.a" "libgcc_eh.a")))) ,phases)))))) - (inputs `(("gmp-source" ,(package-source gmp)) + (inputs `(("gmp-source" ,(package-source gmp-6.0)) ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) ("binutils-cross" ,binutils-boot0) @@ -636,7 +636,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("static-bash" ,static-bash-for-glibc) ,@(package-native-inputs gcc-boot0))) - (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp))) + (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0))) ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) ("ld-wrapper" ,ld-wrapper-boot3) -- cgit v1.2.3 From 09964b4fc612c55f7a2e519429d318469830c921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 18 Dec 2015 22:17:47 +0100 Subject: gnu: commencement: Add "-boot0" to early packages. * gnu/packages/commencement.scm (diffutils-boot0)[name]: New field. * gnu/packages/commencement.scm (findutils-boot0, file-boot0, perl-boot0): Change 'name' field to include "-boot0". --- gnu/packages/commencement.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index eda04325f0..578ded215f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -92,12 +92,15 @@ ,@%bootstrap-inputs) #:guile %bootstrap-guile))) (package (inherit p) + (name "diffutils-boot0") (arguments `(#:tests? #f ; the test suite needs diffutils ,@(package-arguments p))))))) (define findutils-boot0 (package-with-bootstrap-guile - (package-with-explicit-inputs findutils + (package-with-explicit-inputs (package + (inherit findutils) + (name "findutils-boot0")) `(("make" ,gnu-make-boot0) ("diffutils" ,diffutils-boot0) ; for tests ,@%bootstrap-inputs) @@ -106,7 +109,9 @@ (define file-boot0 (package-with-bootstrap-guile - (package-with-explicit-inputs file + (package-with-explicit-inputs (package + (inherit file) + (name "file-boot0")) `(("make" ,gnu-make-boot0) ,@%bootstrap-inputs) (current-source-location) @@ -262,6 +267,7 @@ (define perl-boot0 (let ((perl (package (inherit perl) + (name "perl-boot0") (arguments (substitute-keyword-arguments (package-arguments perl) ((#:phases phases) -- cgit v1.2.3 From 32243bfb57aa5d280b4949954af2df9c93b327e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 18 Dec 2015 23:50:15 +0100 Subject: gnu: commencement: Avoid redundant Perl rebuild. This removes a redundant (yet different) "perl-boot0" node from the early derivation graph. * gnu/packages/commencement.scm (bison-boot1): Move 'native-inputs' field to the final package. Previously PERL-BOOT0 got rebuilt with %BOOT0-INPUTS, leading to a different derivation. (static-bash-for-glibc): Likewise. --- gnu/packages/commencement.scm | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 578ded215f..7c13ecf598 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -429,14 +429,15 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (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)))) + (package + (inherit (package-with-bootstrap-guile + (package-with-explicit-inputs bison %boot0-inputs + (current-source-location) + #:guile %bootstrap-guile))) + (native-inputs `(("perl" ,perl-boot0)))))) (define static-bash-for-glibc ;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co. @@ -444,17 +445,18 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" glibc-final-with-bootstrap-bash (car (assoc-ref %boot1-inputs "bash")))) (bash (package (inherit static-bash) - (native-inputs `(("bison" ,bison-boot1))) (arguments `(#:guile ,%bootstrap-guile - ,@(package-arguments static-bash)))))) - (package-with-bootstrap-guile - (package-with-explicit-inputs bash - `(("gcc" ,gcc) - ("libc" ,glibc-final-with-bootstrap-bash) - ,@(fold alist-delete %boot1-inputs - '("gcc" "libc"))) - (current-source-location))))) + ,@(package-arguments static-bash))))) + (inputs `(("gcc" ,gcc) + ("libc" ,glibc-final-with-bootstrap-bash) + ,@(fold alist-delete %boot1-inputs + '("gcc" "libc"))))) + (package + (inherit (package-with-bootstrap-guile + (package-with-explicit-inputs bash inputs + (current-source-location)))) + (native-inputs `(("bison" ,bison-boot1)))))) (define gettext-boot0 ;; A minimal gettext used during bootstrap. -- cgit v1.2.3 From f1e0c85ad23071ea5b1dbcee1474ec34a5de7422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 18 Dec 2015 23:57:11 +0100 Subject: gnu: commencement: Build the final Bash with "bison-boot1". This removes a round of Bison + Flex + M4 + Perl rebuild. * gnu/packages/commencement.scm (bash-final): Add 'native-inputs' field pointing to BISON-BOOT1. --- gnu/packages/commencement.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 7c13ecf598..32facf2f47 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -662,11 +662,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define bash-final ;; Link with `-static-libgcc' to make sure we don't retain a reference ;; to the bootstrap GCC. - (package-with-bootstrap-guile - (package-with-explicit-inputs (static-libgcc-package bash) - %boot3-inputs - (current-source-location) - #:guile %bootstrap-guile))) + (package + (inherit (package-with-bootstrap-guile + (package-with-explicit-inputs (static-libgcc-package bash) + %boot3-inputs + (current-source-location) + #:guile %bootstrap-guile))) + (native-inputs `(("bison" ,bison-boot1))))) (define %boot4-inputs ;; Now use the final Bash. -- cgit v1.2.3 From 53088d0045a04b382a18a8fd171bc3e6560c6a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 19 Dec 2015 00:00:46 +0100 Subject: gnu: commencement: Build Bison deterministically. Before that entries in liby.a would contain the build time. * gnu/packages/commencement.scm (bison-boot1): Add #:make-flags. --- gnu/packages/commencement.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 32facf2f47..d758913859 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -431,7 +431,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (bison (package (inherit bison) (propagated-inputs `(("m4" ,m4))) (inputs '()) ;remove Flex... - (arguments '(#:tests? #f))))) ;... and thus disable tests + (arguments + '(#:tests? #f ;... and thus disable tests + + ;; Zero timestamps in liby.a; this must be done + ;; explicitly here because the bootstrap Binutils don't + ;; do that (default is "cru".) + #:make-flags '("ARFLAGS=crD" "RANLIB=ranlib -D" + "V=1")))))) (package (inherit (package-with-bootstrap-guile (package-with-explicit-inputs bison %boot0-inputs -- cgit v1.2.3