Solene Rapenne <solene@perso.pw> writes:
> On Wed, Jan 01, 2020 at 07:00:45PM +0200, Timo Myyrä wrote:
>
>> Hi,
>>
>> Here's an attempt to update sbcl to latest version.
>> Before adding the new patch I got consistent test failures in inpure timer test
>> "(:WITH-TIMEOUT :MANY-AT-THE-SAME-TIME".
>>
>> After adding the patch to unix.lisp the tests have passed twice on amd64.
>> Does this look OK, does the tests work on other platforms?
>>
>> Timo
>>
>
> I'm ok and will commit it if maintainer is ok too
Heres revised diff with upstream backports. I still think we're better off
waiting next release so we don't have to include these patches but it can't hurt
to test these to see they indeed fix the issue.
Tested clisp bootstrapped on amd64 and tests passed.
timo
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/sbcl/Makefile,v
retrieving revision 1.43
diff -u -p -u -p -r1.43 Makefile
--- Makefile 16 Sep 2019 06:24:18 -0000 1.43
+++ Makefile 2 Jan 2020 18:04:39 -0000
@@ -6,7 +6,7 @@ USE_WXNEEDED = Yes
COMMENT= compiler and runtime system for ANSI Common Lisp
-V = 1.5.5
+V = 2.0.0
DISTNAME= sbcl-${V}-source
PKGNAME= sbcl-${V}
WRKDIST= ${WRKDIR}/sbcl-${V}
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/sbcl/distinfo,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 distinfo
--- distinfo 16 Sep 2019 06:24:18 -0000 1.18
+++ distinfo 2 Jan 2020 18:04:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (sbcl-1.5.5-source.tar.bz2) = y0f65qhvDFxXQxYE+05fEcioI/lM4SjVaLh3D8W8quI=
-SIZE (sbcl-1.5.5-source.tar.bz2) = 6351480
+SHA256 (sbcl-2.0.0-source.tar.bz2) = kDaSVoBdQ3yCq5vauaQQB29XgQpQuysijeTmyJJpL88=
+SIZE (sbcl-2.0.0-source.tar.bz2) = 6457217
Index: patches/patch-src_code_unix_lisp
===================================================================
RCS file: patches/patch-src_code_unix_lisp
diff -N patches/patch-src_code_unix_lisp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_code_unix_lisp 2 Jan 2020 18:04:39 -0000
@@ -0,0 +1,47 @@
+$OpenBSD$
+
+backport commit 92e98d3cbfdef83ce8411b2fb43ddfe0e3272d9e
+
+Index: src/code/unix.lisp
+--- src/code/unix.lisp.orig
++++ src/code/unix.lisp
+@@ -1051,36 +1051,18 @@ avoiding atexit(3) hooks, etc. Otherwise exit(2) is ca
+ #-win32
+ (progn
+
+- #-sb-fluid (declaim (inline get-time-of-day))
++ (declaim (inline get-time-of-day))
+ (defun get-time-of-day ()
+ "Return the number of seconds and microseconds since the beginning of
+ the UNIX epoch (January 1st 1970.)"
+- #+(or darwin netbsd)
+ (with-alien ((tv (struct timeval)))
+- ;; CLH: FIXME! This seems to be a MacOS bug, but on x86-64/darwin,
+- ;; gettimeofday occasionally fails. passing in a null pointer for the
+- ;; timezone struct seems to work around the problem. NS notes: Darwin
+- ;; manpage says the timezone is not used anymore in their implementation
+- ;; at all.
+- (syscall* ("sb_gettimeofday" (* (struct timeval))
+- (* (struct timezone)))
++ (syscall* ("sb_gettimeofday" (* (struct timeval)))
+ (values (slot tv 'tv-sec)
+ (slot tv 'tv-usec))
+- (addr tv)
+- nil))
+- #-(or darwin netbsd)
+- (with-alien ((tv (struct timeval))
+- (tz (struct timezone)))
+- (syscall* ("sb_gettimeofday" (* (struct timeval))
+- (* (struct timezone)))
+- (values (slot tv 'tv-sec)
+- (slot tv 'tv-usec))
+- (addr tv)
+- (addr tz))))
++ (addr tv))))
+
+ (declaim (inline system-internal-run-time
+ system-real-time-values))
+-
+ (defun system-real-time-values ()
+ (multiple-value-bind (sec usec) (get-time-of-day)
+ (declare (type unsigned-byte sec) (type (unsigned-byte 31) usec))
Index: patches/patch-src_runtime_GNUmakefile
===================================================================
RCS file: /cvs/ports/lang/sbcl/patches/patch-src_runtime_GNUmakefile,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 patch-src_runtime_GNUmakefile
--- patches/patch-src_runtime_GNUmakefile 8 Mar 2018 15:17:39 -0000 1.8
+++ patches/patch-src_runtime_GNUmakefile 2 Jan 2020 18:04:39 -0000
@@ -2,7 +2,7 @@ $OpenBSD: patch-src_runtime_GNUmakefile,
Index: src/runtime/GNUmakefile
--- src/runtime/GNUmakefile.orig
+++ src/runtime/GNUmakefile
-@@ -30,7 +30,7 @@ __LDFLAGS__ =
+@@ -34,7 +34,7 @@ __LDFLAGS__ =
include ../../output/prefix.def
Index: patches/patch-src_runtime_gc-common_c
===================================================================
RCS file: /cvs/ports/lang/sbcl/patches/patch-src_runtime_gc-common_c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-src_runtime_gc-common_c
--- patches/patch-src_runtime_gc-common_c 8 Mar 2018 15:17:39 -0000 1.2
+++ patches/patch-src_runtime_gc-common_c 2 Jan 2020 18:04:39 -0000
@@ -5,7 +5,7 @@ clang only has it as builtin
Index: src/runtime/gc-common.c
--- src/runtime/gc-common.c.orig
+++ src/runtime/gc-common.c
-@@ -55,6 +55,8 @@
+@@ -57,6 +57,8 @@
#define LONG_FLOAT_SIZE 3
No comments:
Post a Comment