[PATCH] use :accept-runtime-options in sbcl when possible

3 views
Skip to first unread message

Qian Yun

unread,
Oct 5, 2025, 9:40:24 PM (9 days ago) Oct 5
to fricas-devel
In sbcl-2.5.3, bug [1] was fixed. It adds a new keyword
":accept-runtime-options" for the ":save-runtime-options"
option in "save-lisp-and-die".

The document ion is also updated for it:
If :accept-runtime-options then –dynamic-space-size and
–control-stack-size are still processed by the runtime.

So without this new keyword, we can not enlarge the
dynamic-space-size (heap) for the compiled FRICASsys binary,
making certain computation unavailable.

The following patch fixes this problem.

BTW, I suggest to remove the 'find-symbol "SAVE-RUNTIME-OPTIONS"' part.
That line is added in 2009, and :SAVE-RUNTIME-OPTIONS is introduced
in sbcl in 2008. Now we can safely assume this keyword is always
present.

- Qian

[1] https://bugs.launchpad.net/sbcl/+bug/2096995

diff --git a/src/lisp/fricas-lisp.lisp b/src/lisp/fricas-lisp.lisp
index ddb7b872..b616bf8b 100644
--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -112,8 +112,12 @@ with this hack and will try to convince the GCL
crowd to fix this.
(funcall restart-fun)
(sb-impl::toplevel-repl nil)))
(save-options-keyword (find-symbol "SAVE-RUNTIME-OPTIONS"
"KEYWORD"))
+ (accept-options-keyword (find-symbol "ACCEPT-RUNTIME-OPTIONS"
"KEYWORD"))
(save-options-arg
- (if save-options-keyword (list save-options-keyword t) nil))
+ (if save-options-keyword
+ (list save-options-keyword
+ (if accept-options-keyword
accept-options-keyword t))
+ nil))
)
(uninstall-gmp-multiplication)
(apply #'sb-ext::save-lisp-and-die
sbcl-ACCEPT-RUNTIME-OPTIONS.patch

Waldek Hebisch

unread,
Oct 5, 2025, 10:31:32 PM (9 days ago) Oct 5
to fricas...@googlegroups.com
On Mon, Oct 06, 2025 at 09:40:18AM +0800, Qian Yun wrote:
> In sbcl-2.5.3, bug [1] was fixed. It adds a new keyword
> ":accept-runtime-options" for the ":save-runtime-options"
> option in "save-lisp-and-die".
>
> The document ion is also updated for it:
> If :accept-runtime-options then –dynamic-space-size and
> –control-stack-size are still processed by the runtime.
>
> So without this new keyword, we can not enlarge the
> dynamic-space-size (heap) for the compiled FRICASsys binary,
> making certain computation unavailable.
>
> The following patch fixes this problem.

Thank, OK.

> BTW, I suggest to remove the 'find-symbol "SAVE-RUNTIME-OPTIONS"' part.
> That line is added in 2009, and :SAVE-RUNTIME-OPTIONS is introduced
> in sbcl in 2008. Now we can safely assume this keyword is always
> present.

When I last checked sbcl versions from before 2008 worked fine
for building FriCAS. I see no reason to break this.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages