From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2GE/GJqP9WIcXQEAbAwnHQ (envelope-from ) for ; Fri, 12 Aug 2022 01:24:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SJ0/F5qP9WIg7AAAG6o9tA (envelope-from ) for ; Fri, 12 Aug 2022 01:24:10 +0200 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 1A946F4A0 for ; Fri, 12 Aug 2022 01:24:10 +0200 (CEST) Received: from localhost ([::1]:47432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMHX6-0002xB-9b for larch@yhetil.org; Thu, 11 Aug 2022 19:24:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMHX0-0002x3-62 for guix-patches@gnu.org; Thu, 11 Aug 2022 19:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMHWz-0003Ci-UA for guix-patches@gnu.org; Thu, 11 Aug 2022 19:24:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMHWz-0005K4-Nk for guix-patches@gnu.org; Thu, 11 Aug 2022 19:24:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v2 08/13] gnu: racket: Support cross-compiling the VM packages. Resent-From: "Philip McGrath" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Aug 2022 23:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Liliana Marie Prikler" , 57050@debbugs.gnu.org Cc: Liliana Marie Prikler , Thiago Jung Bauermann Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166026022620436 (code B ref 57050); Thu, 11 Aug 2022 23:24:01 +0000 Received: (at 57050) by debbugs.gnu.org; 11 Aug 2022 23:23:46 +0000 Received: from localhost ([127.0.0.1]:55192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMHWj-0005JY-J0 for submit@debbugs.gnu.org; Thu, 11 Aug 2022 19:23:45 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:51297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMHWh-0005JI-Dt for 57050@debbugs.gnu.org; Thu, 11 Aug 2022 19:23:44 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 39162320090D; Thu, 11 Aug 2022 19:23:37 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute4.internal (MEProxy); Thu, 11 Aug 2022 19:23:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1660260216; x=1660346616; bh=E8TMsswHle PsEgxoBMUObZZFKHzKKFK3s/o8aS9W4PM=; b=U/9vJhW+ruRPW1Z9NBnvL+rnF5 IWaGj2MQQb+hLowgtKOwrYL70FlFKuK16CHr0AKGOjoL9ATxylYoHtGq87HYJfa5 DSwBxKLSrHGRKZ8a9+A+KbRcnCTb7pA5JSdC1Kv1oGhMvs70v+SDUV58kNmfHdgg Q9TGcylr3Uz0TwwkYDXnmmDQ2HrOeUqb4TPqnapVd92zNKLxEToY5iiDis5G30vy 4AfrcgUKfv04dYgfWhfkwRJzgp0RDRULR+pHFxfX5F9TOLW3v7EYu5keUsdELU1I NvcUDaLv8JNYmbnz5vXNS6Z9veFxVKc59HCUiWZ6Ob4c0fo83mTCgq/bnM3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1660260216; x= 1660346616; bh=E8TMsswHlePsEgxoBMUObZZFKHzKKFK3s/o8aS9W4PM=; b=E peNAoqxSmpi8cZX4M9zAuG65PBhb74K2Dtof0cu3tb9wPpTxJ9595ODcAxjpHlW7 FxtYdHmGAdqep9G3rxGH9fI/WUEdSgNfPZSHtqObjyAyIzQqfDv8joy/xRYCjO8t PQJ/7s+wXGZySEQhuJmYftS0K5Bc1/VakGiIQA2H+yj3IupFOUEzlVZN1B4gCNjS kvV4JFOwyUzay5EU0w1/VaWRiGCbZxi2++S6aqoXkHEK2fT6kO0RQprLJ4N9pIQL 0RF3JgbcbLBKndu0yo6PXwnq1gazIFG3Y8Zzxv/mYy9Bz0jjcj5+sX2kqqiwsrZm QkX2GqK4oN3sdP61WOw+Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeghedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreertdenucfhrhhomhepfdfr hhhilhhiphcuofgtifhrrghthhdfuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrth hhrdgtohhmqeenucggtffrrghtthgvrhhnpefhheehhfejiedujeeftedtieegtedtvdfh ledtfefhueejleevheetheeghfeuhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtgho mh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5FFC0C6008B; Thu, 11 Aug 2022 19:23:36 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-811-gb808317eab-fm-20220801.001-gb808317e Mime-Version: 1.0 Message-Id: In-Reply-To: <412a5cbf52798c9725eaba8575232fef75889c91.camel@ist.tugraz.at> References: <412a5cbf52798c9725eaba8575232fef75889c91.camel@ist.tugraz.at> Date: Thu, 11 Aug 2022 19:23:15 -0400 From: "Philip McGrath" Content-Type: text/plain 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660260250; 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:dkim-signature; bh=E8TMsswHlePsEgxoBMUObZZFKHzKKFK3s/o8aS9W4PM=; b=MLcTR3tUKq9TLir1kvHalrUpe8hLVP810sF716lyST8mmjJ1dm32PdFu2HX7FmRyPSdrKS Ky71XFpeTOKaCD0XrMzDSHZZbGOfVpjE8O8JxxhLZOvnKNjNRMjbiU64JbFYupCWqwfsVI TROBM9z3Ph+jngatrdCa3aBKzYThIYZuAJm1Xo6RmG0z8oHyjhvUiJRMe7+DIcqHeXNecr ORVIpk+CSaDydxBbBQsHjeAzsMfpPY65xsN9O9xkiQS2kWJlJLM2i6fJdhpqa+GZiRBHCr lMlWG0bBlhffNbs2PuyyDVcB9XmFGLaVMdgDCijDDNTXC2cYkbSucn1rSwt7+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660260250; a=rsa-sha256; cv=none; b=BsJiDoy/v27rK9dRoa8QzhG2pEJ0pGxUWzjuL91vn7rZGimNcRZsfplRPTfsfEpsIU1pVB T/H+0j2Qp9EIv8UR1bStRxGvy/clyh6aUHOgZBq+RQn5ihF6H3uB6HMmSJHLZbUanAh4pC 50lk64Gzaq1ofm9D2fEb7l1Xxdhaud5vz0t9ZZsRke7y1t4UOyG9SPtUbLh/AmC2Zy0OFB 8/c1/X23E2J7sThLYRN9C9/K9iudJ9d292ICJ/C47mLdhwv7RZKeLiMrVhL1wgxEnCJ/XP azECIM6X3FLamP3tWtgF8SyUdyvdTidOcROjNfzQkNZ2Se1LRDOt/110kgo/WQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="U/9vJhW+"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="E peNAoq"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="U/9vJhW+"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="E peNAoq"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1A946F4A0 X-Spam-Score: 3.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: fbFxwcO9K5/j Hi, On Thu, Aug 11, 2022, at 7:58 AM, Liliana Marie Prikler wrote: > Am Donnerstag, dem 11.08.2022 um 07:08 -0400 schrieb Philip McGrath: >> Cross-compilation works for 'racket-vm-cgc', 'racket-vm-bc', and >> 'racket-vm-cs'. These changes are not enough to cross-compile >> 'racket-minimal' or 'racket': that would require building and loading >> cross-compilation pluggins for 'racket-vm-cs', which will be much > plugins >> easier once we can build the package 'raco-cross'. >>=20 >> * gnu/packages/racket.scm (racket-vm-cgc): Add 'this-package' when >> cross-compiling. >> (racket-vm-bc)[native-inputs]: Adjust accordingly. >> (racket-vm-cs)[native-inputs]: Use 'racket-vm-cs' instead of >> 'racket-vm-bc' when cross-compiling. Adapt to changes to >> 'racket-vm-cgc'. > Is that needed? Can racket-vm-cs not be "cross-bootstrapped"? I'm not sure what "cross-bootstrapped" means. Chez Scheme is more like GCC than LLVM in that it only generates code fo= r one target at a time. Unlike GCC, you don't have a separate executable= for each backend: the C part and the pure Scheme part can be shared. Fo= r cross-compilation, you generate an "xpatch" file, a compiler plugin so= mewhat like a bootfile, for the target machine type. You use it by loadi= ng it into a running `scheme` process: AIUI it, as a side-effect, mutate= s parts of the compiler to turn it into a compiler for the target archit= ecture. Once an "xpatch" is loaded, some parts of the host functionality= are no longer accessible. Racket provides a somewhat more convenient in= terface, including the ability to run a copy of itself in a subprocess t= o drive the compilation. In keeping with Racket's overall design, the VM= layer provides only primitive hooks, leaving it up to packages to provi= de higher-level interfaces that deal with managing native- and cross-com= piled files in parallel, dependency management, and other issues. The shorter version is that I asked Matthew Flatt how he recommended man= aging cross-compilation, and he strongly suggested first getting non-cro= ss package builds working well, then reusing as much of `raco cross` as = possible. -Philip