[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/08: bootstrap: Add mescc-tools-static-stripped-tarball.
From: |
guix-commits |
Subject: |
04/08: bootstrap: Add mescc-tools-static-stripped-tarball. |
Date: |
Tue, 13 Aug 2019 02:04:07 -0400 (EDT) |
mhw pushed a commit to branch wip-binaries
in repository guix.
commit 08664c1f37942eef0c69fca709e7f206826f7186
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Jul 22 10:07:07 2019 +0200
bootstrap: Add mescc-tools-static-stripped-tarball.
* gnu/packages/make-bootstrap.scm (%mescc-tools-static,
%mescc-tools-static-stripped, %mescc-tools-bootstrap-tarball): New variable.
Modified-By: Mark H Weaver <address@hidden>
---
gnu/packages/make-bootstrap.scm | 68 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index af9373a..5d80f58 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 © 2019 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@
#:use-module (gnu packages libunistring)
#:use-module (gnu packages linux)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages mes)
#:use-module (gnu packages multiprecision)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
@@ -46,6 +48,7 @@
%glibc-bootstrap-tarball
%gcc-bootstrap-tarball
%guile-bootstrap-tarball
+ %mescc-tools-bootstrap-tarball
%bootstrap-tarballs
%guile-static-stripped))
@@ -534,6 +537,67 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
#t))))
(inputs `(("gcc" ,%gcc-static)))))
+;; One package: build + remove store references
+;; (define %mescc-tools-static-stripped
+;; ;; A statically linked Mescc Tools with store references removed, for
+;; ;; bootstrap.
+;; (package
+;; (inherit mescc-tools)
+;; (name "mescc-tools-static-stripped")
+;; (arguments
+;; `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs
"out"))
+;; "CC=gcc -static")
+;; #:test-target "test"
+;; #:phases (modify-phases %standard-phases
+;; (delete 'configure)
+;; (add-after 'install 'strip-store-references
+;; (lambda _
+;; (let* ((out (assoc-ref %outputs "out"))
+;; (bin (string-append out "/bin")))
+;; (for-each (lambda (file)
+;; (let ((target (string-append bin "/"
file)))
+;; (format #t "strippingg `~a'...~%" target)
+;; (remove-store-references target)))
+;; '( "M1" "blood-elf" "hex2"))))))))))
+
+;; Two packages: first build static, bare minimum content.
+(define %mescc-tools-static
+ ;; A statically linked MesCC Tools.
+ (package
+ (inherit mescc-tools)
+ (name "mescc-tools-static")
+ (arguments
+ `(#:system "i686-linux"
+ ,@(substitute-keyword-arguments (package-arguments mescc-tools)
+ ((#:make-flags flags)
+ `(cons "CC=gcc -static" ,flags)))))))
+
+;; ... next remove store references.
+(define %mescc-tools-static-stripped
+ ;; A statically linked Mescc Tools with store references removed, for
+ ;; bootstrap.
+ (package
+ (inherit %mescc-tools-static)
+ (name (string-append (package-name %mescc-tools-static) "-stripped"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((in (assoc-ref %build-inputs "mescc-tools"))
+ (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)))
+ '( "M1" "blood-elf" "hex2"))
+ #t))))
+ (inputs `(("mescc-tools" ,%mescc-tools-static)))))
(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
@@ -701,6 +765,10 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
;; A tarball with the statically-linked, relocatable Guile.
(tarball-package %guile-static-stripped))
+(define %mescc-tools-bootstrap-tarball
+ ;; A tarball with statically-linked MesCC binary seed.
+ (tarball-package %mescc-tools-static-stripped))
+
(define %bootstrap-tarballs
;; A single derivation containing all the bootstrap tarballs, for
;; convenience.
- branch wip-binaries created (now c67becb), guix-commits, 2019/08/13
- 01/08: guix: copy-linux-headers: Extract procedure, add headers., guix-commits, 2019/08/13
- 02/08: gnu: Add linux-libre-headers-bootstrap-tarball., guix-commits, 2019/08/13
- 03/08: gnu: mescc-tools: Update to 0.5.2-0.bb062b0d., guix-commits, 2019/08/13
- 06/08: bootstrap: Build the new reduced binary seed bootstrap on x86., guix-commits, 2019/08/13
- 05/08: bootstrap: Add mes-minimal-stripped-tarball., guix-commits, 2019/08/13
- 08/08: bootstrap: guile-static: Disable parallel build., guix-commits, 2019/08/13
- 04/08: bootstrap: Add mescc-tools-static-stripped-tarball.,
guix-commits <=
- 07/08: bootstrap: Build bootstrap bash deterministically., guix-commits, 2019/08/13