[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49025] [PATCH v5 20/20] meson: Support cross-compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#49025] [PATCH v5 20/20] meson: Support cross-compilation. |
Date: |
Mon, 12 Jul 2021 14:42:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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.
> + (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.
> + (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---
> +(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?
Thanks,
Mathieu
- [bug#49025] [PATCH v5 04/20] net-base: Don't cross-compile., (continued)
- [bug#49025] [PATCH v5 04/20] net-base: Don't cross-compile., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 05/20] tzdata: Don't bother with cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 07/20] libgpg-error: Prevent silent miscompilation some systems., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 06/20] libgpg-error: Remove trailing #f from phases., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 08/20] libgpg-error: Fix cross-compilation error., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 11/20] openssl: Make the #:phases argument a G-expression., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 13/20] openssl: Move documentation instead of copying and deleting it., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 14/20] openssl: Move all man pages to separate output, not only man3., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 19/20] libelf: Update configure script and config.guess and config.sub., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation.,
Mathieu Othacehe <=
- [bug#49025] [PATCH v5 09/20] python: Fix reference to input when cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 10/20] openssl: Remove trailing #t from phases., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 15/20] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 16/20] glib: Use a correct python in scripts when cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 18/20] glib: Look up "tzdata" in 'native-inputs', not 'inputs'., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 12/20] openssl: Use G-exp machinery for referring to outputs., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 17/20] glib: Verify the cross-compiled python is used in installed scripts., Maxime Devos, 2021/07/11