From patchwork Sun Jul 11 11:47:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 220 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 44CA027BC83; Sun, 11 Jul 2021 12:48:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0524427BC81 for ; Sun, 11 Jul 2021 12:48:14 +0100 (BST) Received: from localhost ([::1]:49026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2XwT-0003qG-4N for patchwork@mira.cbaines.net; Sun, 11 Jul 2021 07:48:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2XwI-0003pw-CF for guix-patches@gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2XwI-0007mL-4l for guix-patches@gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2XwI-0006yF-2u for guix-patches@gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH v5 00/20] Support cross-compilation with Meson Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Jul 2021 11:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49025 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49025@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 49025-submit@debbugs.gnu.org id=B49025.162600407726780 (code B ref 49025); Sun, 11 Jul 2021 11:48:02 +0000 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:47:57 +0000 Received: from localhost ([127.0.0.1]:34001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwC-0006xs-OD for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:47:57 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xw7-0006xg-MK for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:47:55 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01nnpot; Sun, 11 Jul 2021 13:47:50 +0200 From: Maxime Devos Date: Sun, 11 Jul 2021 13:47:03 +0200 Message-Id: <20210711114723.27568-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004070; bh=dz6LuoAjVF1DERjNEUGTe2Mk1xt7JdshQ2yr/WU4oag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pZHVxGrTY4GKw4DreImkNah/whDXaLmALwDuBU2Vh3h9gl6M0KWgBC18rmCybpV7R rtTs7c0psYsEgll2loSVp6U2NAhWVuJmmJcEvEFhnycHoMkNxzLRBK0LWgzNPYNiv7 RKNoosLDfeJ40BWzgYIsDuo+GIl25fDgVhSlvLa/ENRqdA2RlJLWXYZpeU75IPkf54 8kMSkxjZBy+scJAQQnO8CBjICluruw4B3xvKWAq81MaB12REshFUMzQjt7uyceB03p Oy57ZERcmHhe78dHnGAqnQziBsFpNe5yRyK5Q6FXBs82oJHFatPMILfKc2+2b83QdM VYSbxUsE5om6A== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The following changes were made since the v4: * As %build-inputs has been re-introduced when cross-compiling, I have removed the patches replacing (assoc-ref %build-inputs ...) with G-exp machinery. (Packages: net-base, libgcrypt, wrap-python3, openssl, readline, fontconfig, bash) * The cross-compilation fixes for libelf were simplified by always regenerating the 'configure' script and updating 'config.guess' and 'config.sub'. * I modified 'make-machine-alist' such that it recognises the 'aarch64' architecture. Meson also wants a 'CPU type', so I choosed 'armv8-a'. Not sure if that's always correct, but ‘1.2 GNU Distribution’ notes: ‘Packages are currently available on the following platforms: [...] aarch64-linux: little-endian 64 ARMv8-A processors, [..]’ so it should be good for supported targets in Guix at least. * I removed the usage of 'canonical-package' in the inputs of 'glib'. Apparently, canonical packages are not supposed to appear in the reference graph (). Maxime Devos (20): 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: 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. libgpg-error: Fix cross-compilation error. 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: Extract logic for computing CONFIGURE_TARGET_ARCH. 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'. libelf: Update configure script and config.guess and config.sub. meson: Support cross-compilation. Makefile.am | 1 + gnu/packages/admin.scm | 5 + gnu/packages/base.scm | 9 ++ gnu/packages/elf.scm | 44 ++++--- gnu/packages/glib.scm | 34 ++++- gnu/packages/gnupg.scm | 48 ++++--- gnu/packages/python.scm | 5 +- gnu/packages/tls.scm | 136 +++++++++---------- guix/build-system/meson.scm | 201 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 ++++++++++ guix/packages.scm | 29 +++++ guix/utils.scm | 26 ++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 14 files changed, 561 insertions(+), 122 deletions(-) create mode 100644 guix/build/meson-configuration.scm