mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-28 07:12:30 -05:00
gnu: linux-libre: Remove glibc from CPATH before the build.
Fixes <https://bugs.gnu.org/37593>. * gnu/packages/linux.scm (make-linux-libre*)[arguments]: Drop "libc" from CPATH.
This commit is contained in:
parent
dd69897113
commit
c5ceec4150
1 changed files with 13 additions and 0 deletions
|
@ -663,6 +663,7 @@ (define* (make-linux-libre* version source supported-systems
|
|||
`(#:modules ((guix build gnu-build-system)
|
||||
(guix build utils)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26)
|
||||
(ice-9 match))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -679,6 +680,18 @@ (define* (make-linux-libre* version source supported-systems
|
|||
,@(if (%current-target-system)
|
||||
'((unsetenv "CROSS_CPATH"))
|
||||
'())
|
||||
|
||||
;; On AArch64 (at least), we need to remove glibc headers from CPATH
|
||||
;; (they are still available as "system headers"), so that the kernel
|
||||
;; can override uint64_t. See <https://bugs.gnu.org/37593>.
|
||||
(setenv "CPATH"
|
||||
(string-join
|
||||
(remove (cut string-prefix? (assoc-ref inputs "libc") <>)
|
||||
(string-split (getenv "CPATH") #\:))
|
||||
":"))
|
||||
(format #t "environment variable `CPATH' changed to `~a'~%"
|
||||
(getenv "CPATH"))
|
||||
|
||||
;; Avoid introducing timestamps
|
||||
(setenv "KCONFIG_NOTIMESTAMP" "1")
|
||||
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
|
||||
|
|
Loading…
Reference in a new issue