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.master
parent
682cb00461
commit
3e8f16ba91
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
;;; Commentary:
|
;;; 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
|
;;; used in (gnu packages bootstrap). These statically-linked binaries are
|
||||||
;;; taken for granted and used as the root of the whole bootstrap procedure.
|
;;; 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 ()
|
(let ()
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
|
|
||||||
(let ((in (assoc-ref %build-inputs "guile"))
|
(let* ((in (assoc-ref %build-inputs "guile"))
|
||||||
(out (assoc-ref %outputs "out")))
|
(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"))
|
(mkdir-p (string-append out "/share/guile/2.0"))
|
||||||
(copy-recursively (string-append in "/share/guile/2.0")
|
(copy-recursively (string-append in "/share/guile/2.0")
|
||||||
(string-append out "/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"))
|
(string-append out "/lib/guile/2.0/ccache"))
|
||||||
|
|
||||||
(mkdir (string-append out "/bin"))
|
(mkdir (string-append out "/bin"))
|
||||||
(copy-file (string-append in "/bin/guile")
|
(copy-file guile1 guile2)
|
||||||
(string-append out "/bin/guile"))
|
|
||||||
(remove-store-references (string-append out "/bin/guile"))
|
;; Does the relocated Guile work?
|
||||||
#t))))
|
(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)))
|
(inputs `(("guile" ,%guile-static)))
|
||||||
(outputs '("out"))))
|
(outputs '("out"))))
|
||||||
|
|
||||||
|
|
Reference in New Issue