summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-08-21 11:38:51 +0200
committerLudovic Courtès <ludo@gnu.org>2013-08-21 11:38:51 +0200
commit3e8f16ba9141e2049cefcd80461b60f2385db892 (patch)
tree444b5fb29ff646bda1438f70ad887d8ba3c219ea /gnu
parent682cb004613859fa90f27a26fae621b7d98d8a3c (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/make-bootstrap.scm29
1 files changed, 22 insertions, 7 deletions
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index fbc7a59a03..7eb3567f25 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -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"))))