gnu: cross-base: Factorize list of cross environment variables.

* gnu/packages/cross-base.scm (cross-libc): Replace literal list of
environment variable names with %GCC-CROSS-INCLUDE-PATHS.
(cross-kernel-headers): Likewise.
This commit is contained in:
Ludovic Courtès 2016-12-07 13:57:43 +01:00
parent 8a3ce2c7b0
commit 3009a9e451
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 5 additions and 17 deletions

View File

@ -117,7 +117,7 @@ may be either a libc package or #f.)"
`(append (list ,(string-append "--target=" target)
,@(if libc
`( ;; Disable libcilkrts because it is not
;; ported to GNU/Hurd.
;; ported to GNU/Hurd.
"--disable-libcilkrts")
`( ;; Disable features not needed at this stage.
"--disable-shared" "--enable-static"
@ -438,10 +438,7 @@ GCC that does not target a libc; otherwise, target that libc."
(let* ((mach (assoc-ref inputs "cross-gnumach-headers"))
(cpath (string-append mach "/include")))
(for-each (cut setenv <> cpath)
'("CROSS_C_INCLUDE_PATH"
"CROSS_CPLUS_INCLUDE_PATH"
"CROSS_OBJC_INCLUDE_PATH"
"CROSS_OBJCPLUS_INCLUDE_PATH"))))
',%gcc-cross-include-paths)))
%standard-phases)
#:configure-flags (list ,(string-append "--target=" target))
,@(package-arguments mig)))
@ -481,10 +478,7 @@ GCC that does not target a libc; otherwise, target that libc."
(cpath (string-append mach "/include:"
hurd "/include")))
(for-each (cut setenv <> cpath)
'("CROSS_C_INCLUDE_PATH"
"CROSS_CPLUS_INCLUDE_PATH"
"CROSS_OBJC_INCLUDE_PATH"
"CROSS_OBJCPLUS_INCLUDE_PATH"))))
',%gcc-cross-include-paths)))
,phases))))
(propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
@ -512,10 +506,7 @@ GCC that does not target a libc; otherwise, target that libc."
(let* ((glibc-headers (assoc-ref inputs "cross-glibc-hurd-headers"))
(cpath (string-append glibc-headers "/include")))
(for-each (cut setenv <> cpath)
'("CROSS_C_INCLUDE_PATH"
"CROSS_CPLUS_INCLUDE_PATH"
"CROSS_OBJC_INCLUDE_PATH"
"CROSS_OBJCPLUS_INCLUDE_PATH"))))
',%gcc-cross-include-paths)))
,phases))))
(inputs `(("cross-glibc-hurd-headers" ,xglibc/hurd-headers)))
@ -589,10 +580,7 @@ XBINUTILS and the cross tool chain."
(let* ((kernel (assoc-ref inputs "kernel-headers"))
(cpath (string-append kernel "/include")))
(for-each (cut setenv <> cpath)
'("CROSS_C_INCLUDE_PATH"
"CROSS_CPLUS_INCLUDE_PATH"
"CROSS_OBJC_INCLUDE_PATH"
"CROSS_OBJCPLUS_INCLUDE_PATH"))
',%gcc-cross-include-paths)
(setenv "CROSS_LIBRARY_PATH"
(string-append kernel "/lib")) ;for Hurd's libihash
#t))