[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
138/176: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-t
From: |
Jan Nieuwenhuizen |
Subject: |
138/176: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball. |
Date: |
Fri, 31 Aug 2018 11:20:29 -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")
- 77/176: Revert "gnu: gcc-boot: Update to 3.0.", (continued)
- 77/176: Revert "gnu: gcc-boot: Update to 3.0.", Jan Nieuwenhuizen, 2018/08/31
- 102/176: gnu: gcc-core-mesboot: Rename from gcc-core-boot., Jan Nieuwenhuizen, 2018/08/31
- 103/176: gnu: glibc-mesboot: Rename from glibc-boot., Jan Nieuwenhuizen, 2018/08/31
- 107/176: gnu: Add gcc-mesboot 4.1.0., Jan Nieuwenhuizen, 2018/08/31
- 119/176: gnu: %mes-seed: Update for mes 0.16.1., Jan Nieuwenhuizen, 2018/08/31
- 121/176: gnu: tcc-boot0: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 157/176: Revert "gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.", Jan Nieuwenhuizen, 2018/08/31
- 163/176: Add new cheat: use %bootstrap-glibc for x86 for now., Jan Nieuwenhuizen, 2018/08/31
- 137/176: gnu: tcc-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/08/31
- 148/176: gnu: mes-boot: Update to 0.18. WIP, Jan Nieuwenhuizen, 2018/08/31
- 138/176: gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.,
Jan Nieuwenhuizen <=
- 167/176: gnu: findutils-boot0: Export (for testing)., Jan Nieuwenhuizen, 2018/08/31
- 172/176: gnu: gcc-mesboot-wrapper: Wrap g++ too., Jan Nieuwenhuizen, 2018/08/31
- 168/176: gnu: file-boot0: Export (for testing)., Jan Nieuwenhuizen, 2018/08/31
- 169/176: gnu: file-boot0: Do not strip binaries or validate-runpath., Jan Nieuwenhuizen, 2018/08/31
- 159/176: gcc-mesboot: use package-full-name "-" :-), Jan Nieuwenhuizen, 2018/08/31
- 162/176: gnu: Add glibc-mesboot 2.3.6. WIP, Jan Nieuwenhuizen, 2018/08/31
- 68/176: Revert "gnu: binutils-boot: Update to 2.25.", Jan Nieuwenhuizen, 2018/08/31
- 65/176: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/08/31
- 116/176: gnu: gcc-mesboot0: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/08/31
- 127/176: gnu: binutils-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31