From patchwork Thu Aug 25 08:54:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41952 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E69CA27BBEA; Thu, 25 Aug 2022 10:39:47 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9E95927BBE9 for ; Thu, 25 Aug 2022 10:39:47 +0100 (BST) Received: from localhost ([::1]:48730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR9L0-00047h-LY for patchwork@mira.cbaines.net; Thu, 25 Aug 2022 05:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR8fg-00025v-Kl for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR8fg-0003Co-Bx for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR8fg-0002cq-8p for guix-patches@gnu.org; Thu, 25 Aug 2022 04:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v3 13/14] gnu: racket-vm-bc: Add workaround for ppc64le. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 08:57: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: 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.166141780110020 (code B ref 57050); Thu, 25 Aug 2022 08:57:04 +0000 Received: (at 57050) by debbugs.gnu.org; 25 Aug 2022 08:56:41 +0000 Received: from localhost ([127.0.0.1]:48905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8fI-0002bT-Ke for submit@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:40 -0400 Received: from mail-vs1-f49.google.com ([209.85.217.49]:40944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR8eq-0002a7-U8 for 57050@debbugs.gnu.org; Thu, 25 Aug 2022 04:56:13 -0400 Received: by mail-vs1-f49.google.com with SMTP id 190so11954507vsz.7 for <57050@debbugs.gnu.org>; Thu, 25 Aug 2022 01:56:12 -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=G3Udd8q2pPdVXnUiG2PI9Ez693+l9WyOcyiY89bDjNM=; b=IeHFyeEDXqrKZm6PF1NdoXbPXD0TTxBY13dlBqVLM3LnUDKdftsMIRV/Lua67e1t4k WQ/Nk1KYEVIlMnSiW1V/m85U6uHzPTtUEjan8VTUzDESOg65b3D4qyAw0faRJx5s4VWQ RcIwAv1kC6SEyXAUfeLxLtq2nYKoH5kzniE3OQcEiSlz/4ui6REEo0MSVOH6iI09sK4L kM9oT3yaWmexK4Z/Hc6EZZatgiH6KRWKziC2U7aeI/rhMpk0zb+yw3mo2UfjYO+NGvFP Xk15NWNhSKrpl1c5Vz7fZ/9D2DuPtMSh1VrFEQdGpNCjVBOyvHJUlWP+6wM/ORUBlvuW xrww== 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=G3Udd8q2pPdVXnUiG2PI9Ez693+l9WyOcyiY89bDjNM=; b=5SdaSG2IkUKT1iU6duBFVSQf36TwM9cqUKbia8xakK5LCmS5M+zOSOhIOK/IL5qhIp t3bL/cPfj5KmjPuT/YIKAaKgeAPWRccXgNNEZvawx7rJNcUJoUA7/fYdzDrRD1KzFwk6 hCIBQ6D0c2zvsvKPr9z2rNAfQG61XbSkPUrhjazzHafmjzf6v2tjPUzUfcDybEcCK5nV GkAXjZJBC7fOdbAwfOySYlOOBRLqkVscYk05v3SwvAcVZa6VWEqV+TU4WAzH+ukq4Y6k ouUxkKOCxnx0hBpXKBMGVzS/tWkZnsJGtGgX5U22GadKlHWMfx9aWt1471zaU4HTxQXO ChUw== X-Gm-Message-State: ACgBeo18k1HDdWb6uxnVZvYTnda8FLAvNAiKJ0kcsuJu1qI+MUhgTR+/ ZZs7m7VaGhCnr5/MuslOPNRIb5qOkyAqxE+K X-Google-Smtp-Source: AA6agR5PI/Z2ElJiEZxhnTD3jLiXmHVgrD4ERNXkmCpW0AnWV+uthihRMxF0PV70OgBHPeOfMq30mQ== X-Received: by 2002:a67:d611:0:b0:390:1d18:284 with SMTP id n17-20020a67d611000000b003901d180284mr1178692vsj.6.1661417767408; Thu, 25 Aug 2022 01:56:07 -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 h25-20020a05612200d900b0037cf5f15a71sm15446503vkc.1.2022.08.25.01.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 01:56:07 -0700 (PDT) From: Philip McGrath Date: Thu, 25 Aug 2022 04:54:15 -0400 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This is an attempt to avoid a problem with Racket BC on ppc64 reported in that was exposed by attempting to use Racket BC to bootstrap Chez Scheme. Thanks to Matthew Flatt for the workaround: . * gnu/packages/racket.scm (racket-vm-bc)[arguments]<#:configure-flags>: Increase the number of bytes that should be available on the stack for "safety" when checking for stack overflow. --- gnu/packages/racket.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 2fecae31f8..2d6bebf10e 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -414,7 +414,20 @@ (define-public racket-vm-bc (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$racket-vm-common-configure-flags)))) + #$(cond + ((target-ppc64le?) + ;; Attempt to avoid a problem bootstrapping Chez Scheme: + ;; see + ;; and . + #~(map + (lambda (flag) + (if (string-prefix? "CPPFLAGS=" flag) + (string-append flag + " -DSTACK_SAFETY_MARGIN=2000000") + flag)) + #$racket-vm-common-configure-flags)) + (else + racket-vm-common-configure-flags)))))) (synopsis "Racket BC [3M] implementation") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written