From 64a27e1678930307de49e29c4a55bd3b5de79857 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Sat, 27 Aug 2022 14:55:53 -0400 Subject: gnu: racket-vm-bc: Add workaround for ppc64le. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Ludovic Courtès --- gnu/packages/racket.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gnu/packages') 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 @@ code to use the 3M garbage collector.") (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 -- cgit 1.4.1