From 43d2ab5a046e5da378f062cb2885c1345278d378 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 4 Oct 2019 21:36:42 +0200 Subject: [PATCH] gnu: linux-libre: Hide glibc from CPATH during build. Fixes . * gnu/packages/linux.scm (make-linux-libre*)[arguments]: Drop "libc" from CPATH. --- gnu/packages/linux.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dda95c29ac..525b18d1e2 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 . + (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")) -- 2.23.0