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.
This commit is contained in:
parent
682cb00461
commit
3e8f16ba91
@ -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…
Reference in New Issue
Block a user