summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2019-10-18 01:49:58 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-10-18 01:52:11 +0200
commit919c5e1b43ca440fa0128f21f7d75780b6c238a4 (patch)
tree7e3da23e083b57aa2bebac2177d74cb18b708f80
parent9fbd0b17691dbe5f9ef76c5def4c1588bccd4a53 (diff)
downloadguix-919c5e1b43ca440fa0128f21f7d75780b6c238a4.tar.gz
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.
-rw-r--r--gnu/packages/admin.scm20
1 files changed, 11 insertions, 9 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 21d105bfe5..82f1bb4eb8 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2606,22 +2606,24 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
                                           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