diff mbox series

[bug#36477,v3,23/48] gnu: make-linux-libre: Fix cross-compilation.

Message ID 20190902153333.11190-24-m.othacehe@gmail.com
State Accepted
Headers show
Series Add --target support to guix system | expand

Commit Message

Mathieu Othacehe Sept. 2, 2019, 3:33 p.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(+)

Comments

Ludovic Courtès Sept. 4, 2019, 12:52 p.m. UTC | #1
Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * 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(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index afa860830b..9c1ba6d5b9 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")

Could you move the comment about timestamps right above
KCONFIG_NOTIMESTAMP, and turn the explanation about CROSS_CPATH that you
put in the commit log into a comment above CROSS_CPATH?

OK with these changes, thanks!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index afa860830b..9c1ba6d5b9 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"))