mbox series

[bug#49025,v4,core-updates,00/36] Support cross-compilation with meson

Message ID 20210619150458.12057-1-maximedevos@telenet.be
Headers show
Series Support cross-compilation with meson | expand

Message

M June 19, 2021, 3:04 p.m. UTC
This is the same as v1 (v2 and v3 are the same as v1 but the sending
was messed up), but with merge conflicts resolved. Also, one
patch of v1 is already on core-updates, so it is dropped here.

I'm currently testing whether things still work,
and whether the patch for GCC still works and if it is still
required.

Here is the old description:

This patch series adds cross-compilation support to meson-build-system.
meson-build-system is used by many gtk applications (sometimes directly,
sometimes because a dependency uses meson-build-system).

Meson cross-compilation is implemented by the last patch.
The one-before-last patch works-around the brokenness of
GCC cross-compilers on current core-updates
(see <http://issues.guix.gnu.org/48913>;).

The first two patches define a few utilities target-linux?,
target-x86-32? and target-x86-64? which are used by the last patch,
but could be useful elsewhere as well. The third patch is used
in various cross-compilation fixes.

The other 33 patches are cross-compilation fixes for dependencies
of glib, and follow-up patches making the package definitions
somewhat nicer IMHO (like removing trailing #t from phases,
and computing derivation for some architecture-independent packages
when cross-compiling and compiling natively).

Maxime Devos (36):
  utils: Define target-linux? predicate.
  utils: Define a target-x86-32? and target-x86-64? predicate.
  packages: Define this-package-input and this-package-native-input.
  net-base: Make #:builder argument a G-expression.
  net-base: Fix cross-compilation, eliminating %build-inputs & friends
  net-base: Don't cross-compile.
  tzdata: Don't bother with cross-compiling.
  libgpg-error: Remove trailing #f from phases.
  libgpg-error: Prevent silent miscompilation some systems.
  libgpgerror: Maybe fix a cross-compilation bug.
  libgpg-error: Fix cross-compilation error.
  libgcrypt: Fix cross-compilation build error.
  wrap-python3: Make #:builder a G-exp instead of a raw S-exp.
  wrap-python3: Fix cross-compilation.
  python: Fix reference to input when cross-compiling.
  openssl: Remove trailing #t from phases.
  openssl: Make the #:phases argument a G-expression.
  openssl: Use G-exp machinery for referring to outputs.
  openssl: Move documentation instead of copying and deleting it.
  openssl: Move all man pages to separate output, not only man3.
  openssl: Find bin/env when cross-compiling.
  openssl: Extract logic for computing CONFIGURE_TARGET_ARCH.
  readline: Make #:configure-flags a G-expression.
  readline: Fix build error when cross-compiling.
  bash: Make #:configure-flags a G-expression.
  bash: Fix cross-compilation build error.
  fontconfig: Make the #:configure-flags argument a G-expression.
  fontconfig: Fix build error when cross-compiling.
  glib: Use a correct python in scripts when cross-compiling.
  glib: Verify the cross-compiled python is used in installed scripts.
  glib: Look up "tzdata" in 'native-inputs', not 'inputs'.
  tk: Make #:configure-flags a G-expression.
  tk: Do not use %build-inputs when cross-compiling.
  libelf: Use the cross-compiler when cross-compiling.
  cross-base: Fix cross-compiler for i686-linux-gnu.
  meson: Support cross-compilation.

 Makefile.am                        |   1 +
 gnu/packages/admin.scm             |  44 ++++---
 gnu/packages/base.scm              |   9 ++
 gnu/packages/bash.scm              |  39 +++---
 gnu/packages/cross-base.scm        |  63 ++++++++-
 gnu/packages/elf.scm               |  48 ++++---
 gnu/packages/fontutils.scm         |   8 +-
 gnu/packages/glib.scm              |  34 ++++-
 gnu/packages/gnupg.scm             |  60 ++++++---
 gnu/packages/python.scm            |  51 ++++----
 gnu/packages/readline.scm          |  27 ++--
 gnu/packages/tcl.scm               |  14 +-
 gnu/packages/tls.scm               | 142 +++++++++++----------
 guix/build-system/meson.scm        | 197 ++++++++++++++++++++++++++---
 guix/build/meson-configuration.scm |  71 +++++++++++
 guix/packages.scm                  |  29 +++++
 guix/utils.scm                     |  26 ++++
 tests/packages.scm                 |  34 +++++
 tests/utils.scm                    |  40 ++++++
 19 files changed, 724 insertions(+), 213 deletions(-)
 create mode 100644 guix/build/meson-configuration.scm


base-commit: bcdc13454c4afab37b650d4bbfa95e539060619f

Comments

Mathieu Othacehe July 8, 2021, 1:07 p.m. UTC | #1
Hello Maxime,

> This is the same as v1 (v2 and v3 are the same as v1 but the sending
> was messed up), but with merge conflicts resolved. Also, one
> patch of v1 is already on core-updates, so it is dropped here.

It seems that some patches of this series are a bit outdated since:

- %build-inputs have been re-introduced when cross-compiling with
   8a4830231871c578c80523e973ecd85f1f596ba6.

- Cross-compilation with GCC is in a much better shape since Ludo fix
  avalanche on core-updates.
  
Do you think you could send an updated series?

Thanks,

Mathieu