aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-21 15:57:04 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-21 15:57:04 +0200
commit095c7a2683509d8a12e1febfd667fdf7d20127e3 (patch)
tree9c32101c2a4d24547f92c39b0b6464733744df6f
parent58a7891ccf5e9eb5b1c8373b2336ef55c3a97ee3 (diff)
downloadpatches-095c7a2683509d8a12e1febfd667fdf7d20127e3.tar
patches-095c7a2683509d8a12e1febfd667fdf7d20127e3.tar.gz
distro: Add a bootstrap GCC tarball.
* distro/packages/base.scm (%gcc-stripped, %gcc-bootstrap-tarball): New variables.
-rw-r--r--distro/packages/base.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/distro/packages/base.scm b/distro/packages/base.scm
index e153077424..92c58e9d88 100644
--- a/distro/packages/base.scm
+++ b/distro/packages/base.scm
@@ -2169,6 +2169,35 @@ store.")
#t))))
(inputs `(("libc" ,glibc-final)))))
+(define %gcc-stripped
+ (package (inherit gcc-final)
+ (name "gcc-stripped")
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+
+ (setvbuf (current-output-port) _IOLBF)
+ (let* ((out (assoc-ref %outputs "out"))
+ (bindir (string-append out "/bin"))
+ (libdir (string-append out "/lib"))
+ (gcc (assoc-ref %build-inputs "gcc")))
+ (copy-recursively (string-append gcc "/bin") bindir)
+ (for-each remove-store-references
+ (find-files bindir ".*"))
+
+ (mkdir-p libdir)
+ (for-each (lambda (file)
+ (let ((target (string-append libdir "/"
+ (basename file))))
+ (copy-file file target)
+ (remove-store-references target)))
+ (find-files (string-append gcc "/lib") "^libgcc_s.*"))
+ #t))))
+ (inputs `(("gcc" ,gcc-final)))))
+
(define %guile-static
;; A statically-linked Guile that is relocatable--i.e., it can search
;; .scm and .go files relative to its installation directory, rather
@@ -2283,6 +2312,10 @@ store.")
;; A tarball with GNU libc's shared libraries, dynamic linker, and headers.
(tarball-package %glibc-stripped))
+(define %gcc-bootstrap-tarball
+ ;; A tarball with a dynamic-linked GCC and its headers.
+ (tarball-package %gcc-stripped))
+
(define %guile-bootstrap-tarball
;; A tarball with the statically-linked, relocatable Guile.
(tarball-package %guile-static-stripped))