From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CBXtMdzj9GIAIQEAbAwnHQ (envelope-from ) for ; Thu, 11 Aug 2022 13:11:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kGP+MNzj9GKEJgEAG6o9tA (envelope-from ) for ; Thu, 11 Aug 2022 13:11:24 +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 64B473DF72 for ; Thu, 11 Aug 2022 13:11:24 +0200 (CEST) Received: from localhost ([::1]:58444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM65z-0002Bn-CG for larch@yhetil.org; Thu, 11 Aug 2022 07:11:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM64j-0000gp-9d for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oM64i-0005Vf-Vx for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oM64i-0006Z2-S0 for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:04 -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 11:10:04 +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: 57050@debbugs.gnu.org Cc: Liliana Marie Prikler , Liliana Marie Prikler , Philip McGrath , Thiago Jung Bauermann Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166021616325072 (code B ref 57050); Thu, 11 Aug 2022 11:10:04 +0000 Received: (at 57050) by debbugs.gnu.org; 11 Aug 2022 11:09:23 +0000 Received: from localhost ([127.0.0.1]:51840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM643-0006WJ-5X for submit@debbugs.gnu.org; Thu, 11 Aug 2022 07:09:23 -0400 Received: from mail-qv1-f47.google.com ([209.85.219.47]:34772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM63z-0006Vp-Mz for 57050@debbugs.gnu.org; Thu, 11 Aug 2022 07:09:20 -0400 Received: by mail-qv1-f47.google.com with SMTP id u8so13075572qvv.1 for <57050@debbugs.gnu.org>; Thu, 11 Aug 2022 04:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=tN4aDTA3DHwgyJpiQzTQ+7Aqun8FzI4rNB2Y5gBAwLE=; b=dXuR+KBv0Uk1TSHCYIcBPbuqY2dYLXkZrKFpRFffn1usUWmSSRhsvNdoZSsob1TSOb Bax7Q5zrGSi6DDDvT+fLbcHit65/Sciv3mKlI/+QfW9Ed04ITPD8KWVatv5PFwMXugV+ u360CLX+BV3DsDM2NmK/oAbdyJOHAvpstBDSG5W1Ot5egJuwSfwqcygz7ewlQOmRH6OL WwyFnMxVMDv4UfZYHCYj4IUHMw1TP6BWKPN19YbEqiSduwRSEr/kpFlMVcvw7VZ/QEej ZerK4gus9HCcERdHaZ4rXZoXFKLb9bvQ6G6I+n9nPh8wWeU+pXB+7+jnNffhEfPmMgQF NfRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=tN4aDTA3DHwgyJpiQzTQ+7Aqun8FzI4rNB2Y5gBAwLE=; b=rn4Mpr2dyN1xqtgIkL5ThMLqKP9sSkvrFJ/RpySRXvZ8UxwAneJYNAr86WR3Glb4x8 L7XkgPP2g2mISM5HY1YjXQGc2eHTljI8Z7U0cs9DjSu3GDEkkpKOCKgd/AuvwB2KRZh1 7QiLclQ+7o8sPVYu5PNFmWOB5xKlHodJ/g4pDZ0KwepkbMH/tg1xyPya/5m4ussKa6hM vhTEQTGuJgGO1wOR8P+4PbI4COPe4xFjYjUT3pBCk3MqbpVMYAY1lXGUfIPyb8qA3bMu pp/XHT4lIj0tdNPDTNQAl9xtn+dD1rH9AhWWf4V3pISNWKE8+Ex6IFdKZmSdbs5S2Qx3 9uGw== X-Gm-Message-State: ACgBeo2IyKZykmcre16oSlt3HpsJ1FXWtxQHjs63eYeZeO8O6aVREB3V hFVWl6HXeJV23PpVFstTqYIOc/pNOx4bSsgg X-Google-Smtp-Source: AA6agR5nNGiGVf1xhLvSqFg8D/i6vkSo+/whoqNE9OSWfaaMsPdEmtPMHkH7l7lp9y4C27tJAmXIHQ== X-Received: by 2002:a05:6214:268c:b0:474:8351:5803 with SMTP id gm12-20020a056214268c00b0047483515803mr28150001qvb.23.1660216154236; Thu, 11 Aug 2022 04:09:14 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id fv14-20020a05622a4a0e00b00342fb07944fsm1505139qtb.82.2022.08.11.04.09.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Aug 2022 04:09:14 -0700 (PDT) From: Philip McGrath Date: Thu, 11 Aug 2022 07:08:18 -0400 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=1660216284; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=tN4aDTA3DHwgyJpiQzTQ+7Aqun8FzI4rNB2Y5gBAwLE=; b=d5/Uobf/TAIdHpdlXL/Ehj31ej6iGGekimlvaYtrkn2zPMqYTdYdNpdsxzQ8rIiqrx+K1D wS1KfnDx7+P6kGOcTDmXX9Wuk/lVxoLXEisibQ1fyT9pGs6+3IMTPLSqJrhkll++pVdK9/ 2ACvhExhNsGD4z/D5iGIiBSW+SSApGf95VeClFOGhna64Q1mn8hNUWisjiRmaZEWa93+0U KG/EwdZ8xab4nvaW+SLAEMjhGLx1ihrSmzD4kz5Ge+lAqxxH3E1bnx8g5g+SgryuoEUVJK orG3uedhwcwCvXK9gRsTV29e854dluzrmuuX6yj7ShgVnB9bdYc+5HLRkj/elw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660216284; a=rsa-sha256; cv=none; b=cnYc+XAdRCMRnWLunzLiihQS/DiE5LWiZ3J+r9jIPRJK5CAhx3V3OVv3U0kFjmxjBdlT5c G0/vnFekU29v3TV8MawAQIza3SYtX91F7Ciaqp5NMO/d8avQGGAOmcJg3a0wzMaS3OoXGF n3li4fTnpIOrQvDX15pRud+KZ/G2/YK/ZyrNUAEVqCGJRhs8LItqE8idDENOXUMnmbNzwk YJartfuj5BGXmkXFaN1KooJAhJTmpKoUs/IkbYdh9lyLuYXTtbCAI1KNxvwpWmZ7UTJQrN XRlHQVcvOT6IXIVCw+6QOTu0Gei995RzxWMm27GUK5H8bt/MJvrtbflDdOSTuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=dXuR+KBv; 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: 5.62 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=dXuR+KBv; 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: 64B473DF72 X-Spam-Score: 5.62 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8GVf1/543qRW 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 easier once we can build the package 'raco-cross'. * 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'. [arguments]<#:configure-flags>: Fix '--enable-scheme' for cross-compilation. --- gnu/packages/racket.scm | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 31f3394fa3..ef353103d6 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -332,8 +332,11 @@ (define-public racket-vm-cgc (inputs (list ncurses ;; <- common to all variants (for #%terminal) bash-minimal ;; <- common to all variants (for `system`) libffi)) ;; <- only for BC variants - (native-inputs (list zuo ;; <- for all variants - libtool)) ;; <- only for BC variants + (native-inputs (cons* zuo ;; <- for all variants + libtool ;; <- only for BC variants + (if (%current-target-system) + (list this-package) + '()))) (outputs '("out" "debug")) (build-system gnu-build-system) (arguments @@ -421,8 +424,10 @@ (define-public racket-vm-bc (inherit racket-vm-cgc) (name "racket-vm-bc") (native-inputs - (modify-inputs (package-native-inputs racket-vm-cgc) - (prepend racket-vm-cgc))) + (if (%current-target-system) + (package-native-inputs racket-vm-cgc) + (modify-inputs (package-native-inputs racket-vm-cgc) + (prepend racket-vm-cgc)))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) @@ -452,11 +457,17 @@ (define-public racket-vm-cs (prepend zlib lz4) (delete "libffi"))) (native-inputs - (modify-inputs (package-native-inputs racket-vm-cgc) - (delete "libtool") - (prepend chez-scheme-for-racket - chez-nanopass-bootstrap - racket-vm-bc))) + (let ((native-inputs (package-native-inputs racket-vm-cgc))) + (modify-inputs (if (%current-target-system) + (modify-inputs native-inputs + (delete "racket-vm-cgc")) + native-inputs) + (delete "libtool") + (prepend chez-scheme-for-racket + chez-nanopass-bootstrap + (if (%current-target-system) + racket-vm-cs + racket-vm-bc))))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:phases those-phases #~%standard-phases) @@ -470,7 +481,7 @@ (define-public racket-vm-cs "--enable-libz" "--enable-lz4" (string-append "--enable-scheme=" - #$(this-package-native-input + #+(this-package-native-input "chez-scheme-for-racket") "/bin/scheme") #$(racket-vm-common-configure-flags))))) -- 2.32.0