Subject: [PATCH] gnu: mit-scheme: Fix building

From: Zac Berkowitz <[email-masked]>
Date: Sun, 25 Jun 2023 10:48:52 -0400

mit-scheme 11.2 is failing to compile with -Warray-parameter turned
errors.  This patch disables these warnings.  Package builds and passes all
tests, but haven't investigated further.

Apparent first failed build of this nature:
https://ci.guix.gnu.org/build/822542/details

Zac
From 5f84f9ffc531d8435fb11009f095a7ed5a6b6c3e Mon Sep 17 00:00:00 2001
Message-Id: <5f84f[email-masked]>
From: Zac Berkowitz <[email-masked]>
Date: Sun, 25 Jun 2023 10:27:08 -0400
Subject: [PATCH] gnu: mit-scheme: Fix building

* gnu/packages/scheme.scm (mit-scheme)[arguments] Add 'set-env
  before 'configure, setting -Wno-array-parameter in CFLAGS and
  CPPFLAGS to ignore warning causing build break.
---
 gnu/packages/scheme.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 2337b60ee9..215ea741f8 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -138,6 +138,12 @@ (define-public mit-scheme
                (("\\./configure")
                 (string-append (which "sh") " configure")))
              #t))
+         ;; disable array-parameter warnings that become errors while
+         ;; compiling microcode target
+         (add-before 'configure 'set-flags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CFLAGS" "-Wno-array-parameter")
+             (setenv "CPPFLAGS" "-Wno-array-parameter")))
          (replace 'build
            (lambda* (#:key system outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))

base-commit: 7400797341f2185dc77997070b0bb174347279b3
-- 
2.40.1