From patchwork Sat Aug 27 18:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 42006 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 D959F27BBEB; Sat, 27 Aug 2022 19:58:58 +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 63E2427BBE9 for ; Sat, 27 Aug 2022 19:58:58 +0100 (BST) Received: from localhost ([::1]:44854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oS11F-000521-IK for patchwork@mira.cbaines.net; Sat, 27 Aug 2022 14:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oS10P-0004MR-3Q for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oS10O-0001iK-QV for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oS10O-0008JX-MO for guix-patches@gnu.org; Sat, 27 Aug 2022 14:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57050] [PATCH v4 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: Sat, 27 Aug 2022 18:58: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.166162665531867 (code B ref 57050); Sat, 27 Aug 2022 18:58:04 +0000 Received: (at 57050) by debbugs.gnu.org; 27 Aug 2022 18:57:35 +0000 Received: from localhost ([127.0.0.1]:57081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0zu-0008Hp-HE for submit@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:34 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oS0za-0008Df-FB for 57050@debbugs.gnu.org; Sat, 27 Aug 2022 14:57:14 -0400 Received: by mail-vs1-f41.google.com with SMTP id k2so4666950vsk.8 for <57050@debbugs.gnu.org>; Sat, 27 Aug 2022 11:57:14 -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=YU4ih04xkhF5TGuDL+m5IHS3ZamHPV1zq/3MmOm+d5A=; b=PWEFotXkdrfuWG+K6BoZ13I/Z65Fz3dzeWy1iASoOYkkG2W0oK8Zw4qyflSHsvhWw2 MGQVOCHMAOtFpZj8VP1k1MWDG4+tcv/WyUZYE2IabhDzgDBDYMegn80swzQB5NpFygwn x5psf+GTyw8WlstTZgnLwhvh5Ivlv7R2lLywZOFAmfG1I8wo7qANiZsCu5cSFdRaUhEw N0VZbxDeWE6uATGXeO79FhnmLBcKlpHUPou/t21HsNglJNg5/g93sNVY3SwtqMyJNw/5 g3LCsNccP/h4/Jw3L3s9Ben+9el6AfvslhPo7GB+4q0OgKi/3MtcGnqmkQybAUR7/bSf Z2Ow== 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=YU4ih04xkhF5TGuDL+m5IHS3ZamHPV1zq/3MmOm+d5A=; b=YCbqAnrx3u6oJidwT+5d9OYFX3/629PojiX/nk8FA+Dn8+vRTJA/JO2N8TUYXuRRtz 3H9154+1vLIAhSzKllxbny0F3G22pEVwFR3UzQf9IflSNfm+rp0hcThKifHxa69PUzdW 7Ac/p1IrJHW81haUkcunJzaZDamfMxMAvC25sSk+9kSyHPULTEoCkZCuE/mwq2Yfp9j0 /SgzGAeIYZ/TRHwLlzfEJsQLHXLZgFDqKNuwe03JjSKBrJJipQ72I7rj8HTC0R+P6WxX RgAb3to9aGDY54H4au7GfIo5gekO7PAPOH3r78Z2eD8esPSMhowDkp/OeeDX9DKwFXak 4G9A== X-Gm-Message-State: ACgBeo36sr5YHbNSLlTzJFcPLR+J5HecIi5efXltVqKWWM0Qjk/E25EE xVwqca7CU+MK72PMURB1gy/Eq9jR5v9XjFiX X-Google-Smtp-Source: AA6agR5gJk1uDwYICbDwRMJYq/D1upoLUDOx8vMGyHKMBXcE7CdRC5M7De1ItUVND65CzmXFD239QA== X-Received: by 2002:a67:ef8c:0:b0:390:1f12:16c0 with SMTP id r12-20020a67ef8c000000b003901f1216c0mr1533639vsp.9.1661626634089; Sat, 27 Aug 2022 11:57: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 196-20020a1f16cd000000b0039452821f2asm164852vkw.25.2022.08.27.11.57.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Aug 2022 11:57:13 -0700 (PDT) From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:53 -0400 Message-Id: <3b4d21a89901a434b1d37f53a0ad7f51a0e4adfa.1661626113.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 264b44b7fd..74052d47eb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -412,7 +412,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