[bug#36477,v2,39/61] gnu: make-linux-libre: Fix cross-compilation.
diff mbox series

Message ID 20190821085455.18508-39-m.othacehe@gmail.com
State New
Headers show
Series
  • Add --target support to guix system
Related show

Commit Message

Mathieu Othacehe Aug. 21, 2019, 8:54 a.m. UTC
* gnu/packages/linux.scm (make-linux-libre)[arguments]: Unset CROSS_CPATH to
make sure that cross-libc is not found. Otherwise, some of its header would
conflict with the one from linux (stdint.h and linux/types.h).
---
 gnu/packages/linux.scm | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0036b85e4d..ac7312bcd0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -665,6 +665,9 @@  for ARCH and optionally VARIANT, or #f if there is no such configuration."
          (replace 'configure
            (lambda* (#:key inputs native-inputs target #:allow-other-keys)
              ;; Avoid introducing timestamps
+             ,@(if (%current-target-system)
+                   '((unsetenv "CROSS_CPATH"))
+                   '())
              (setenv "KCONFIG_NOTIMESTAMP" "1")
              (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))