GNU bug report logs - #49025
[PATCH core-updates 00/37] Support cross-compilation with meson

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Mon, 14 Jun 2021 15:23:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 49025 <at> debbugs.gnu.org
Subject: [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation.
Date: Tue, 13 Jul 2021 15:36:14 +0200
[Message part 1 (text/plain, inline)]
Mathieu Othacehe schreef op ma 12-07-2021 om 14:42 [+0200]:
> Hey,
> 
> > This has been tested with:
> > 
> > $ ./pre-inst-env guix build glib --target=aarch64-linux-gnu
> > 
> > on a x86_64-linux system.  ‘If it compiles, it should work.’
> 
> Nice you added aarch64 support :).
> 
> > +(define (target-hurd? triplet)
> > +  (and (string-suffix? "-gnu" triplet)
> > +       (not (string-contains triplet "linux"))))
> 
> Maybe it should go in the (guix utils) module.

I placed it there, and adjusted (gnu packages hurd)
and other modules to use it instead of hurd-triplet?.
> 
> > +    (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686
> > +                   (substring triplet 0 4))
> > +                  ((target-x86-64? triplet) "x86_64")
> > +                  ((target-aarch64? triplet) "armv8-a")
> 
> We could add:
> 
> --8<---------------cut here---------------start------------->8---
> ((target-arm32? triplet) "armv7")
> --8<---------------cut here---------------end--------------->8---
> 
> for arm32 support.

Added in the v5! I assume arm32 is little-endian in Guix.

> > +          (call-with-output-file #$output
> > +            (lambda (f)
> > +              (parameterize ((configuration-port f))
> 
> Why don't you pass the port parameter to the build side procedures like
> so:
> 
> --8<---------------cut here---------------start------------->8---
> (call-with-output-file #$output
>   (lambda (port)
>     (write-section-header port "host_machine")
>     ...
> --8<---------------cut here---------------end--------------->8---

No reason in particular.  I'll eliminate the 'configuration-port' parameter
in the v5.

> > +(define* (make-machine-alist #:key system cpu-family cpu endian)
> > +  "Make an association list for the [host_machine] section."
> > +  `((system . ,system)
> > +    (cpu-family . ,cpu-family)
> > +    (cpu . ,cpu)
> > +    (endian . ,endian)))
> 
> This one is unused, right?

Yes. I'll remove it in the v5.

I'll send the v5 once it is tested (with --target=armhf-linux-gnu).

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 2 days ago.

Previous Next


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