From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YGOoB495x2BbZQAAgWs5BA (envelope-from ) for ; Mon, 14 Jun 2021 17:45:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EHT2Ao95x2BaDQAAB5/wlQ (envelope-from ) for ; Mon, 14 Jun 2021 15:45:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 82AF2347CC for ; Mon, 14 Jun 2021 17:45:17 +0200 (CEST) Received: from localhost ([::1]:48462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsom3-0002VT-1z for larch@yhetil.org; Mon, 14 Jun 2021 11:45:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsoQY-0002Zu-Is for guix-patches@gnu.org; Mon, 14 Jun 2021 11:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsoQY-0006Kc-Aq for guix-patches@gnu.org; Mon, 14 Jun 2021 11:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsoQY-0003nS-3i for guix-patches@gnu.org; Mon, 14 Jun 2021 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH core-updates 00/37] Support cross-compilation with meson Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Jun 2021 15:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49025 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49025@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162368414214527 (code B ref -1); Mon, 14 Jun 2021 15:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jun 2021 15:22:22 +0000 Received: from localhost ([127.0.0.1]:47467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoPt-0003mF-Ki for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:22:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:59914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoPs-0003m7-8C for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:22:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsoPr-0000Zc-W1 for guix-patches@gnu.org; Mon, 14 Jun 2021 11:22:20 -0400 Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]:51572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsoPp-0005zM-G3 for guix-patches@gnu.org; Mon, 14 Jun 2021 11:22:19 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3NB2500K0mfAB4013NBn4; Mon, 14 Jun 2021 17:22:11 +0200 Message-ID: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> From: Maxime Devos Date: Mon, 14 Jun 2021 17:22:11 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623684132; bh=x1eWo3QX4Ry2pHMBqhd/LUaQEMWIsO298q5JjZCWWS8=; h=Subject:From:To:Date; b=saCWJk5VnoAY/rIUH96lYLdSLc+UcABC6a/ciXnmT2yGz232QfnPzAwalYRXAviYW fB33wgsK4omIumykn30aGMsrXNuscexIny2aqcMeLlZwgcJdrYP7iwI0bH8QADjhkZ En2lIHQLLdEg4s3eTJl/aaJ5CHOTwTwQYnOM5F1hYd92p0CEn5oWqQWA7WN0UKTqsl LDnwJfRSGAPuLP/ClvlAuli4/7/mzKod/NVA85Yk7lT6hg/VLkyO2UKNqHmnub9TEk JYFrfEDC1kn4y64llv+l1hbwNpPi33/l3WDJoDDu0rvIlzSz+v+avYQ1O1IlyCl/ne PGHXrH77GKlZA== Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623685517; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=x1eWo3QX4Ry2pHMBqhd/LUaQEMWIsO298q5JjZCWWS8=; b=ss0xbrJj+wbXO7tktbMo/JKf4wSkhYp0eH4HGDKM95U3OkNiixG2jT04cQisC2RFgMf+8/ Bh4kX3rNdlsxIrAWhKZuwbF7brn8DpePYeszyxzXkzlzvZn326O2/AMwbLcfziPATr7Thf JNBE+xG5vwXR4v9GnKu9Sv+xcqF2EBZ2E+tB/IqxDNiPEhIOvdDh27J4h1szbbiqCuZp/U 0aoghojzKr14adDsY963Ci/rqZkJ7MR5dt/1IeO6aTE4gxsx9zGBYOB/4odhwXdrORqoD6 9/dSFMdgdG7A9lf3FYkk9xTEonY/A9YHlQtoOnxoe1a3KWzfy0lTrpTRgU+tIw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623685517; a=rsa-sha256; cv=none; b=M7d0e4f78np7vnwVJznjld8ln+XKd0/6f11trbMCJKS7v5CiTusffdYCUb3bYCFBBPPRC0 LyHOremuWaF4hLmGVi39e/BllimMXsFuz2U8HYkD3AVnCVyfuw1oIM1ZAXAP2tBSyxXAV6 fWYiqFE8Drqi6YJFUbCtJXzFVWHkIkoxx4qZR1Ji478lZcQ82Qv51A7eCndHq9t9rRGOE4 qJxr2Cmit1Lfom0QrFPBZmmZYLmkAC6FPvTAIwRVdJ4+LpVrmw04RGs5asFbHwIfowi9vT jtFdsEa7VjytTU1IqhiDqGa4xfqrbUCkWSNnfT/F2/cbY+Nq9/AAMB8Bbt3y/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=saCWJk5V; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=saCWJk5V; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 82AF2347CC X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: d55uZnRmGzsh 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). This has been tested with ./pre-inst-env guix build --target=i686-linux-gnu glib on a x86_64-linux system. The build succeeds, and "guix gc --references ..." looked reasonable to me. 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 ;). 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 34 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 (37): 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. opendht: Correct 'nettle' variable name in inputs. 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/networking.scm | 2 +- 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 | 200 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 ++++++++++ guix/packages.scm | 29 +++++ guix/utils.scm | 26 ++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 20 files changed, 728 insertions(+), 214 deletions(-) create mode 100644 guix/build/meson-configuration.scm base-commit: 92803cbef5affa3dbbf049262e1fcf290d8d8622