Browse Source

gnu: guile-static-stripped: Make sure the resulting binary works.

* gnu/packages/make-bootstrap.scm (%guile-static-stripped): When
  compiling natively, make sure the final binary works.
gn-latest-20200428
Ludovic Courtès 8 years ago
parent
commit
3e8f16ba91
1 changed files with 22 additions and 7 deletions
  1. +22
    -7
      gnu/packages/make-bootstrap.scm

+ 22
- 7
gnu/packages/make-bootstrap.scm View File

@ -44,7 +44,7 @@
;;; Commentary:
;;;
;;; This modules provides tools to build tarballs of the "bootstrap binaries"
;;; This module provides tools to build tarballs of the "bootstrap binaries"
;;; used in (gnu packages bootstrap). These statically-linked binaries are
;;; taken for granted and used as the root of the whole bootstrap procedure.
;;;
@ -511,8 +511,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(let ()
(use-modules (guix build utils))
(let ((in (assoc-ref %build-inputs "guile"))
(out (assoc-ref %outputs "out")))
(let* ((in (assoc-ref %build-inputs "guile"))
(out (assoc-ref %outputs "out"))
(guile1 (string-append in "/bin/guile"))
(guile2 (string-append out "/bin/guile")))
(mkdir-p (string-append out "/share/guile/2.0"))
(copy-recursively (string-append in "/share/guile/2.0")
(string-append out "/share/guile/2.0"))
@ -522,10 +524,23 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(string-append out "/lib/guile/2.0/ccache"))
(mkdir (string-append out "/bin"))
(copy-file (string-append in "/bin/guile")
(string-append out "/bin/guile"))
(remove-store-references (string-append out "/bin/guile"))
#t))))
(copy-file guile1 guile2)
;; Does the relocated Guile work?
(and ,(if (%current-target-system)
#t
'(zero? (system* guile2 "--version")))
(begin
;; Strip store references.
(remove-store-references guile2)
;; Does the stripped Guile work? If it aborts, it could be
;; that it tries to open iconv descriptors and fails because
;; libc's iconv data isn't available (see
;; `guile-default-utf8.patch'.)
,(if (%current-target-system)
#t
'(zero? (system* guile2 "--version")))))))))
(inputs `(("guile" ,%guile-static)))
(outputs '("out"))))


Loading…
Cancel
Save