From 9ae7cee342db1abe9504ecba90da65c05694ab88 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 1 Nov 2013 13:04:38 +0100 Subject: gnu: Switch to GCC 4.8 as the default compiler. * gnu/packages/base.scm (gcc-boot0, cross-gcc-wrapper, gcc-final): Base on GCC-4.8. * gnu/packages/cross-base.scm (cross-gcc): Likewise. * gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc, %gcc-static, %gcc-stripped): Likewise. --- gnu/packages/make-bootstrap.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 8c148f7086..708cb39bb2 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -94,10 +94,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("cross-binutils" ,(cross-binutils target)) ,@%final-inputs)) `(("libc" ,(glibc-for-bootstrap)) - ("gcc" ,(package (inherit gcc-4.7) + ("gcc" ,(package (inherit gcc-4.8) (inputs `(("libc",(glibc-for-bootstrap)) - ,@(package-inputs gcc-4.7))))) + ,@(package-inputs gcc-4.8))))) ,@(fold alist-delete %final-inputs '("libc" "gcc"))))) (package-with-explicit-inputs p inputs @@ -378,7 +378,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (define %gcc-static ;; A statically-linked GCC, with stripped-down functionality. (package-with-relocatable-glibc - (package (inherit gcc-4.7) + (package (inherit gcc-4.8) (name "gcc-static") (arguments `(#:modules ((guix build utils) @@ -386,7 +386,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (srfi srfi-1) (srfi srfi-26) (ice-9 regex)) - ,@(substitute-keyword-arguments (package-arguments gcc-4.7) + ,@(substitute-keyword-arguments (package-arguments gcc-4.8) ((#:guile _) #f) ((#:implicit-inputs? _) #t) ((#:configure-flags flags) @@ -409,11 +409,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) ("binutils" ,binutils) - ,@(package-inputs gcc-4.7)))))) + ,@(package-inputs gcc-4.8)))))) (define %gcc-stripped ;; The subset of GCC files needed for bootstrap. - (package (inherit gcc-4.7) + (package (inherit gcc-4.8) (name "gcc-stripped") (build-system trivial-build-system) (source #f) -- cgit v1.2.3 From 55a5674f21d1adf4a8b2d0c67f6a6ba51ebb4027 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 2 Nov 2013 15:17:08 +0100 Subject: gnu: make-bootstrap: Add C++ header files to the bootstrap GCC. * gnu/packages/make-bootstrap.scm (%gcc-stripped): Add $gcc/include/c++. --- gnu/packages/make-bootstrap.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 708cb39bb2..c79bcc2cf3 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -429,6 +429,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (let* ((out (assoc-ref %outputs "out")) (bindir (string-append out "/bin")) (libdir (string-append out "/lib")) + (includedir (string-append out "/include")) (libexecdir (string-append out "/libexec")) (gcc (assoc-ref %build-inputs "gcc"))) (copy-recursively (string-append gcc "/bin") bindir) @@ -444,6 +445,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." libexecdir) (for-each remove-store-references (find-files libexecdir ".*")) + + ;; Starting from GCC 4.8, helper programs built natively + ;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers. + (copy-recursively (string-append gcc "/include/c++") + (string-append includedir "/c++")) #t)))) (inputs `(("gcc" ,%gcc-static))))) -- cgit v1.2.3 From c9323eac746e1905f9cacf17408a5678c2bdefbf Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 2 Nov 2013 22:28:30 +0100 Subject: gnu: make-bootstrap: Allow bit-reproducibility for 'glibc-stripped'. * gnu/packages/make-bootstrap.scm (%glibc-stripped): Remove '.install' and '..install.cmd' files. --- gnu/packages/make-bootstrap.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index c79bcc2cf3..2630ad5ce0 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -363,6 +363,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (string-append incdir "/asm")) (copy-recursively (string-append linux "/include/asm-generic") (string-append incdir "/asm-generic")) + + ;; Remove the '.install' and '..install.cmd' files; the latter + ;; contains store paths, which prevents bit reproducibility. + (for-each delete-file (find-files incdir "\\.install")) + #t)))) (inputs `(("libc" ,(let ((target (%current-target-system))) (if target -- cgit v1.2.3 From 69f777d14caa50a3a0d0167910ddb9a5910d4ab2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 3 Nov 2013 22:35:17 +0100 Subject: gnu: make-bootstrap: Build libc and Guile without a .gnu_debuglink. * gnu/packages/make-bootstrap.scm (glibc-for-bootstrap, %guile-static): Add 'outputs' field. --- gnu/packages/make-bootstrap.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 2630ad5ce0..defc32bc08 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -64,7 +64,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; and can use statically-linked NSS modules. `(cons* "--disable-nscd" "--disable-build-nscd" "--enable-static-nss" - ,flags)))))) + ,flags)))) + + ;; Remove the 'debug' output to allow bit-reproducible builds (when the + ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which + ;; includes a CRC of the corresponding debugging symbols; those symbols + ;; contain store file names, so the CRC changes at every rebuild.) + (outputs (delete "debug" (package-outputs base))))) (define (package-with-relocatable-glibc p) "Return a variant of P that uses the libc as defined by @@ -127,7 +133,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (#f '()) (x (list x)))) - ;; Remove the `debug' output. + ;; Remove the 'debug' output (see above for the reason.) (outputs '("out")))) (bzip2 (package (inherit bzip2) (arguments @@ -472,6 +478,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (name (string-append (package-name guile-2.0) "-static")) (source source) (synopsis "Statically-linked and relocatable Guile") + + ;; Remove the 'debug' output (see above for the reason.) + (outputs (delete "debug" (package-outputs guile-2.0))) + (propagated-inputs `(("bdw-gc" ,libgc) ,@(alist-delete "bdw-gc" -- cgit v1.2.3 From 953ab5030f1ee870944a291f9e8edc491b198969 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 20 Nov 2013 19:01:27 +0100 Subject: gnu: make-bootstrap: Simplify '%gcc-static'. * gnu/packages/make-bootstrap.scm (%gcc-static): Add a bunch of --disable configure flags. Remove useless 'inputs' field. --- gnu/packages/make-bootstrap.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index defc32bc08..7f7a808542 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -406,6 +406,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." "--disable-plugin" "--enable-languages=c" "--disable-libmudflap" + "--disable-libatomic" + "--disable-libsanitizer" + "--disable-libitm" "--disable-libgomp" "--disable-libssp" "--disable-libquadmath" @@ -415,12 +418,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ((#:make-flags flags) (if (%current-target-system) `(cons "LDFLAGS=-static" ,flags) - `(cons "BOOT_LDFLAGS=-static" ,flags)))))) - (inputs `(("gmp-source" ,(package-source gmp)) - ("mpfr-source" ,(package-source mpfr)) - ("mpc-source" ,(package-source mpc)) - ("binutils" ,binutils) - ,@(package-inputs gcc-4.8)))))) + `(cons "BOOT_LDFLAGS=-static" ,flags))))))))) (define %gcc-stripped ;; The subset of GCC files needed for bootstrap. -- cgit v1.2.3 From 0ece70747028ee88c58dc90b1089b4f74f243015 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 23 Nov 2013 16:07:29 +0100 Subject: gnu: make-bootstrap: Add missing inputs for Canadian cross of '%gcc-static'. * gnu/packages/make-bootstrap.scm (%gcc-static): Add 'native-inputs' field. --- gnu/packages/make-bootstrap.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 7f7a808542..d621a634a3 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -418,7 +418,21 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ((#:make-flags flags) (if (%current-target-system) `(cons "LDFLAGS=-static" ,flags) - `(cons "BOOT_LDFLAGS=-static" ,flags))))))))) + `(cons "BOOT_LDFLAGS=-static" ,flags)))))) + (native-inputs + (if (%current-target-system) + `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both + ;; as target inputs and as native inputs; the latter is + ;; needed when building build-time tools ('genconstants', + ;; etc.) Failing to do that leads to misdetections of + ;; declarations by 'gcc/configure', and eventually to + ;; duplicate declarations as reported in + ;; . + ("gmp-native" ,gmp) + ("mpfr-native" ,mpfr) + ("mpc-native" ,mpc) + ,@(package-native-inputs gcc-4.8)) + (package-native-inputs gcc-4.8)))))) (define %gcc-stripped ;; The subset of GCC files needed for bootstrap. -- cgit v1.2.3