aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@berlin.guixsd.org>2019-10-04 21:36:42 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-10-06 18:02:48 +0200
commitc5ceec4150f6a6cdc1b64781afa2d05547cf8542 (patch)
tree14d8965af70318d18a4bfbe1c8e9f8d3b6342335 /gnu
parentdd6989711370c43676edc974f86c8586f21f80f6 (diff)
downloadguix-c5ceec4150f6a6cdc1b64781afa2d05547cf8542.tar
guix-c5ceec4150f6a6cdc1b64781afa2d05547cf8542.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/linux.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2a6709c6fe..78de223947 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -663,6 +663,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
`(#: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 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
,@(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"))