[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
138/160: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-t
From: |
Jan Nieuwenhuizen |
Subject: |
138/160: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball. |
Date: |
Tue, 28 Aug 2018 15:56:38 -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")
- branch wip-bootstrap created (now 12433be), Jan Nieuwenhuizen, 2018/08/28
- 62/160: gnu: Add binutils-boot 2.5.1., Jan Nieuwenhuizen, 2018/08/28
- 159/160: gcc-mesboot: use package-full-name "-" :-), Jan Nieuwenhuizen, 2018/08/28
- 160/160: gnu: Add mpc-boot 1.0.3., Jan Nieuwenhuizen, 2018/08/28
- 142/160: gnu: Add %linux-libre-headers-stripped, %linux-libre-headers-bootstrap-tarball., Jan Nieuwenhuizen, 2018/08/28
- 145/160: bootstrap: Integrate mes bootstrap for i686-linux., Jan Nieuwenhuizen, 2018/08/28
- 158/160: gnu: Add make-mesboot0 3.80, Jan Nieuwenhuizen, 2018/08/28
- 151/160: gnu: Add diffutils-mesboot 2.7., Jan Nieuwenhuizen, 2018/08/28
- 138/160: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.,
Jan Nieuwenhuizen <=
- 143/160: gnu: Add %bootstrap-linux-libre-headers., Jan Nieuwenhuizen, 2018/08/28
- 150/160: gnu: Add make-mesboot 3.79., Jan Nieuwenhuizen, 2018/08/28
- 140/160: gnu: Add %diffutils-static, %diffutils-static-stripped, %diffutils-bootstrap-tarball., Jan Nieuwenhuizen, 2018/08/28
- 154/160: Revert "gnu: Add %bootstrap-diffutils.", Jan Nieuwenhuizen, 2018/08/28
- 137/160: gnu: tcc-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/08/28
- 148/160: gnu: mes-boot: Update to 0.18. WIP, Jan Nieuwenhuizen, 2018/08/28
- 149/160: gnu: tcc-boot: Update for mes 0.18. WIP, Jan Nieuwenhuizen, 2018/08/28
- 127/160: gnu: binutils-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 156/160: Revert "gnu: Add %bootstrap-make.", Jan Nieuwenhuizen, 2018/08/28
- 155/160: Revert "gnu: Add %diffutils-static, %diffutils-static-stripped, %diffutils-bootstrap-tarball.", Jan Nieuwenhuizen, 2018/08/28