This updates sbcl to 1.4.8 and removes patches which have been upstreamed. Tests look good on i386 and amd64, macppc is still running.
I removed the egcc dependency on i386. It was originally added to prevent a C stack alignment test failure, but this apparently hasn't worked since base switched to clang. Might as well build with base clang now since egcc no longer helps. Also belatedly update the nearby sed command to use sed -i Note that this adds and removes patch files. Index: Makefile =================================================================== RCS file: /cvs/ports/lang/sbcl/Makefile,v retrieving revision 1.37 diff -u -u -r1.37 Makefile --- Makefile 27 Apr 2018 16:25:12 -0000 1.37 +++ Makefile 28 May 2018 19:50:23 -0000 @@ -6,7 +6,7 @@ COMMENT= compiler and runtime system for ANSI Common Lisp -V = 1.4.6 +V = 1.4.8 DISTNAME= sbcl-${V}-source PKGNAME= sbcl-${V} WRKDIST= ${WRKDIR}/sbcl-${V} @@ -21,10 +21,6 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sbcl/} -MODULES= gcc4 -MODGCC4_ARCHS= i386 -MODGCC4_LANGS= c - WANTLIB= c m util PSEUDO_FLAVORS= native_bootstrap @@ -66,10 +62,7 @@ VERSION_FILE = ${WRKSRC}/version.lisp-expr pre-configure: - sed 's/^"\([0-9.]*\)"$$/"\1.${LOCAL_VERSION}"/' \ - < ${VERSION_FILE} > ${VERSION_FILE}.new - mv ${VERSION_FILE}.new ${VERSION_FILE} - sed -i 's,egcc,${CC},g' ${WRKSRC}/src/runtime/Config.*-openbsd + sed -i 's/^"\([0-9.]*\)"$$/"\1.${LOCAL_VERSION}"/' ${VERSION_FILE} do-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} /bin/sh make.sh \ Index: distinfo =================================================================== RCS file: /cvs/ports/lang/sbcl/distinfo,v retrieving revision 1.15 diff -u -u -r1.15 distinfo --- distinfo 27 Apr 2018 16:25:12 -0000 1.15 +++ distinfo 28 May 2018 19:50:23 -0000 @@ -1,2 +1,2 @@ -SHA256 (sbcl-1.4.6-source.tar.bz2) = RBGwEynU3VMcigy0A2Ri+0/V9uer4tUhxqoqOt77hng= -SIZE (sbcl-1.4.6-source.tar.bz2) = 6025790 +SHA256 (sbcl-1.4.8-source.tar.bz2) = ziS2K4hIJiHCKKT9bIAjUDMLYmPhsbmEYO60qB1/szU= +SIZE (sbcl-1.4.8-source.tar.bz2) = 6040563 Index: patches/patch-src_code_x86-64-vm_lisp =================================================================== RCS file: patches/patch-src_code_x86-64-vm_lisp diff -N patches/patch-src_code_x86-64-vm_lisp --- patches/patch-src_code_x86-64-vm_lisp 8 Mar 2018 15:17:39 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@ -$OpenBSD: patch-src_code_x86-64-vm_lisp,v 1.1 2018/03/08 15:17:39 sthen Exp $ - -Index: src/code/x86-64-vm.lisp ---- src/code/x86-64-vm.lisp.orig -+++ src/code/x86-64-vm.lisp -@@ -72,7 +72,7 @@ - (if (eq kind :relative) :relative)))) - nil) ; non-immobile-space builds never record code fixups - --#!+(or darwin linux win32) -+#!+(or darwin linux openbsd win32) - (define-alien-routine ("os_context_float_register_addr" context-float-register-addr) - (* unsigned) (context (* os-context-t)) (index int)) - -@@ -81,11 +81,11 @@ - - (defun context-float-register (context index format) - (declare (ignorable context index)) -- #!-(or darwin linux win32) -+ #!-(or darwin linux openbsd win32) - (progn - (warn "stub CONTEXT-FLOAT-REGISTER") - (coerce 0 format)) -- #!+(or darwin linux win32) -+ #!+(or darwin linux openbsd win32) - (let ((sap (alien-sap (context-float-register-addr context index)))) - (ecase format - (single-float -@@ -101,11 +101,11 @@ - - (defun %set-context-float-register (context index format value) - (declare (ignorable context index format)) -- #!-(or linux win32) -+ #!-(or linux openbsd win32) - (progn - (warn "stub %SET-CONTEXT-FLOAT-REGISTER") - value) -- #!+(or linux win32) -+ #!+(or linux openbsd win32) - (let ((sap (alien-sap (context-float-register-addr context index)))) - (ecase format - (single-float 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_runtime_Config_x86-openbsd 28 May 2018 19:50:23 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Index: src/runtime/Config.x86-openbsd +--- src/runtime/Config.x86-openbsd.orig ++++ src/runtime/Config.x86-openbsd +@@ -14,10 +14,9 @@ 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_ppc-arch_c =================================================================== RCS file: patches/patch-src_runtime_ppc-arch_c diff -N patches/patch-src_runtime_ppc-arch_c --- patches/patch-src_runtime_ppc-arch_c 27 Apr 2018 16:25:12 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_runtime_ppc-arch_c,v 1.1 2018/04/27 16:25:12 solene Exp $ - -Index: src/runtime/ppc-arch.c ---- src/runtime/ppc-arch.c.orig -+++ src/runtime/ppc-arch.c -@@ -10,6 +10,7 @@ - */ - - #include <stdio.h> -+#include <pthread.h> - - #include "sbcl.h" - #include "arch.h" Index: patches/patch-src_runtime_thread_c =================================================================== RCS file: patches/patch-src_runtime_thread_c diff -N patches/patch-src_runtime_thread_c --- patches/patch-src_runtime_thread_c 8 Mar 2018 15:17:39 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ -$OpenBSD: patch-src_runtime_thread_c,v 1.1 2018/03/08 15:17:39 sthen Exp $ - -Index: src/runtime/thread.c ---- src/runtime/thread.c.orig -+++ src/runtime/thread.c -@@ -653,9 +653,16 @@ create_thread_struct(lispobj initial_function) { - * on the alignment passed from os_validate, since that might - * assume the current (e.g. 4k) pagesize, while we calculate with - * the biggest (e.g. 64k) pagesize allowed by the ABI. */ -+#if defined(LISP_FEATURE_OPENBSD) && defined(MAP_STACK) -+ spaces = mmap(0, THREAD_STRUCT_SIZE, PROT_READ|PROT_WRITE, -+ MAP_PRIVATE|MAP_ANON|MAP_STACK, -1, 0); -+ if(spaces == MAP_FAILED) -+ return NULL; -+#else - spaces = os_allocate(THREAD_STRUCT_SIZE); - if(!spaces) - return NULL; -+#endif - /* Aligning up is safe as THREAD_STRUCT_SIZE has - * THREAD_ALIGNMENT_BYTES padding. */ - aligned_spaces = PTR_ALIGN_UP(spaces, THREAD_ALIGNMENT_BYTES); Index: patches/patch-src_runtime_x86-64-arch_c =================================================================== RCS file: patches/patch-src_runtime_x86-64-arch_c diff -N patches/patch-src_runtime_x86-64-arch_c --- patches/patch-src_runtime_x86-64-arch_c 27 Apr 2018 16:25:12 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_runtime_x86-64-arch_c,v 1.1 2018/04/27 16:25:12 solene Exp $ - -Index: src/runtime/x86-64-arch.c ---- src/runtime/x86-64-arch.c.orig -+++ src/runtime/x86-64-arch.c -@@ -10,6 +10,7 @@ - */ - - #include <stdio.h> -+#include <pthread.h> - - #include "sbcl.h" - #include "runtime.h" Index: patches/patch-src_runtime_x86-64-bsd-os_c =================================================================== RCS file: patches/patch-src_runtime_x86-64-bsd-os_c diff -N patches/patch-src_runtime_x86-64-bsd-os_c --- patches/patch-src_runtime_x86-64-bsd-os_c 8 Mar 2018 15:17:39 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-src_runtime_x86-64-bsd-os_c,v 1.3 2018/03/08 15:17:39 sthen Exp $ - -Index: src/runtime/x86-64-bsd-os.c ---- src/runtime/x86-64-bsd-os.c.orig -+++ src/runtime/x86-64-bsd-os.c -@@ -209,4 +209,10 @@ os_restore_fp_control(os_context_t *context) - asm ("fldcw %0" : : "m" (cw)); - } - } -+ -+os_context_register_t * -+os_context_float_register_addr(os_context_t *context, int offset) -+{ -+ return (os_context_register_t *)&context->sc_fpstate->fx_xmm[offset]; -+} - #endif Index: patches/patch-src_runtime_x86-arch_c =================================================================== RCS file: patches/patch-src_runtime_x86-arch_c diff -N patches/patch-src_runtime_x86-arch_c --- patches/patch-src_runtime_x86-arch_c 27 Apr 2018 16:25:12 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ -$OpenBSD: patch-src_runtime_x86-arch_c,v 1.1 2018/04/27 16:25:12 solene Exp $ - -Index: src/runtime/x86-arch.c ---- src/runtime/x86-arch.c.orig -+++ src/runtime/x86-arch.c -@@ -10,6 +10,7 @@ - */ - - #include <stdio.h> -+#include <pthread.h> - - #include "sbcl.h" - #include "runtime.h"