[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
138/207: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-t
From: |
Jan Nieuwenhuizen |
Subject: |
138/207: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball. |
Date: |
Sat, 8 Sep 2018 13:26:19 -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")
- 165/207: Revert "gnu: make-boot0: Set LOADLIBES for i686-linux.", (continued)
- 165/207: Revert "gnu: make-boot0: Set LOADLIBES for i686-linux.", Jan Nieuwenhuizen, 2018/09/08
- 142/207: gnu: Add %linux-libre-headers-stripped, %linux-libre-headers-bootstrap-tarball., Jan Nieuwenhuizen, 2018/09/08
- 103/207: gnu: glibc-mesboot: Rename from glibc-boot., Jan Nieuwenhuizen, 2018/09/08
- 194/207: oops: fixup glibc-bootstrap-system-2.16.0.patch name., Jan Nieuwenhuizen, 2018/09/08
- 111/207: gnu: m4-mesboot: Package with boostrap-guile., Jan Nieuwenhuizen, 2018/09/08
- 145/207: bootstrap: Integrate mes bootstrap for i686-linux., Jan Nieuwenhuizen, 2018/09/08
- 96/207: gnu: Add binutils-boot0-cheat., Jan Nieuwenhuizen, 2018/09/08
- 133/207: bootstrap: Move mes seeds to bootstrap.scm, Jan Nieuwenhuizen, 2018/09/08
- 146/207: gnu: %mes-seed: Update for mes 0.17.1., Jan Nieuwenhuizen, 2018/09/08
- 143/207: gnu: Add %bootstrap-linux-libre-headers., Jan Nieuwenhuizen, 2018/09/08
- 138/207: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.,
Jan Nieuwenhuizen <=
- 115/207: gnu: glibc-mesboot: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/09/08
- 147/207: gnu: %tinycc-seed: Update for mes 0.17.1., Jan Nieuwenhuizen, 2018/09/08
- 132/207: gnu: tcc-boot0: Update for mes 0.17., Jan Nieuwenhuizen, 2018/09/08
- 16/207: bump: mes-boot: fixup for 80-setjmp test, Jan Nieuwenhuizen, 2018/09/08
- 130/207: gnu: %tinycc-seed: Update for mes 0.17., Jan Nieuwenhuizen, 2018/09/08
- 102/207: gnu: gcc-core-mesboot: Rename from gcc-core-boot., Jan Nieuwenhuizen, 2018/09/08
- 117/207: gnu: Remove gcc-mesboot-4.1.0., Jan Nieuwenhuizen, 2018/09/08
- 151/207: gnu: Add diffutils-mesboot 2.7., Jan Nieuwenhuizen, 2018/09/08
- 175/207: gnu: glibc-mesboot: Remove %bootstrap-glibc., Jan Nieuwenhuizen, 2018/09/08
- 67/207: Revert "gnu: binutils-boot: Update to 2.30.", Jan Nieuwenhuizen, 2018/09/08