Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / make-bootstrap.scm
index 2808beb..62398df 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +23,7 @@
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
   #:use-module ((gnu packages) #:select (search-patch))
+  #:use-module ((gnu packages commencement) #:select (%final-inputs))
   #:use-module (gnu packages base)
   #:use-module (gnu packages cross-base)
   #:use-module (gnu packages bash)
@@ -373,10 +374,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
              (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
@@ -429,7 +426,19 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                        "--disable-libquadmath"
                        "--disable-decimal-float")
                       (remove (cut string-match "--(.*plugin|enable-languages)" <>)
-                              ,flags))))))
+                              ,flags)))
+            ((#:phases phases)
+             `(alist-cons-after
+               'pre-configure 'remove-lgcc_s
+               (lambda _
+                 ;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in
+                 ;; the 'pre-configure phase of our main gcc package, because
+                 ;; that shared library is not present in this static gcc.  See
+                 ;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
+                 (substitute* (find-files "gcc/config"
+                                          "^gnu-user.*\\.h$")
+                   ((" -lgcc_s}}") "}}")))
+               ,phases)))))
      (native-inputs
       (if (%current-target-system)
           `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -592,7 +601,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
 (define (tarball-package pkg)
   "Return a package containing a tarball of PKG."
   (package (inherit pkg)
-    (location (source-properties->location (current-source-location)))
     (name (string-append (package-name pkg) "-tarball"))
     (build-system trivial-build-system)
     (native-inputs `(("tar" ,tar)