[bug#36477,v2,00/61] Add --target support to guix system
mbox series

Message ID 87wof6x5v4.fsf@gmail.com
Headers show
Series
  • Add --target support to guix system
Related show

Message

Mathieu Othacehe Aug. 21, 2019, 8:47 a.m. UTC
Hi,

Here's a serie to add target support to guix system command. Most of the
patches were reviewed in v1 by Marius and Ludo, but this serie adds some more
patches to complete target support.

Using the dummy system in attachment, I'm able to generate a cross-built guix
system with this command:

--8<---------------cut here---------------start------------->8---
 ./pre-inst-env guix system disk-image gnu/system/examples/mini.scm --target=aarch64-linux-gnu
--8<---------------cut here---------------end--------------->8---

Some of the patches in this serie are from a friend Pierre-Moana who
helped me much here.

Next step is to find an aarch64 board and boot it with a cross-built
guix system!

I pushed those patches to wip-cross-system branch of savannah.

Thanks,

Mathieu
Mathieu Othacehe (52):
  gnu: perl: Fix cross-compilation.
  gnu: python: Fix cross compilation.
  gnu: tcl: Fix cross-compilation.
  gnu: tk: Fix cross-compilation.
  gnu: libxslt: Fix cross-compilation.
  gnu: xorg: Fix cross-compilation of multiple packages.
  gnu: libgpg-error: Fix cross compilation.
  gnu: python: Further cross-compilation fixes.
  gnu: http-parser: Fix cross-compilation.
  gnu: openssl: Fix cross-compilation.
  gnu: texinfo: Fix cross-compilation.
  gnu: cmake: Fix cross-compilation.
  gnu: libgit2: Fix cross compilation.
  gnu: ath9k-htc-firmware: Fix cross compilation.
  gnu: libpaper: Fix aarch64 cross-compilation.
  gnu: groff: Fix cross compilation.
  gnu: bc: Fix cross-compilation.
  gnu: indent: Fix aarch64 cross-compilation.
  gnu: libsamplerate: Fix aarch64 cross-compilation.
  gnu: mit-krb5: Fix cross-compilation.
  gnu: cyrus-sasl: Fix cross-compilation.
  gnu: help2man: Fix cross-compilation.
  gnu: xmlto: Fix cross-compilation.
  gnu: libarchive: Fix cross-compilation.
  gnu: tcsh: Fix cross-compilation.
  gnu: pkg-config: Fix cross-compilation.
  gnu: mkfontdir: Fix aarch64 cross-compilation.
  gnu: alsa-utils: Fix cross-compilation.
  gnu: icu4c: Fix cross-compilation.
  gnu: glibc-utf8-locales: Fix cross-compilation.
  gnu: boost: Fix cross-compilation.
  gnu: eudev: Fix cross-compilation.
  gnu: lvm2: Fix cross-compilation.
  gnu: openldap: Fix cross-compilation.
  gnu: swig: Fix cross-compilation.
  gnu: git: Fix cross-compilation.
  gnu: make-linux-libre: Fix cross-compilation.
  gnu: procps: Fix cross-compilation.
  gnu: doxygen: Fix cross-compilation.
  gnu: guile-sqlite3: Fix cross-compilation.
  gnu: guile-gcrypt: Fix cross-compilation.
  gnu: console-setup: Fix cross-compilation.
  gnu: mdadm: Fix cross-compilation.
  gnu: grub: Fix cross-compilation.
  linux-initrd: Use native gzip.
  gnu: linux-libre: Enable built-in ext4 support.
  gexp: Use cross extensions when cross-compiling.
  gexp: Pass target to compiled-modules in lower-gexp.
  utils: Use target-arm64? and target-arm? helpers.
  system: vm: Add arm64 support.
  system: vm: Support cross-compilation.
  scripts: system: Add --target option.

Pierre-Moana Levesque (9):
  gnu: texinfo-5: Fix cross-compilation.
  gnu: nghttp2: Fix cross-compilation.
  gnu: libtool: Fix cross-compilation.
  gnu: texinfo-4: Fix cross compilation
  gnu: libnl: Fix cross-compilation.
  gnu: crda: Fix cross-compilation
  gnu: guile-xcb: Fix cross-compilation.
  gnu: guile-wm: Fix cross-compilation.
  gnu: cmake: Fix cross-compilation.

 gnu/build/vm.scm                              |  22 +-
 gnu/local.mk                                  |   6 +
 gnu/packages/algebra.scm                      |  15 +-
 gnu/packages/autotools.scm                    |  10 +-
 .../aux-files/linux-libre/5.2-arm64.conf      |   2 +-
 gnu/packages/backup.scm                       |  47 +-
 gnu/packages/base.scm                         |   4 +-
 gnu/packages/boost.scm                        |  28 +-
 gnu/packages/bootloaders.scm                  |   6 +-
 gnu/packages/cmake.scm                        |  14 +-
 gnu/packages/code.scm                         |  18 +-
 gnu/packages/commencement.scm                 |  11 +-
 gnu/packages/cyrus-sasl.scm                   |  17 +-
 gnu/packages/documentation.scm                |  12 +-
 gnu/packages/firmware.scm                     |   5 +-
 gnu/packages/ghostscript.scm                  |  19 +
 gnu/packages/gnupg.scm                        |  47 +-
 gnu/packages/groff.scm                        |  40 +-
 gnu/packages/guile-wm.scm                     |   8 +-
 gnu/packages/guile.scm                        |   7 +-
 gnu/packages/icu4c.scm                        |  35 +-
 gnu/packages/kerberos.scm                     |  21 +-
 gnu/packages/linux.scm                        | 127 ++++--
 gnu/packages/man.scm                          |   2 +
 gnu/packages/openldap.scm                     |  30 +-
 .../patches/bc-fix-cross-compilation.patch    | 171 +++++++
 gnu/packages/patches/boost-dumpversion.patch  |  24 +
 .../patches/cyrus-sasl-ac-try-run-fix.patch   |  12 +
 .../guile-gcrypt-fix-cross-compilation.patch  | 431 ++++++++++++++++++
 .../guile-sqlite3-fix-cross-compilation.patch |  55 +++
 .../patches/python-2.7-search-paths.patch     |  10 +-
 .../patches/python-3-search-paths.patch       |  11 +-
 .../patches/python-cross-compile.patch        | 145 ++++++
 gnu/packages/perl.scm                         |   7 +-
 gnu/packages/pkg-config.scm                   |  13 +-
 gnu/packages/pulseaudio.scm                   |  22 +-
 gnu/packages/python.scm                       |  54 ++-
 gnu/packages/shells.scm                       |   9 +
 gnu/packages/swig.scm                         |   1 +
 gnu/packages/tcl.scm                          |  28 +-
 gnu/packages/texinfo.scm                      |  63 ++-
 gnu/packages/tls.scm                          |  62 ++-
 gnu/packages/version-control.scm              |  40 +-
 gnu/packages/web.scm                          |  25 +-
 gnu/packages/xml.scm                          |   4 +
 gnu/packages/xorg.scm                         |  60 ++-
 gnu/system.scm                                |  15 +-
 gnu/system/linux-initrd.scm                   |   2 +-
 gnu/system/vm.scm                             |  42 +-
 guix/build-system/cmake.scm                   |   9 +-
 guix/gexp.scm                                 |   5 +-
 guix/scripts/system.scm                       |  15 +-
 guix/utils.scm                                |   8 +
 53 files changed, 1687 insertions(+), 209 deletions(-)
 create mode 100644 gnu/packages/patches/bc-fix-cross-compilation.patch
 create mode 100644 gnu/packages/patches/boost-dumpversion.patch
 create mode 100644 gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch
 create mode 100644 gnu/packages/patches/guile-gcrypt-fix-cross-compilation.patch
 create mode 100644 gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
 create mode 100644 gnu/packages/patches/python-cross-compile.patch

Comments

Ludovic Courtès Sept. 2, 2019, 12:50 p.m. UTC | #1
Hi!

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

> Here's a serie to add target support to guix system command. Most of the
> patches were reviewed in v1 by Marius and Ludo, but this serie adds some more
> patches to complete target support.

Sorry for the delay.

Could you already apply the patches that Marius and I already agreed to?
Double-check that they can go to ‘master’ without triggering a full
rebuild.

I’ll comment on the rest hopefully soon…

Thanks,
Ludo’.
Mathieu Othacehe Sept. 2, 2019, 3:40 p.m. UTC | #2
Hey,

> Could you already apply the patches that Marius and I already agreed to?
> Double-check that they can go to ‘master’ without triggering a full
> rebuild.

Done! I pushed them to core-updates-next as almost all of them trigger
mass rebuild.

I sent a v3 with the unreviewed patches. The most critical ones are maybe
number 41 and 42 as they hit (guix gexp) module.

Thanks,

Mathieu