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.
This commit is contained in:
parent
d581acee5b
commit
58b4e8e877
|
@ -142,13 +142,29 @@ extensible. It supports many SRFIs.")
|
||||||
`(#:phases (alist-cons-before
|
`(#:phases (alist-cons-before
|
||||||
'configure 'pre-configure
|
'configure 'pre-configure
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
;; By default we end up with GUILE_LOAD_PATH="" and
|
||||||
|
;; GUILE_LOAD_COMPILED_PATH="". But that is equivalent to
|
||||||
|
;; ".", and breaks the build system when cross-compiling.
|
||||||
|
;; Thus, make sure they are unset.
|
||||||
|
;; TODO: Eventually fix `set-path-environment-variable'
|
||||||
|
;; for that case.
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
'((unsetenv "GUILE_LOAD_PATH")
|
||||||
|
(unsetenv "GUILE_LOAD_COMPILED_PATH"))
|
||||||
|
'())
|
||||||
|
|
||||||
|
;; Tell (ice-9 popen) the file name of Bash.
|
||||||
(let ((bash (assoc-ref inputs "bash")))
|
(let ((bash (assoc-ref inputs "bash")))
|
||||||
(substitute* "module/ice-9/popen.scm"
|
(substitute* "module/ice-9/popen.scm"
|
||||||
(("/bin/sh")
|
(("/bin/sh")
|
||||||
(string-append bash "/bin/bash")))))
|
(string-append bash "/bin/bash")))))
|
||||||
,(if (%current-target-system)
|
,(if (%current-target-system)
|
||||||
'%standard-cross-phases
|
'%standard-cross-phases
|
||||||
'%standard-phases))))
|
'%standard-phases))
|
||||||
|
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
'(#:configure-flags '("CC_FOR_BUILD=gcc"))
|
||||||
|
'())))
|
||||||
|
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
|
|
Loading…
Reference in New Issue