summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-27 22:48:57 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-27 23:43:00 +0200
commit58b4e8e877707ec5c42e821d0c4ab5d5558f0e73 (patch)
treed84cd7af8b0e252b2a8a9fcb084541898d63d987
parentd581acee5b08ea1af520cc2e8a3642b0c3924e43 (diff)
gnu: guile: More cross-compilation tweaks.
* gnu/packages/guile.scm (guile-2.0): When cross-compiling, unset GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH, and set CC_FOR_BUILD=gcc.
-rw-r--r--gnu/packages/guile.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 48d10cc9f86..b53f3eb7704 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -142,13 +142,29 @@ extensible. It supports many SRFIs.")
142 `(#:phases (alist-cons-before 142 `(#:phases (alist-cons-before
143 'configure 'pre-configure 143 'configure 'pre-configure
144 (lambda* (#:key inputs #:allow-other-keys) 144 (lambda* (#:key inputs #:allow-other-keys)
145 ;; By default we end up with GUILE_LOAD_PATH="" and
146 ;; GUILE_LOAD_COMPILED_PATH="". But that is equivalent to
147 ;; ".", and breaks the build system when cross-compiling.
148 ;; Thus, make sure they are unset.
149 ;; TODO: Eventually fix `set-path-environment-variable'
150 ;; for that case.
151 ,@(if (%current-target-system)
152 '((unsetenv "GUILE_LOAD_PATH")
153 (unsetenv "GUILE_LOAD_COMPILED_PATH"))
154 '())
155
156 ;; Tell (ice-9 popen) the file name of Bash.
145 (let ((bash (assoc-ref inputs "bash"))) 157 (let ((bash (assoc-ref inputs "bash")))
146 (substitute* "module/ice-9/popen.scm" 158 (substitute* "module/ice-9/popen.scm"
147 (("/bin/sh") 159 (("/bin/sh")
148 (string-append bash "/bin/bash"))))) 160 (string-append bash "/bin/bash")))))
149 ,(if (%current-target-system) 161 ,(if (%current-target-system)
150 '%standard-cross-phases 162 '%standard-cross-phases
151 '%standard-phases)))) 163 '%standard-phases))
164
165 ,@(if (%current-target-system)
166 '(#:configure-flags '("CC_FOR_BUILD=gcc"))
167 '())))
152 168
153 (native-search-paths 169 (native-search-paths
154 (list (search-path-specification 170 (list (search-path-specification