[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
138/192: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-t
From: |
Jan Nieuwenhuizen |
Subject: |
138/192: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball. |
Date: |
Mon, 3 Sep 2018 16:25:12 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 0a8298ed7c89a78981488483c20fd44f4cbf0285
Author: Jan Nieuwenhuizen <address@hidden>
Date: Thu Aug 23 21:33:11 2018 +0200
gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.
* gnu/packages/make-bootstrap.scm (%make-static, %make-static-stripped,
%make-bootstrap-tarball): New variable.
---
gnu/packages/make-bootstrap.scm | 56 +++++++++++++++++++++++++++++++++++++++++
gnu/packages/mes.scm | 2 +-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 475749b..efef713 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017 Efraim Flashner <address@hidden>
;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
;;; Copyright © 2018 Mark H Weaver <address@hidden>
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,6 +41,7 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:export (%bootstrap-binaries-tarball
+ %make-bootstrap-tarball
%binutils-bootstrap-tarball
%glibc-bootstrap-tarball
%gcc-bootstrap-tarball
@@ -299,6 +301,56 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
(license gpl3+)
(home-page #f)))
+(define %make-static
+ ;; Statically-linked Make.
+ (package
+ (inherit gnu-make)
+ (name "make-static")
+ (arguments
+ `(#:strip-flags '("--strip-all")
+ #:configure-flags (cons "--without-guile"
+ ,(match (memq #:configure-flags
+ (package-arguments binutils))
+ ((#:configure-flags flags _ ...)
+ flags)))
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'all-static
+ (lambda _
+ ;; The `-all-static' libtool flag can only be passed
+ ;; after `configure', since configure tests don't use
+ ;; libtool, and only for executables built with libtool.
+ (substitute* '("Makefile.in")
+ (("^LDFLAGS =(.*)$" line)
+ (string-append line
+ "\nAM_LDFLAGS = -static\n"))))))))))
+
+(define %make-static-stripped
+ ;; The subset of Make that we need.
+ (package (inherit %make-static)
+ (name (string-append (package-name %make-static) "-stripped"))
+ (build-system trivial-build-system)
+ (outputs '("out"))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+
+ (setvbuf (current-output-port) _IOLBF)
+ (let* ((in (assoc-ref %build-inputs "make"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each (lambda (file)
+ (let ((target (string-append bin "/" file)))
+ (format #t "copying `~a'...~%" file)
+ (copy-file (string-append in "/bin/" file)
+ target)
+ (remove-store-references target)))
+ '("make"))
+ #t))))
+ (inputs `(("make" ,%make-static)))))
+
(define %binutils-static
;; Statically-linked Binutils.
(package (inherit binutils)
@@ -650,6 +702,10 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
;; A tarball with the statically-linked bootstrap binaries.
(tarball-package %static-binaries))
+(define %make-bootstrap-tarball
+ ;; A tarball with the statically-linked Make programs.
+ (tarball-package %make-static-stripped))
+
(define %binutils-bootstrap-tarball
;; A tarball with the statically-linked Binutils programs.
(tarball-package %binutils-static-stripped))
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 94f57e0..ddddd4b 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -44,7 +44,7 @@
#:use-module (guix utils)
#:use-module (guix gexp))
-(define %fake-bootstrap? #f) ; cheat using Guile instead of Mes for speed-up?
+(define %fake-bootstrap? #t) ; cheat using Guile instead of Mes for speed-up?
(define-public stage0-boot
(let ((version "0.0.8")
- 171/192: %bootstrap-linux-libre-headers: Update, (continued)
- 171/192: %bootstrap-linux-libre-headers: Update, Jan Nieuwenhuizen, 2018/09/03
- 178/192: gnu: tcc-boot0: Cleanup., Jan Nieuwenhuizen, 2018/09/03
- 120/192: gnu: mes-boot: Update to 0.16.1; revise dependencies., Jan Nieuwenhuizen, 2018/09/03
- 118/192: gnu: mescc-tools-boot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/03
- 121/192: gnu: tcc-boot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/03
- 139/192: gnu: Add %bootstrap-make., Jan Nieuwenhuizen, 2018/09/03
- 133/192: bootstrap: Move mes seeds to bootstrap.scm, Jan Nieuwenhuizen, 2018/09/03
- 132/192: gnu: tcc-boot0: Update for mes 0.17., Jan Nieuwenhuizen, 2018/09/03
- 134/192: gnu: mescc-tools-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/09/03
- 136/192: gnu: tcc-boot0: Use gnu-build-system., Jan Nieuwenhuizen, 2018/09/03
- 138/192: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.,
Jan Nieuwenhuizen <=
- 146/192: gnu: %mes-seed: Update for mes 0.17.1., Jan Nieuwenhuizen, 2018/09/03
- 148/192: gnu: mes-boot: Update to 0.17.1., Jan Nieuwenhuizen, 2018/09/03
- 135/192: gnu: mes-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/09/03
- 142/192: gnu: Add %linux-libre-headers-stripped, %linux-libre-headers-bootstrap-tarball., Jan Nieuwenhuizen, 2018/09/03
- 150/192: gnu: Add make-mesboot 3.79., Jan Nieuwenhuizen, 2018/09/03
- 151/192: gnu: Add diffutils-mesboot 2.7., Jan Nieuwenhuizen, 2018/09/03
- 137/192: gnu: tcc-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/09/03
- 154/192: Revert "gnu: Add %bootstrap-diffutils.", Jan Nieuwenhuizen, 2018/09/03
- 153/192: bootstrap: Remove dependency on %bootstrap-make, %bootstrap-diffutils., Jan Nieuwenhuizen, 2018/09/03
- 152/192: gnu: make-mesboot: Update to 3.80., Jan Nieuwenhuizen, 2018/09/03