Josh Elsasser <[email protected]> writes: > On Sun, Apr 28, 2019 at 07:22:18AM -0700, Josh Elsasser wrote: > >> I'm preparing an update of lang/sbcl to 1.5.2, which should be >> released in a day or two. Here is an update to a current git snapshot >> if anyone wants to give it a try. I've already built and run the test >> suite on all three arches but more testing never hurts. >> >> The port itself is once again patches sbcl to run the contrib module >> tests during 'regress' and not 'build'. This in combination with >> upstream improvements should allow the threads flavor to be built by >> default again, and now on macppc too. >> >> Additionally, the non-threading options enabled by "./make.sh --fancy" >> are now always enabled, namely core compression. >> >> The only downside is that the base makeinfo will no longer build the >> texinfo docs, so pull in print/texinfo instead. > > Here is the actual update to 1.5.2, note that this adds and removes > files. The threads flavor can be re-enabled in lang/Makefile as well. > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/lang/sbcl/Makefile,v > retrieving revision 1.40 > diff -u -u -r1.40 Makefile > --- Makefile 21 Mar 2019 22:06:53 -0000 1.40 > +++ Makefile 30 Apr 2019 04:18:48 -0000 > @@ -1,13 +1,12 @@ > -# $OpenBSD: Makefile,v 1.40 2019/03/21 22:06:53 sthen Exp $ > +# $OpenBSD: Makefile,v 1.37 2018/04/27 16:25:12 solene Exp $ > > # not yet ported to other arches > ONLY_FOR_ARCHS = amd64 i386 powerpc > USE_WXNEEDED = Yes > -REVISION = 0 > > COMMENT= compiler and runtime system for ANSI Common Lisp > > -V = 1.4.8 > +V = 1.5.2 > DISTNAME= sbcl-${V}-source > PKGNAME= sbcl-${V} > WRKDIST= ${WRKDIR}/sbcl-${V} > @@ -15,28 +14,30 @@ > > CATEGORIES= lang > HOMEPAGE= http://www.sbcl.org/ > -MAINTAINER = Joshua Elsasser <[email protected]> > +MAINTAINER = Joshua Elsasser <[email protected]> > > # Public domain and BSD > PERMIT_PACKAGE_CDROM= Yes > > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sbcl/} > > -WANTLIB= c m util > +WANTLIB= c m util z > > PSEUDO_FLAVORS= native_bootstrap > > -# XXX threads flavor does not work reliably it won't even pass its self-test > -# on amd64 all the time > FLAVORS= threads > FLAVOR?= > > -EXTRA_PARAMS= > +MAKE_PARAMS = --prefix=${PREFIX} > + > .if ${FLAVOR:Mthreads} > -ONLY_FOR_ARCHS = amd64 > -EXTRA_PARAMS+= --with-sb-thread > +ONLY_FOR_ARCHS = amd64 powerpc > +MAKE_PARAMS += --with-sb-thread > WANTLIB+= pthread > .endif > +# enable features from --fancy other than :sb-thread > +MAKE_PARAMS += --with-sb-core-compression \ > + --with-sb-xref-for-internals > > .if ${FLAVOR:Mnative_bootstrap} > BUILD_DEPENDS+= lang/sbcl > @@ -46,12 +47,17 @@ > BUILD_DEPENDS += lang/clisp > BOOTSTRAP_CMD = ${LOCALBASE}/bin/clisp -q -norc > .endif > +MAKE_PARAMS += --xc-host="${BOOTSTRAP_CMD}" ${EXTRA_PARAMS} > TEST_DEPENDS = devel/gmp > > +# base makeinfo chokes on sbcl texinfo files > +BUILD_DEPENDS += print/texinfo > + > USE_GMAKE= Yes > PORTHOME= ${TMPDIR} > MAKE_ENV= GNUMAKE=${GMAKE} INSTALL_ROOT=${PREFIX} \ > - MAN_DIR=${PREFIX}/man INFO_DIR=${PREFIX}/info > + MAN_DIR=${PREFIX}/man INFO_DIR=${PREFIX}/info \ > + MAKEINFO=${PREFIX}/bin/gmakeinfo > > # Upstream asks that packagers append something like this to the > # version to distinguish official tarballs from third-party packages. > @@ -66,8 +72,8 @@ > sed -i 's/^"\([0-9.]*\)"$$/"\1.${LOCAL_VERSION}"/' ${VERSION_FILE} > > do-build: > - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} /bin/sh make.sh \ > - --prefix=${PREFIX} --xc-host="${BOOTSTRAP_CMD}" ${EXTRA_PARAMS} > + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} SBCL_CONTRIB_TARGET=all \ > + /bin/sh make.sh ${MAKE_PARAMS} > cd ${WRKSRC}/doc/manual && touch sbcl.texinfo && \ > ${SETENV} ${MAKE_ENV} ${GMAKE} asdf.info sbcl.info > > @@ -78,6 +84,8 @@ > chown -R 0:0 ${PREFIX}/lib/sbcl > > do-test: > + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} DONT_CLEAN_SBCL_CONTRIB=1 \ > + /bin/sh make-target-contrib.sh > cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} /bin/sh run-tests.sh > > .include <bsd.port.mk> > Index: distinfo > =================================================================== > RCS file: /cvs/ports/lang/sbcl/distinfo,v > retrieving revision 1.16 > diff -u -u -r1.16 distinfo > --- distinfo 24 Jun 2018 18:33:36 -0000 1.16 > +++ distinfo 30 Apr 2019 04:18:48 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (sbcl-1.4.8-source.tar.bz2) = > ziS2K4hIJiHCKKT9bIAjUDMLYmPhsbmEYO60qB1/szU= > -SIZE (sbcl-1.4.8-source.tar.bz2) = 6040563 > +SHA256 (sbcl-1.5.2-source.tar.bz2) = > 2sau8+x2KMKEox8iIu3l1H2dlPnP3/4PAO9A+VMePD8= > +SIZE (sbcl-1.5.2-source.tar.bz2) = 6343957 > Index: patches/patch-contrib_asdf_Makefile > =================================================================== > RCS file: patches/patch-contrib_asdf_Makefile > diff -N patches/patch-contrib_asdf_Makefile > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-contrib_asdf_Makefile 30 Apr 2019 04:18:48 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Add an 'all' target to match other contrib modules. > + > +Index: contrib/asdf/Makefile > +--- contrib/asdf/Makefile.orig > ++++ contrib/asdf/Makefile > +@@ -4,7 +4,7 @@ UIOP_FASL=$(DEST)/uiop.fasl > + FASL=$(UIOP_FASL) $(ASDF_FASL) > + FROB_READTABLE='(setf (sb-ext:readtable-base-char-preference *readtable*) > :both)' > + > +-fasl:: $(UIOP_FASL) $(ASDF_FASL) > ++fasl all:: $(UIOP_FASL) $(ASDF_FASL) > + $(UIOP_FASL):: uiop.lisp ../../output/sbcl.core > + mkdir -p $(DEST) > + $(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file > #p"SYS:CONTRIB;ASDF;UIOP.LISP" :print nil :output-file > (parse-native-namestring "$@"))' </dev/null > Index: patches/patch-make-target-contrib_sh > =================================================================== > RCS file: patches/patch-make-target-contrib_sh > diff -N patches/patch-make-target-contrib_sh > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-make-target-contrib_sh 30 Apr 2019 04:18:48 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Allow contribs to be build without running tests. > + > +Index: make-target-contrib.sh > +--- make-target-contrib.sh.orig > ++++ make-target-contrib.sh > +@@ -84,7 +84,7 @@ for i in $contribs_to_build; do > + test -f obj/asdf-cache/$i/test-passed.test-report && rm > obj/asdf-cache/$i/test-passed.test-report > + mkdir -p obj/asdf-cache/$i/ > + # hack to get exit codes right. > +- if $GNUMAKE -C contrib/$i test < /dev/null 2>&1 && touch > obj/asdf-cache/$i/test-passed.test-report ; then > ++ if $GNUMAKE -C contrib/$i ${SBCL_CONTRIB_TARGET:-test} < /dev/null 2>&1 > && touch obj/asdf-cache/$i/test-passed.test-report ; then > + : > + else > + exit $? > Index: patches/patch-src_compiler_generic_genesis_lisp > =================================================================== > RCS file: patches/patch-src_compiler_generic_genesis_lisp > diff -N patches/patch-src_compiler_generic_genesis_lisp > --- patches/patch-src_compiler_generic_genesis_lisp 21 Mar 2019 22:06:54 > -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,24 +0,0 @@ > -$OpenBSD: patch-src_compiler_generic_genesis_lisp,v 1.1 2019/03/21 22:06:54 > sthen Exp $ > - > -Fix build on i386 when the text segment is more than 2GB from the dynamic > space, > -such as when linked with lld. > - > -Index: src/compiler/generic/genesis.lisp > ---- src/compiler/generic/genesis.lisp.orig > -+++ src/compiler/generic/genesis.lisp > -@@ -2118,9 +2118,12 @@ core and return a descriptor to it." > - ;; Never record it. (FIXME: this is a problem for relocatable > heap) > - nil) > - (:relative ; (used for arguments to X86 relative CALL > instruction) > -- (setf (bvref-32 gspace-data gspace-byte-offset) > -- (the (signed-byte 32) > -- (- addr (+ gspace-base gspace-byte-offset 4)))) ; 4 = > size of rel32off > -+ (let ((difference (- addr (+ gspace-base gspace-byte-offset > 4)))) ; 4 = size of rel32off > -+ (setf (bvref-32 gspace-data gspace-byte-offset) > -+ (the (signed-byte 32) > -+ (if (< difference #x-80000000) > -+ (ldb (byte 32 0) difference) > -+ difference)))) > - ;; Relative fixups are recorded if without the object. > - ;; Except that read-only space contains calls to asm routines, > - ;; and we don't record those fixups. > Index: patches/patch-src_compiler_x86_parms_lisp > =================================================================== > RCS file: patches/patch-src_compiler_x86_parms_lisp > diff -N patches/patch-src_compiler_x86_parms_lisp > --- patches/patch-src_compiler_x86_parms_lisp 21 Mar 2019 22:06:54 -0000 > 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,17 +0,0 @@ > -$OpenBSD: patch-src_compiler_x86_parms_lisp,v 1.1 2019/03/21 22:06:54 sthen > Exp $ > - > -Move the static spaces to an address which should be available under > -both ld.bfd and ld.lld > - > -Index: src/compiler/x86/parms.lisp > ---- src/compiler/x86/parms.lisp.orig > -+++ src/compiler/x86/parms.lisp > -@@ -204,7 +204,7 @@ > - #!+sunos (!gencgc-space-setup #x20000000 :dynamic-space-start > #x48000000) > - #!+freebsd (!gencgc-space-setup #x01000000 :dynamic-space-start > #x58000000) > - #!+dragonfly (!gencgc-space-setup #x01000000 :dynamic-space-start > #x58000000) > --#!+openbsd (!gencgc-space-setup #x3d000000 :dynamic-space-start > #x8d000000) > -+#!+openbsd (!gencgc-space-setup #x11000000 :dynamic-space-start > #x8d000000) > - #!+netbsd (!gencgc-space-setup #x20000000 :dynamic-space-start > #x60000000) > - #!+darwin (!gencgc-space-setup #x04000000 :dynamic-space-start > #x10000000) > - > Index: patches/patch-src_runtime_Config_generic-openbsd > =================================================================== > RCS file: > /cvs/ports/lang/sbcl/patches/patch-src_runtime_Config_generic-openbsd,v > retrieving revision 1.3 > diff -u -u -r1.3 patch-src_runtime_Config_generic-openbsd > --- patches/patch-src_runtime_Config_generic-openbsd 8 Mar 2018 15:17:39 > -0000 1.3 > +++ patches/patch-src_runtime_Config_generic-openbsd 30 Apr 2019 04:18:48 > -0000 > @@ -1,23 +1,11 @@ > $OpenBSD: patch-src_runtime_Config_generic-openbsd,v 1.3 2018/03/08 15:17:39 > sthen Exp $ > > -clang-5.0.0 doesn't pass -export-dynamic to the linker, instead it > -passes a bogus -e export-dynamic to ld(1). Just use -Wl,--export-dynamic. > - > Don't try to guess (wrong) with clang. Just assume we have pie > > Index: src/runtime/Config.generic-openbsd > --- src/runtime/Config.generic-openbsd.orig > +++ src/runtime/Config.generic-openbsd > -@@ -9,7 +9,7 @@ > - # provided with absolutely no warranty. See the COPYING and CREDITS > - # files for more information. > - > --LINKFLAGS += -export-dynamic -Wl,-z,wxneeded > -+LINKFLAGS += -Wl,--export-dynamic -Wl,-z,wxneeded > - OS_LIBS += -lutil > - > - ifdef LISP_FEATURE_SB_THREAD > -@@ -17,9 +17,7 @@ CFLAGS += -pthread > +@@ -17,9 +17,7 @@ CFLAGS += -pthread -DOS_THREAD_STACK > OS_LIBS += -pthread > endif > > Index: patches/patch-src_runtime_Config_x86-openbsd > =================================================================== > RCS file: patches/patch-src_runtime_Config_x86-openbsd > diff -N patches/patch-src_runtime_Config_x86-openbsd > --- patches/patch-src_runtime_Config_x86-openbsd 29 Jun 2018 22:39:59 > -0000 1.5 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,17 +0,0 @@ > -$OpenBSD: patch-src_runtime_Config_x86-openbsd,v 1.5 2018/06/29 22:39:59 > sthen Exp $ > - > -Index: src/runtime/Config.x86-openbsd > ---- src/runtime/Config.x86-openbsd.orig > -+++ src/runtime/Config.x86-openbsd > -@@ -14,10 +14,8 @@ include Config.generic-openbsd > - > - ASSEM_SRC += ldso-stubs.S > - > --CC = egcc > -- > - # The -Z linker flag conflicts with the default address space > - # locations used. If you wish to link the runtime using -Z option then > - # please see the comments in src/compiler/x86/parms.lisp > - > --CFLAGS += -fno-omit-frame-pointer -mpreferred-stack-boundary=2 > -+CFLAGS += -fno-omit-frame-pointer > Index: patches/patch-src_runtime_run-program_c > =================================================================== > RCS file: patches/patch-src_runtime_run-program_c > diff -N patches/patch-src_runtime_run-program_c > --- patches/patch-src_runtime_run-program_c 8 Mar 2018 15:17:39 -0000 > 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,33 +0,0 @@ > -$OpenBSD: patch-src_runtime_run-program_c,v 1.1 2018/03/08 15:17:39 sthen > Exp $ > - > -Work around a problem where non-PIC code ends up using a different > -copy of environ than libc. > - > -Index: src/runtime/run-program.c > ---- src/runtime/run-program.c.orig > -+++ src/runtime/run-program.c > -@@ -200,14 +200,18 @@ int spawn(char *program, char *argv[], int sin, int so > - if (pwd && chdir(pwd) < 0) { > - failure_code = 3; > - } else { > -+ /* Exec the program. */ > - if (envp) { > -- environ = envp; > -+ if (search) > -+ execvpe(program, argv, envp); > -+ else > -+ execve(program, argv, envp); > -+ } else { > -+ if (search) > -+ execvp(program, argv); > -+ else > -+ execv(program, argv); > - } > -- /* Exec the program. */ > -- if (search) > -- execvp(program, argv); > -- else > -- execv(program, argv); > - } > - > - /* When exec or chdir fails and channel is available, send the errno > value. */ > Index: patches/patch-tests_run-compiler_sh > =================================================================== > RCS file: patches/patch-tests_run-compiler_sh > diff -N patches/patch-tests_run-compiler_sh > --- patches/patch-tests_run-compiler_sh 21 Mar 2019 22:06:54 -0000 > 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,15 +0,0 @@ > -$OpenBSD: patch-tests_run-compiler_sh,v 1.1 2019/03/21 22:06:54 sthen Exp $ > - > -Tests must be built with -fPIC to pass on i386 > - > -Index: tests/run-compiler.sh > ---- tests/run-compiler.sh.orig > -+++ tests/run-compiler.sh > -@@ -35,6 +35,7 @@ while [ $# -gt 0 ]; do > - Linux-PowerPC) new=-fPIC ;; > - NetBSD-PowerPC) new=-fPIC ;; > - NetBSD-X86-64) new=-fPIC ;; > -+ OpenBSD-X86) new=-fPIC ;; > - OpenBSD-PowerPC) new=-fPIC ;; > - OpenBSD-X86-64) new=-fPIC ;; > - SunOS-SPARC) new=-fPIC ;; > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/lang/sbcl/pkg/PLIST,v > retrieving revision 1.11 > diff -u -u -r1.11 PLIST > --- pkg/PLIST 8 Mar 2018 15:17:39 -0000 1.11 > +++ pkg/PLIST 30 Apr 2019 04:18:48 -0000 > @@ -9,6 +9,8 @@ > lib/sbcl/contrib/sb-aclrepl.fasl > lib/sbcl/contrib/sb-bsd-sockets.asd > lib/sbcl/contrib/sb-bsd-sockets.fasl > +lib/sbcl/contrib/sb-capstone.asd > +lib/sbcl/contrib/sb-capstone.fasl > lib/sbcl/contrib/sb-cltl2.asd > lib/sbcl/contrib/sb-cltl2.fasl > lib/sbcl/contrib/sb-concurrency.asd > @@ -48,4 +50,3 @@ > share/doc/sbcl/COPYING > share/doc/sbcl/CREDITS > share/doc/sbcl/NEWS > -share/doc/sbcl/html/
'native_bootstrap threads' FLAVOR works and tests pass on amd64. timo
