mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-20 23:36:19 +01:00
gnu: sunxi-tools: Adapt to cross-compiler toolchain changes.
* gnu/packages/admin.scm (sunxi-tools)[arguments]<#:phases>[set-environment-up]: Adapt to cross-compiler toolchain changes.
This commit is contained in:
parent
9fbd0b1769
commit
919c5e1b43
1 changed files with 11 additions and 9 deletions
|
@ -2606,22 +2606,24 @@ (define (filter-environment! filter-predicate
|
|||
environment-variable-names)
|
||||
(for-each
|
||||
(lambda (env-name)
|
||||
(let* ((env-value (getenv env-name))
|
||||
(search-path (search-path-as-string->list env-value))
|
||||
(new-search-path (filter filter-predicate
|
||||
search-path))
|
||||
(new-env-value (list->search-path-as-string
|
||||
new-search-path ":")))
|
||||
(setenv env-name new-env-value)))
|
||||
(when (getenv env-name)
|
||||
(let* ((env-value (getenv env-name))
|
||||
(search-path (search-path-as-string->list env-value))
|
||||
(new-search-path (filter filter-predicate
|
||||
search-path))
|
||||
(new-env-value (list->search-path-as-string
|
||||
new-search-path ":")))
|
||||
(setenv env-name new-env-value))))
|
||||
environment-variable-names))
|
||||
(setenv "CROSS_CPATH" (getenv "CPATH"))
|
||||
(setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
|
||||
(setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
|
||||
(setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
|
||||
(filter-environment! cross?
|
||||
'("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"
|
||||
'("CROSS_CPATH" "CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"
|
||||
"CROSS_LIBRARY_PATH"))
|
||||
(filter-environment! (lambda (e) (not (cross? e)))
|
||||
'("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
|
||||
'("CPATH" "C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
|
||||
"LIBRARY_PATH"))
|
||||
#t))
|
||||
(replace 'build
|
||||
|
|
Loading…
Reference in a new issue