Re: [PATCH] Re: freeze for sbcl-2.6.2

Klaus Ziegler via Sbcl-devel <[email protected]> Sun, 8 Mar 2026 20:30:46 +0100
Newsgroups gmane.lisp.steel-bank.devel
Message-ID <[email protected]>
Hi,

to compile sbcl-2.6.2, on OpenIndiana on SPARC (also an illumos based 
dristribution)
I had to add the two attached ones. Unfortunately this is only a 32bit 
build using gcc-7.
Is there a way to create a 64bit port for SPARC by creating a
config target "Config.sparc64-sunos" or "Config.sparcv9-sunos" ?

I have clisp in 64bit on OI-SPARC already:
WARNING: locale: no encoding 646, using ISO-8859-1
GNU CLISP 2.50 (2026-01-09) (built 3976970330) (memory 3976970527)
Software: GNU C 13.4.0
/usr/gcc/13/bin/gcc -m64 -O3 -mptr64 -mcpu=ultrasparc -mvis -mfsmuld 
-mno-app-regs -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith 
-Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare 
-Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv 
-fno-strict-aliasing -DUNIX_BINARY_DISTRIB -DNO_ASM -DNO_ARI_ASM 
-DNO_SP_ASM -DNO_FAST_DISPATCH -DNO_FAST_FLOAT -DNO_FAST_DOUBLE 
-DNO_ALLOCA -DNO_ADDRESS_SPACE_ASSUMPTIONS -DNO_GENERATIONAL_GC 
-DNO_SYMBOLFLAGS -DENABLE_UNICODE -DDYNAMIC_MODULES -m64  libgnu.a  
/usr/lib/64/libreadline.so -lncurses  -lsocket -lnsl  
/usr/lib/64/libsigsegv.so /usr/lib/sparcv9/libunistring.so -lsocket
SAFETY=0 HEAPCODES GENERIC64_HEAPCODES WIDE_HARD SPVW_PAGES SPVW_MIXED
libsigsegv 2.15
libreadline 8.3
Features:
(REGEXP WILDCARD SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL 
COMMON-LISP LISP=CL INTERPRETER
  LOGICAL-PATHNAMES SOCKETS GENERIC-STREAMS SCREEN GETTEXT UNICODE 
BASE-CHAR=CHARACTER WORD-SIZE=64 UNIX)
C Modules: (clisp i18n syscalls regexp)
Installation directory: /usr/lib/sparcv9/clisp-2.50/
User language: ENGLISH
Machine: SUN4U (SUN4U) m3000

Can this probably be used to cross-compile SBCL on OI-SPARC into a 64bit 
port?
if so, could you give me some hints how to achive that?
Any help for a 64bit SPARC port of SBCL is very welcome.

Many Regrads
Klaus



On 3/7/26 10:50, Andreas Wacknitz via Sbcl-devel wrote:
> Hi,
>
> In order to compile sbcl-2.6.2 on OpenIndiana (an illumos based 
> distribution) I had to add two patches which have been attached.
> I expect the same patches to be needed to build on Solaris.
>
> Regards,
> Andreas
>
>
> _______________________________________________
> Sbcl-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sbcl-devel

-- 
illumos / illumos-developer / see discussions + participants + delivery 
options Permalink

_______________________________________________
Sbcl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
01-elf.patch (text/x-patch, 397 B)
--- sbcl-2.6.2/src/runtime/os-common.c.orig	2026-02-27 19:08:09.000000000 +0100
+++ sbcl-2.6.2/src/runtime/os-common.c	2026-03-08 18:11:32.089831100 +0100
@@ -499,6 +499,12 @@
 #endif
 
 #ifdef LISP_FEATURE_ELF
+#if defined(__amd64)
+#define ELF_TARGET_AMD
+#endif
+#if defined(__sparc)
+#define ELF_TARGET_SPARC
+#endif
 #include <elf.h>
 #ifndef SHF_GNU_RETAIN
 #define SHF_GNU_RETAIN (1 << 21)
05-Config-sparc-sunos.patch (text/x-patch, 986 B)
--- sbcl-2.6.2/src/runtime/Config.sparc-sunos.~1~	2026-02-27 19:08:09.000000000 +0100
+++ sbcl-2.6.2/src/runtime/Config.sparc-sunos	2026-03-08 19:43:21.637267000 +0100
@@ -8,15 +8,13 @@
 # public domain. The software is in the public domain and is
 # provided with absolutely no warranty. See the COPYING and CREDITS
 # files for more information.
+#
+# Note: this config is for gcc-7 - NOT for gcc > 7 !!!
 
 CC = gcc
-CFLAGS += -D__EXTENSIONS__ -DSVR4 -D_REENTRANT
-ASFLAGS = -g -DSVR4 -Wa,-xarch=v8plus
-#LINKFLAGS += -v
-# This next line has nothing to do with disabling PIE. It has only to
-# do with the problem that "grep" on the build machine I'm using can't
-# parse "-e '[^f]nopie" and so gets an error in GNUmakefile.
-DISABLE_PIE=no
+CFLAGS += -mcpu=ultrasparc -mvis -mfsmuld -std=gnu11 -D__EXTENSIONS__ -DSVR4 -D_REENTRANT -fno-omit-frame-pointer -D_POSIX_PTHREAD_SEMANTICS
+ASFLAGS = -Wa,-xarch=sparcvis
+GREP = ggrep
 
 ASSEM_SRC = sparc-assem.S
 ARCH_SRC = sparc-arch.c