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 aCpVMbM5B2P6XQEAbAwnHQ (envelope-from ) for ; Thu, 25 Aug 2022 10:58:27 +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 oORyMLM5B2M3mAAAG6o9tA (envelope-from ) for ; Thu, 25 Aug 2022 10:58:27 +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 682FDED04 for ; Thu, 25 Aug 2022 10:58:27 +0200 (CEST) Received: from localhost ([::1]:48274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR8gz-00033F-26 for larch@yhetil.org; Thu, 25 Aug 2022 04:58:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8ff-00024s-Sf for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8ff-0003CP-Jv for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8ff-0002cb-GN for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 11/14] 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, 25 Aug 2022 08:57:03 +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: Philip McGrath , Thiago Jung Bauermann , "\(" , Maxime Devos , Liliana Marie Prikler , Efraim Flashner , Liliana Marie Prikler Received: via spool by 57050-submit@debbugs.gnu.org id=B57050.166141780010006 (code B ref 57050); Thu, 25 Aug 2022 08:57:03 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:40 +0000 Received: from localhost ([127.0.0.1]:48901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fH-0002bE-FA for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:39 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:43966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8ei-0002Yg-3h for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:04 -0400 Received: by mail-vs1-f44.google.com with SMTP id w188so12148056vsb.10 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:04 -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=1veCoxHFoj5iPTmAArR9EFGJLAT1FoM0LJuQpEwFjoU=; b=aM/Z/A7WE8SZkAuWkxswJJdu2rFzKj6ICkaoHGG1fITVESCPI1XlSwWWCjb2bqSqU4 Mn0IRRVn1QADBZ+YC8M26rL8D9KHNfXkukxZa9OKQF0UB6ZzE5c1ozGk/KoUQG6xnYBN c9Sn4s3gaMDNEjJiLZ1q0sNKNhAa/l9nQa0J8bwz/X0Lv0oj5TpgeBPbz84ZejOdYmfy JmLICN0q/sfUMerCnaYaz8wcfDZ73JzyfB8NjOQluNAEvz/OXKKvGLzgMKhVFlG4C/N/ Pzmdzar3oO9M0kWnlhoAumX5NUC4FUH6lIm1B4CRhUfQh64sSKZdxpQHiIeFKCuUDVYq 0bFw== 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=1veCoxHFoj5iPTmAArR9EFGJLAT1FoM0LJuQpEwFjoU=; b=RMkNA3k0flYQj5ePkAw7Xskx7+74Y1afTZe1i6K3DLFUOjwmRWC/CMb+TZdeVWKDR2 iNNP2n9E6RkMmskOWClSDaPFtK+dHV4EI6ORprL/E0+Ltla71oBaszSBw30pv0QdqUdI pR4jJC+tvp4XmZrCTKhXUVlIY83MEJtWWYbKujCCJ5ESMmyynoO6mPoxIMobiZhykcGf GYxPnqnm1NZUsjZgKfFk3GtBwDCuds6be5gpVbn40i7OUSFPgSekHiKOrvDrObC7hHSq OxhIMc1AV+va7ABuqc7/AceryomO5BFs6ckw7E8OrVSnTHDqvd3HdmKt04ortPb8eSiu s+SA== X-Gm-Message-State: ACgBeo3hrmlGLu3LZu+rF0hF47SHeCJyuVo5dPsyc2LUVnMxPwgoNAYr ey8QlY8PmXS/hl9A0It6MpTWX5GmxIu68zQI X-Google-Smtp-Source: AA6agR4Zeag3n99hGw7PRV+k8tUFGqzdVXUwpjYGHEHGseE0Woe/a7vuK2ZwfgvkWqHcaD8y8BWkkw== X-Received: by 2002:a67:d905:0:b0:390:57db:659d with SMTP id t5-20020a67d905000000b0039057db659dmr1106638vsj.31.1661417758559; Thu, 25 Aug 2022 01:55:58 -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 x203-20020a1f31d4000000b00378ceed8f5bsm15658282vkx.53.2022.08.25.01.55.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:55:58 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:13 -0400 Message-Id: <4b5de88c4a2cd08dd601b6adbbe7389a9c611785.1661416343.git.philip@philipmcgrath.com> 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=1661417907; 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=1veCoxHFoj5iPTmAArR9EFGJLAT1FoM0LJuQpEwFjoU=; b=hHPRP9+nCfFojMszWAFjH7yxYcKgr2mhNVZ+m0BWPEPD957KfimIkfih2VcT7ezg1Az52U XKCwURGr5JY/vUR0GXvFoU7TT4brSdENg0sVR6mAAQUc2CX7V/Fi9ZExvHUdME4LmG0pEE cTv6fU462aiR8RZ093kAWHnKk1YhEAqXtDmZAPbp698qS++qpIu4YntYx9vePG1ANKYLUp mNUvcHPubP+PhewqtIrT2r8vMei36JvRt8T0gHEghl7VHnN84pZobtL1tCpvQyfcfV23hS vik5v0re/z2RIJV7RSNKKvt3YwhS5r/poHXZZHAs3aNWWm557oDCCIG/DRiPKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661417907; a=rsa-sha256; cv=none; b=nR6VGp786NxBcsMoaOKc9FI511teKNFi449tHt3sKPRjDiu3dbHgFsQ2mZDT1/tDMk1QkG ETER2cnupo1PKLhVTNfQpX0IgfPqgpONfqJcRDQ3jRig4DjLgyjHTDFf/roHj5LtNsN4V6 ABfNxkvP4RrTVUtSrWGPcmA8gT/PaRK/bBKvWRP9pjIqXS8x4RDALA8my1xwoDed/yo+Xk miqu8qh6xOjh1uPFcN58cKShUd8Riy6BMR6MqaToLSVXfdnM2IKhT1nL79x5M7CdNI7tSq hIuCru1Aja6U6Phdj8xxmK2hzb2hfiM6cqYzPQ3yqJVoErlm62f3S01xzKHiyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="aM/Z/A7W"; 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: 4.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="aM/Z/A7W"; 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: 682FDED04 X-Spam-Score: 4.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1FTSjBPKjauP 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 efabdd16f3..90e5e88be5 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -314,8 +314,11 @@ (define-public racket-vm-cgc (source %racket-origin) (inputs (list ncurses ;; <- common to all variants (for #%terminal) 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 @@ -403,8 +406,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 _ '()) @@ -434,11 +439,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) @@ -452,7 +463,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