GNU bug report logs - #36477
Add Guix System cross-compilation support

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Tue, 2 Jul 2019 15:19:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 36477 <at> debbugs.gnu.org
Subject: [bug#36477] [PATCH 07/31] gnu: libgpg-error: Fix cross compilation.
Date: Mon, 15 Jul 2019 22:24:38 +0200
Hello,

Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:

> * gnu/packages/gnupg.scm (libgpg-error)[arguments]: Add a lock-obj header to
> the target platform when cross-compiling,
> [native-inputs]: add gettext that is needed when cross-compiling.

[...]

> +    (arguments
> +     (if (%current-target-system)
> +         `(#:modules ((ice-9 match)
> +                      (guix build gnu-build-system)
> +                      (guix build utils))
> +           #:phases
> +           (modify-phases %standard-phases
> +             (add-after 'unpack 'cross-symlinks
> +               (lambda* (#:key inputs #:allow-other-keys)
> +                 (let* ((target ,(%current-target-system))
> +                        (tuple
> +                         (match (string-take target (string-index target #\-))
> +                           ("armhf" "arm-unknown-linux-gnueabi")
> +                           (x
> +                            (string-append x "-unknown-linux-gnu")))))

Two things:

  1. s/tuple/triplet/

  2. The target triplet is actually passed as a keyword argument to
     phases.  So if I’m not mistaken, you can write:

      (lambda* (#:key target …)
        …)

     and get rid of the ‘match’ form above.

> +                   (symlink
> +                    (string-append "lock-obj-pub." tuple ".h")
> +                    "src/syscfg/lock-obj-pub.linux-gnu.h"))

If possible, a short comment or a link to some upstream discussion that
explains this would be helpful.

Could you send an updated patch?

Thank you,
Ludo’.




This bug report was last modified 5 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.