From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0AoyAtE67GDHLAEAgWs5BA (envelope-from ) for ; Mon, 12 Jul 2021 14:51:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mMSHOdA67GBzTAAAbx9fmQ (envelope-from ) for ; Mon, 12 Jul 2021 12:51:28 +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 6675910184 for ; Mon, 12 Jul 2021 14:51:28 +0200 (CEST) Received: from localhost ([::1]:55838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2vPD-0006aZ-GB for larch@yhetil.org; Mon, 12 Jul 2021 08:51:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2vH4-0007dV-Ga for guix-patches@gnu.org; Mon, 12 Jul 2021 08:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2vH4-0006Id-7c for guix-patches@gnu.org; Mon, 12 Jul 2021 08:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2vH4-0001hf-57 for guix-patches@gnu.org; Mon, 12 Jul 2021 08:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Jul 2021 12:43: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: Maxime Devos Cc: 49025@debbugs.gnu.org Received: via spool by 49025-submit@debbugs.gnu.org id=B49025.16260937346462 (code B ref 49025); Mon, 12 Jul 2021 12:43:02 +0000 Received: (at 49025) by debbugs.gnu.org; 12 Jul 2021 12:42:14 +0000 Received: from localhost ([127.0.0.1]:36731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vGH-0001gA-R7 for submit@debbugs.gnu.org; Mon, 12 Jul 2021 08:42:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vGG-0001fv-H1 for 49025@debbugs.gnu.org; Mon, 12 Jul 2021 08:42:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2vGB-0005aK-7t; Mon, 12 Jul 2021 08:42:07 -0400 Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=50216 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2vG9-00029j-8p; Mon, 12 Jul 2021 08:42:07 -0400 From: Mathieu Othacehe References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-21-maximedevos@telenet.be> Date: Mon, 12 Jul 2021 14:42:03 +0200 In-Reply-To: <20210711114723.27568-21-maximedevos@telenet.be> (Maxime Devos's message of "Sun, 11 Jul 2021 13:47:23 +0200") Message-ID: <87tukzhffo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1626094288; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=1NFgR3+jECTDdMsxJdNJhtX1Km8ltsStXLcYaNNBKQM=; b=Ccl98QkAPh4gymzNWGEUmjhn1y0MAhtaqhBced46SWfsD4kWLltSvBHwOL6OiFaZ8bCo35 K+9wQXECw+YPHvbUZ/TMuP4YO4TdIp/rshinjsxqF8lwifQgnksn2Wixr2ufwh/c8oKbsH 5NQT/iz8sFfolKWOsHBPxuI/YAnzc9kMvRrFV5A89rs8/YoEIQWqEKu+U8Ubgno/QLwJk1 cq+izX0jwZEOnDHWxMtG0XQv3mngaipIAPXK1ls1BojrcSLoBJiuB4jBI0BAOHZk8p2wxq tHuhjBPD8+40QYGPJ7vzYVjdTttWqCCnctsSKOGrFxQWORncWybUbgUeRDip7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626094288; a=rsa-sha256; cv=none; b=ajkiOXrVDozs3Kp506grQPFNHUekey9G0I1uGdW5/0WZQk9RChqYm+u5+z5JKwQKqreTZr cpM6aH5FfCBS0FsZiiXUpgERKqdYvl5P9pPo53fEPsYj9wNzUrTtfVaCKYj3cuYke8EHbO bAT2otUoXfP+2bJR25N/3wKucQGeRPX4pM2zxrQPscnNRBS2oT5Ciihvf3MhbP2iFObMwl d7Y+beh7Wf1/iVTbqaJk+2Yzbrs7D84Q1pxQefiBFSYm/SyNK4ZtwlEGALBogQM8URPlP6 V1SXp4L2qd17KyAfJPSfydb3/H/VR/y+/OqZSAK4uB9VR9dcH2HzgSRgn5XdYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.57 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 6675910184 X-Spam-Score: -3.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6TugEUkI8jej Hey, > This has been tested with: > > $ ./pre-inst-env guix build glib --target=3Daarch64-linux-gnu > > on a x86_64-linux system. =E2=80=98If it compiles, it should work.=E2=80= =99 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