Hi,
The following patch updates lang/sbcl to 2.4.3
I am interested to have it tested on:
- arm
- powerpc
- powerpc64
(for others archs, I have already tested it).
A build test is enough (running 'make' and see if it build successfully
or error-out).
The reason is 2.4.2 introduced some changes in the way some hashes are
generated (by using perfecthash). If it works well when using sbcl for
building itself (using FLAVOR=native_bootstrap), but it uses
pre-computed values for clisp or ecl, and fail to build if some values
are missing.
So before commiting the update, I would like to be sure to not break
arm, powerpc or powerpc64... I already added bits for i386. amd64 and
aarch64 was fine.
The Makefile also includes few changes to error-out early (and have the
error message at the end of the build, instead of several lines before).
The post-extract changes will help to get the missing bits for
perfecthash:
- if usual build failed
- install sbcl from package (pkg_add -a sbcl)
- build sbcl using sbcl (env FLAVOR=native_bootstrap make) - it is a quick
build (usually 5~10min)
- update the patches to get the new bits (env FLAVOR=native_bootstrap make
update-patches)
- build 'normally' using the changed patches (make)
Thanks.
--
Sebastien Marie
Index: Makefile
===
RCS file: /cvs/ports/lang/sbcl/Makefile,v
diff -u -p -r1.66 Makefile
--- Makefile3 Feb 2024 07:21:34 - 1.66
+++ Makefile30 Mar 2024 10:36:06 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS += aarch64 amd64 arm i386
COMMENT = high performance Common Lisp compiler
-V =2.4.1
+V =2.4.3
DISTNAME = sbcl-${V}-source
PKGNAME = sbcl-${V}
@@ -55,11 +55,13 @@ XCHOST_CMD =${LOCALBASE}/bin/sbcl \
.elif ${BOOTSTRAP_METHOD:Mclisp}
BUILD_DEPENDS += lang/clisp
-XCHOST_CMD = ${LOCALBASE}/bin/clisp -q -norc
+XCHOST_CMD = ${LOCALBASE}/bin/clisp \
+ -q -norc -on-error exit
.elif ${BOOTSTRAP_METHOD:Mecl}
BUILD_DEPENDS += lang/ecl
-XCHOST_CMD = ${LOCALBASE}/bin/ecl -q --norc
+XCHOST_CMD = ${LOCALBASE}/bin/ecl \
+ -q --norc --load
${.CURDIR}/files/ecl-nodebugger.lisp
.else
ERRORS += "Fatal: unknown BOOTSTRAP_METHOD"
@@ -87,11 +89,20 @@ MAKE_ENV += CFLAGS="${CFLAGS} -I${LOCAL
LINKFLAGS="-L${LOCALBASE}/lib" \
MAKEINFO=${PREFIX}/bin/gmakeinfo \
MAN_DIR="${PREFIX}/man/" \
- INFO_DIR="${PREFIX}/info/"
+ INFO_DIR="${PREFIX}/info/" \
+ SBCL_MAKE_JOBS="-j${MAKE_JOBS}"
USE_GMAKE =Yes
DEBUG_PACKAGES = ${BUILD_PACKAGES}
+
+post-extract:
+# the build might modify some files. keep original files to help creating
patches.
+.if ${FLAVOR:Mnative_bootstrap}
+. for nn in 30 61 63
+ cp ${WRKSRC}/xperfecthash${nn}.lisp-expr{,${PATCHORIG}}
+. endfor
+.endif
do-configure:
printf '"%s.%s.%s"\n' "${V}" "openbsd" "${FULLPKGNAME}" \
Index: distinfo
===
RCS file: /cvs/ports/lang/sbcl/distinfo,v
diff -u -p -r1.31 distinfo
--- distinfo3 Feb 2024 07:21:34 - 1.31
+++ distinfo30 Mar 2024 10:36:06 -
@@ -1,2 +1,2 @@
-SHA256 (sbcl-2.4.1-source.tar.bz2) =
2k+UhvrUE9OversbCSaTJf20v/fnuI8hld3udDJjz34=
-SIZE (sbcl-2.4.1-source.tar.bz2) = 7800453
+SHA256 (sbcl-2.4.3-source.tar.bz2) =
icmq35K4KtPHSj1PFYoDiJPeoOTzlNyvyWNYPDC3w/I=
+SIZE (sbcl-2.4.3-source.tar.bz2) = 8126417
Index: files/ecl-nodebugger.lisp
===
RCS file: files/ecl-nodebugger.lisp
diff -N files/ecl-nodebugger.lisp
--- /dev/null 1 Jan 1970 00:00:00 -
+++ files/ecl-nodebugger.lisp 30 Mar 2024 10:36:06 -
@@ -0,0 +1,6 @@
+;; define a debugger hook which exit early
+(setf *debugger-hook*
+ (lambda (c fun)
+(princ c)
+(si::tpl-backtrace)
+(quit 1)))
Index: patches/patch-xperfecthash30_lisp-expr
===
RCS file: patches/patch-xperfecthash30_lisp-expr
diff -N patches/patch-xperfecthash30_lisp-expr
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-xperfecthash30_lisp-expr 30 Mar 2024 10:36:06 -
@@ -0,0 +1,28 @@
+Add some missing entries for bootstrapping from no-sbcl on i386
+
+Index: xperfecthash30.lisp-expr
+--- xperfecthash30.lisp-expr.orig
xperfecthash30.lisp-expr
+@@ -2322,5 +2322,22 @@
+ (#(73FB831 85FCC7A 1025CF34 1A13A884 1CA0C5B8)
+ "(REAL FLOAT DOUBLE-FLOAT SINGLE-FLOAT RATIONAL)"
+ "( (& (+ (>> val 18) (>> val 22)) 7))")
++(#(B1B342 207D684 20BE5F4 27E4E79 34001B1 34EBEE5 35C8E17 3CC42AC 4BB7808
4C4FB75 5502DD7 70F5EF0 8E1655F 8FFB29F 9D14A2B
++ A8542A3 AD2E8E6 B0580F9 BE9B4CB C042E4D E824A51 EF70D00 FB43