From patchwork Thu Aug 11 11:08:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 41558 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 E113C27BBEA; Thu, 11 Aug 2022 12:11:00 +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 D090727BBEC for ; Thu, 11 Aug 2022 12:10:58 +0100 (BST) Received: from localhost ([::1]:57724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM65Z-0001UB-W9 for patchwork@mira.cbaines.net; Thu, 11 Aug 2022 07:10:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM64k-0000j8-IH for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33881) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oM64k-0005Zf-64 for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oM64k-0006ZO-1q for guix-patches@gnu.org; Thu, 11 Aug 2022 07:10:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v2 10/13] 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, 11 Aug 2022 11:10:06 +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.166021617125123 (code B ref 57050); Thu, 11 Aug 2022 11:10:06 +0000 Received: (at 57050) by debbugs.gnu.org; 11 Aug 2022 11:09:31 +0000 Received: from localhost ([127.0.0.1]:51849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM64A-0006X4-Pm for submit@debbugs.gnu.org; Thu, 11 Aug 2022 07:09:31 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:33598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM647-0006WI-TJ for 57050@debbugs.gnu.org; Thu, 11 Aug 2022 07:09:28 -0400 Received: by mail-qt1-f176.google.com with SMTP id cb8so410823qtb.0 for <57050@debbugs.gnu.org>; Thu, 11 Aug 2022 04:09:27 -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=pQTxR4LDTZDlUrUtPMMBXtDWDwJ3UyRNwmWmjO5ITMg=; b=kEKeFQHOR/kvVShrTxnHp37gL+c6D32BwAmh/jrDQApjTlUtlduBhWLvGRK9u34fiu e/Z9epw4dDWFZl3yeWMUq0s3iUvXk9Gwjy5gkFL4JEOfbh8cGOpSmYpL/T+w2KzwNyac A1VZucNeiVGe4hmgKph+Deltj+4qAMRQA1Gx5T06EomHZpXpl/h3CedXL7mTxeJ/u0mZ uWA4T+C52UdQhuZ9qSC72F+VGyQ91EC3Wv8AF9FkXDxt9ks/4iOmkxoJVIYvXD5Gfzti w4wC1rZCuxSYEl6NDvYAUOFJzzp/69Zsm0QtmqbRyGSBa+Y6C/XeedtGYk2bPYnbH844 5y9g== 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=pQTxR4LDTZDlUrUtPMMBXtDWDwJ3UyRNwmWmjO5ITMg=; b=vrIUKTXHDoaWCJUu640P0gtxtOj6dBzxim3gLRfYw2/4iTIOmM31WQzJQyb07DPNdF bkFP2TcaK/CZ/a+bnmfo1FESP9EgW6Gb6gME3/yI1PHY4ad9cjRDyvzGxFeENh6Bza9d ZTvNJ7LIvmp2A0iSE8+ws3KE0UgVul/dNCb2ybpA+SXRguBc4d7UbCgH2rDiYclvOaEV SIvzO4IOm1l6opLdSJkiPxH7b0wHErqr06aNPH8ECkwv6s+s0Gh3C83CKPDP1vx8bOeO EmdPe3D2ua9L4Sxsa82B91DfYYJInI26h9mi5k6OFhC93R9UR+eUlTun65zSQ4ZFXfeF 3Htg== X-Gm-Message-State: ACgBeo2OYsVCAKn0bugY4BDKimg/cpdf2cqOdPa3HAjYATpPm5yeTNbH Fll44zgLAxodSc1mU7cXMsuAhi0vXzMzhdWF X-Google-Smtp-Source: AA6agR70FXyIEqHUxAi8KLmqS9ctKwc1LshvMtNJ1w8hgAeRJgDAN4QUDqiE4U3Jz/4DHPQKJXN2Dg== X-Received: by 2002:a05:622a:44:b0:31e:d448:8746 with SMTP id y4-20020a05622a004400b0031ed4488746mr27925409qtw.664.1660216162430; Thu, 11 Aug 2022 04:09:22 -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 v6-20020a05620a0f0600b006af10bd3635sm1913526qkl.57.2022.08.11.04.09.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Aug 2022 04:09:22 -0700 (PDT) From: Philip McGrath Date: Thu, 11 Aug 2022 07:08:20 -0400 Message-Id: <7421f7c6769f500334adeffae9a61d7b5d2e7cf0.1660215295.git.philip@philipmcgrath.com> 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 3b96cf46ef..008adcc072 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -432,7 +432,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=200000") + 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