mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-09 20:59:31 -05:00
gnu: linux-libre: Remove cross-libc from CROSS_CPATH.
* gnu/packages/linux.scm (make-linux-libre*)[arguments]: Do not unset CROSS_CPATH completely, instead remove cross-libc from CROSS_CPATH in the same way that libc is removed from CPATH.
This commit is contained in:
parent
154d97abdd
commit
eacd072c09
1 changed files with 20 additions and 17 deletions
|
@ -679,23 +679,26 @@ (define* (make-linux-libre* version source supported-systems
|
||||||
#t))
|
#t))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs native-inputs target #:allow-other-keys)
|
(lambda* (#:key inputs native-inputs target #:allow-other-keys)
|
||||||
;; Unset CROSS_CPATH to make sure that cross-libc is not
|
;; On AArch64 (at least), we need to remove glibc headers from
|
||||||
;; found. Otherwise, some of its header would conflict with the
|
;; CPATH (they are still available as "system headers"), so that
|
||||||
;; one from linux (stdint.h and linux/types.h)
|
;; the kernel can override uint64_t. See
|
||||||
,@(if (%current-target-system)
|
;; <https://bugs.gnu.org/37593>. This is also true when
|
||||||
'((unsetenv "CROSS_CPATH"))
|
;; cross-compiling, except in that case, cross-libc must be
|
||||||
'())
|
;; removed from CROSS_CPATH.
|
||||||
|
(let ((var ,(if (%current-target-system)
|
||||||
;; On AArch64 (at least), we need to remove glibc headers from CPATH
|
"CROSS_CPATH"
|
||||||
;; (they are still available as "system headers"), so that the kernel
|
"CPATH"))
|
||||||
;; can override uint64_t. See <https://bugs.gnu.org/37593>.
|
(libc ,(if (%current-target-system)
|
||||||
(setenv "CPATH"
|
"cross-libc"
|
||||||
(string-join
|
"libc")))
|
||||||
(remove (cut string-prefix? (assoc-ref inputs "libc") <>)
|
(setenv var
|
||||||
(string-split (getenv "CPATH") #\:))
|
(string-join
|
||||||
":"))
|
(remove
|
||||||
(format #t "environment variable `CPATH' changed to `~a'~%"
|
(cut string-prefix? (assoc-ref inputs libc) <>)
|
||||||
(getenv "CPATH"))
|
(string-split (getenv var) #\:))
|
||||||
|
":"))
|
||||||
|
(format #t "environment variable `~a' changed to `~a'~%"
|
||||||
|
var (getenv var)))
|
||||||
|
|
||||||
;; Avoid introducing timestamps
|
;; Avoid introducing timestamps
|
||||||
(setenv "KCONFIG_NOTIMESTAMP" "1")
|
(setenv "KCONFIG_NOTIMESTAMP" "1")
|
||||||
|
|
Loading…
Reference in a new issue