diff options
author | Will Sinatra <wpsinatra@gmail.com> | 2020-06-03 16:25:09 -0500 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-06-04 14:18:29 +0000 |
commit | 00f7f31509ca5ac95cba64f637a7c033b9b15be0 (patch) | |
tree | f51b12aa311504da6b04fa47d34d08deaa9b5cba | |
parent | 8e51023d033956f76867c794cf8efba723200fe0 (diff) | |
download | alpine_aports-00f7f31509ca5ac95cba64f637a7c033b9b15be0.tar.bz2 alpine_aports-00f7f31509ca5ac95cba64f637a7c033b9b15be0.tar.xz alpine_aports-00f7f31509ca5ac95cba64f637a7c033b9b15be0.zip |
testing/sbcl: upgrade to 2.0.5
-rw-r--r-- | testing/sbcl/0001-Fix-sb-bsd-sockets-on-musl-libc.patch | 47 | ||||
-rw-r--r-- | testing/sbcl/0002-Fix-threads-on-musl-libc.patch | 36 | ||||
-rw-r--r-- | testing/sbcl/0003-Fix-foreign-tests-on-musl-libc.patch | 127 | ||||
-rw-r--r-- | testing/sbcl/APKBUILD | 12 |
4 files changed, 3 insertions, 219 deletions
diff --git a/testing/sbcl/0001-Fix-sb-bsd-sockets-on-musl-libc.patch b/testing/sbcl/0001-Fix-sb-bsd-sockets-on-musl-libc.patch deleted file mode 100644 index 88497a41b3..0000000000 --- a/testing/sbcl/0001-Fix-sb-bsd-sockets-on-musl-libc.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | #2020/01/30 Patch has not yet been accepted upstream | ||
2 | From be70a77e2b06e2442b38093adbe84b15ea065c8f Mon Sep 17 00:00:00 2001 | ||
3 | From: Eric Timmons <etimmons@mit.edu> | ||
4 | Date: Sat, 1 Feb 2020 15:38:19 -0500 | ||
5 | Subject: [PATCH 1/5] Make sb-bsd-sockets robust to the absence of NETDB_* | ||
6 | |||
7 | NETDB_INTERNAL and NETDB_SUCCESS are not defined by all libc | ||
8 | implementations (see: musl libc). If groveling fails for these values, set them | ||
9 | to NIL which effectively disables the corresponding Lisp conditions from being | ||
10 | signaled. | ||
11 | --- | ||
12 | contrib/sb-bsd-sockets/name-service.lisp | 13 ++++++++++++- | ||
13 | 1 file changed, 12 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/contrib/sb-bsd-sockets/name-service.lisp b/contrib/sb-bsd-sockets/name-service.lisp | ||
16 | index 34c7262ea..97b505a5e 100644 | ||
17 | --- a/contrib/sb-bsd-sockets/name-service.lisp | ||
18 | +++ b/contrib/sb-bsd-sockets/name-service.lisp | ||
19 | @@ -1,5 +1,16 @@ | ||
20 | (in-package :sb-bsd-sockets) | ||
21 | |||
22 | +;; If we're unable to grovel for NETDB_INTERNAL and NETDB_SUCCESS (not every | ||
23 | +;; libc sets them), set their constants to NIL. This effectively makes their | ||
24 | +;; respective conditions unreachable. | ||
25 | +#-win32 | ||
26 | +(eval-when (:compile-toplevel :load-toplevel :execute) | ||
27 | + (unless (constantp 'sockint::netdb-internal) | ||
28 | + (defconstant sockint::netdb-internal nil "See errno.")) | ||
29 | + (unless (constantp 'sockint::netdb-success) | ||
30 | + (defconstant sockint::netdb-success nil "No problem."))) | ||
31 | + | ||
32 | + | ||
33 | (defclass host-ent () | ||
34 | ((name :initarg :name :reader host-ent-name | ||
35 | :documentation "The name of the host") | ||
36 | @@ -195,7 +206,7 @@ (defun name-service-error (where &optional errno) | ||
37 | (let ((*name-service-errno* (get-name-service-errno errno))) | ||
38 | ;; Comment next to NETDB_INTERNAL in netdb.h says "See errno.". | ||
39 | ;; This special case treatment hasn't actually been tested yet. | ||
40 | - (if (and #-win32 (= *name-service-errno* sockint::NETDB-INTERNAL)) | ||
41 | + (if (and #-win32 sockint::netdb-internal #-win32 (= *name-service-errno* sockint::NETDB-INTERNAL)) | ||
42 | (socket-error where) | ||
43 | (let ((condition | ||
44 | (condition-for-name-service-errno *name-service-errno*))) | ||
45 | -- | ||
46 | 2.25.0 | ||
47 | |||
diff --git a/testing/sbcl/0002-Fix-threads-on-musl-libc.patch b/testing/sbcl/0002-Fix-threads-on-musl-libc.patch deleted file mode 100644 index 7561e9182c..0000000000 --- a/testing/sbcl/0002-Fix-threads-on-musl-libc.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #2020/01/30 Patch has not yet been accepted upstream | ||
2 | From 51ee0c90068ef7d88a23d86579cc1f73c2f6055f Mon Sep 17 00:00:00 2001 | ||
3 | From: Eric Timmons <etimmons@mit.edu> | ||
4 | Date: Sat, 1 Feb 2020 17:33:38 -0500 | ||
5 | Subject: [PATCH 2/5] Do not require _CS_GNU_LIBPTHREAD_VERSION at runtime | ||
6 | start | ||
7 | |||
8 | If there is no content in confstr for _CS_GNU_LIBPTHREAD_VERSION (i.e., on a | ||
9 | non GNU libc) then assume the thread implementation is good enough and let the | ||
10 | user deal with any fallout. | ||
11 | --- | ||
12 | src/runtime/linux-os.c | 7 ++++++- | ||
13 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c | ||
16 | index 89244e793..0ff55653d 100644 | ||
17 | --- a/src/runtime/linux-os.c | ||
18 | +++ b/src/runtime/linux-os.c | ||
19 | @@ -186,8 +186,13 @@ isnptl (void) | ||
20 | if (strstr (buf, "NPTL")) { | ||
21 | return 1; | ||
22 | } | ||
23 | + return 0; | ||
24 | + } | ||
25 | + else { | ||
26 | + /* This libc does not expose the libpthread version. Just assume we have | ||
27 | + * a good enough thread implementation. */ | ||
28 | + return 1; | ||
29 | } | ||
30 | - return 0; | ||
31 | } | ||
32 | #endif | ||
33 | |||
34 | -- | ||
35 | 2.25.0 | ||
36 | |||
diff --git a/testing/sbcl/0003-Fix-foreign-tests-on-musl-libc.patch b/testing/sbcl/0003-Fix-foreign-tests-on-musl-libc.patch deleted file mode 100644 index 2c4da211a0..0000000000 --- a/testing/sbcl/0003-Fix-foreign-tests-on-musl-libc.patch +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | #2020/01/30 Patch has not yet been accepted upstream | ||
2 | From 87b1eca2b719fb5e2d6f10352dcdb86f4d389ca9 Mon Sep 17 00:00:00 2001 | ||
3 | From: Eric Timmons <etimmons@mit.edu> | ||
4 | Date: Sat, 1 Feb 2020 17:33:59 -0500 | ||
5 | Subject: [PATCH 3/5] Teach foreign.test.sh about noop dlclose implementations | ||
6 | |||
7 | Musl libc's implementation of dlclose(3) is (intentionally) a noop (see: | ||
8 | https://wiki.musl-libc.org/functional-differences-from-glibc.html). When | ||
9 | running regression tests, test if dlclose is a noop and if so, skip all tests | ||
10 | that depend on objects being unmapped. | ||
11 | --- | ||
12 | src/code/foreign-load.lisp | 2 +- | ||
13 | tests/foreign.test.sh | 67 ++++++++++++++++++++++++++++---------- | ||
14 | 2 files changed, 51 insertions(+), 18 deletions(-) | ||
15 | |||
16 | diff --git a/src/code/foreign-load.lisp b/src/code/foreign-load.lisp | ||
17 | index ada107c36..4510f2ccf 100644 | ||
18 | --- a/src/code/foreign-load.lisp | ||
19 | +++ b/src/code/foreign-load.lisp | ||
20 | @@ -48,7 +48,7 @@ (defun load-shared-object (pathname &key dont-save) | ||
21 | definitions; if a symbol was previously referenced through the object and | ||
22 | is not present in the reloaded version an error will be signalled. Reloading | ||
23 | may not work as expected if user or library-code has called dlopen(3) on the | ||
24 | -same shared object. | ||
25 | +same shared object or running on a system where dlclose(3) is a noop. | ||
26 | |||
27 | LOAD-SHARED-OBJECT interacts with SB-EXT:SAVE-LISP-AND-DIE: | ||
28 | |||
29 | diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh | ||
30 | index fabba1246..53131bdd2 100755 | ||
31 | --- a/tests/foreign.test.sh | ||
32 | +++ b/tests/foreign.test.sh | ||
33 | @@ -140,6 +140,28 @@ echo 'int late_foo = 43;' > $TEST_FILESTEM-c.c | ||
34 | echo 'int late_bar() { return 14; }' >> $TEST_FILESTEM-c.c | ||
35 | build_so $TEST_FILESTEM-c | ||
36 | |||
37 | +cat > $TEST_FILESTEM-noop-dlclose-test.c <<EOF | ||
38 | +#include <dlfcn.h> | ||
39 | +#include <stddef.h> | ||
40 | + | ||
41 | +int dlclose_is_noop () { | ||
42 | + void * handle = dlopen("./$TEST_FILESTEM-noop-dlclose-test-helper.so", RTLD_NOW | RTLD_GLOBAL); | ||
43 | + dlclose(handle); | ||
44 | + | ||
45 | + handle = dlopen("./$TEST_FILESTEM-noop-dlclose-test-helper.so", RTLD_NOW | RTLD_NOLOAD); | ||
46 | + if (handle != NULL) { | ||
47 | + return 1; | ||
48 | + } | ||
49 | + return 0; | ||
50 | +} | ||
51 | +EOF | ||
52 | +build_so $TEST_FILESTEM-noop-dlclose-test | ||
53 | + | ||
54 | +cat > $TEST_FILESTEM-noop-dlclose-test-helper.c <<EOF | ||
55 | +int sbcl_dlclose_test = 42; | ||
56 | +EOF | ||
57 | +build_so $TEST_FILESTEM-noop-dlclose-test-helper | ||
58 | + | ||
59 | ## Foreign definitions & load | ||
60 | |||
61 | cat > $TEST_FILESTEM.base.lisp <<EOF | ||
62 | @@ -246,20 +268,28 @@ cat > $TEST_FILESTEM.test.lisp <<EOF | ||
63 | |||
64 | (note "/initial assertions ok") | ||
65 | |||
66 | + ;; determine if dlclose is a noop. | ||
67 | + (load-shared-object (truename "$TEST_FILESTEM-noop-dlclose-test.so")) | ||
68 | + (define-alien-routine dlclose-is-noop int) | ||
69 | + (defparameter *dlclose-noop-p* (plusp (dlclose-is-noop))) | ||
70 | + | ||
71 | ;; test reloading object file with new definitions | ||
72 | (assert (= 13 foo)) | ||
73 | (assert (= 42 (bar))) | ||
74 | (note "/original definitions ok") | ||
75 | - (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b.bak") | ||
76 | - (rename-file "$TEST_FILESTEM-b2.so" "$TEST_FILESTEM-b.so") | ||
77 | - (load-shared-object (truename "$TEST_FILESTEM-b.so")) | ||
78 | - (note "/reloading ok") | ||
79 | - (assert (= 42 foo)) | ||
80 | - (assert (= 13 (bar))) | ||
81 | - (note "/redefined versions ok") | ||
82 | - (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b2.so") | ||
83 | - (rename-file "$TEST_FILESTEM-b.bak" "$TEST_FILESTEM-b.so") | ||
84 | - (note "/renamed back to originals") | ||
85 | + (if *dlclose-noop-p* | ||
86 | + (note "/skipping reloading tests") | ||
87 | + (progn | ||
88 | + (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b.bak") | ||
89 | + (rename-file "$TEST_FILESTEM-b2.so" "$TEST_FILESTEM-b.so") | ||
90 | + (load-shared-object (truename "$TEST_FILESTEM-b.so")) | ||
91 | + (note "/reloading ok") | ||
92 | + (assert (= 42 foo)) | ||
93 | + (assert (= 13 (bar))) | ||
94 | + (note "/redefined versions ok") | ||
95 | + (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b2.so") | ||
96 | + (rename-file "$TEST_FILESTEM-b.bak" "$TEST_FILESTEM-b.so") | ||
97 | + (note "/renamed back to originals"))) | ||
98 | |||
99 | ;; test late resolution | ||
100 | #+linkage-table | ||
101 | @@ -276,13 +306,16 @@ cat > $TEST_FILESTEM.test.lisp <<EOF | ||
102 | (load-shared-object (truename "$TEST_FILESTEM-c.so")) | ||
103 | (assert (= 43 late-foo)) | ||
104 | (assert (= 14 (late-bar))) | ||
105 | - (unload-shared-object (truename "$TEST_FILESTEM-c.so")) | ||
106 | - (multiple-value-bind (val err) (ignore-errors late-foo) | ||
107 | - (assert (not val)) | ||
108 | - (assert (typep err 'undefined-alien-error))) | ||
109 | - (multiple-value-bind (val err) (ignore-errors (late-bar)) | ||
110 | - (assert (not val)) | ||
111 | - (assert (typep err 'undefined-alien-error))) | ||
112 | + (if *dlclose-noop-p* | ||
113 | + (note "/skipping linkage table unloading tests") | ||
114 | + (progn | ||
115 | + (unload-shared-object (truename "$TEST_FILESTEM-c.so")) | ||
116 | + (multiple-value-bind (val err) (ignore-errors late-foo) | ||
117 | + (assert (not val)) | ||
118 | + (assert (typep err 'undefined-alien-error))) | ||
119 | + (multiple-value-bind (val err) (ignore-errors (late-bar)) | ||
120 | + (assert (not val)) | ||
121 | + (assert (typep err 'undefined-alien-error))))) | ||
122 | (note "/linkage table ok")) | ||
123 | |||
124 | (sb-ext:exit :code $EXIT_LISP_WIN) ; success convention for Lisp program | ||
125 | -- | ||
126 | 2.25.0 | ||
127 | |||
diff --git a/testing/sbcl/APKBUILD b/testing/sbcl/APKBUILD index 7f11a0f090..3ea2d3317c 100644 --- a/testing/sbcl/APKBUILD +++ b/testing/sbcl/APKBUILD | |||
@@ -3,20 +3,17 @@ | |||
3 | # Contributor: Will Sinatra <wpsinatra@gmail.com> | 3 | # Contributor: Will Sinatra <wpsinatra@gmail.com> |
4 | # Maintainer: Will Sinatra <wpsinatra@gmail.com> | 4 | # Maintainer: Will Sinatra <wpsinatra@gmail.com> |
5 | pkgname=sbcl | 5 | pkgname=sbcl |
6 | pkgver=2.0.3 | 6 | pkgver=2.0.5 |
7 | pkgrel=0 | 7 | pkgrel=0 |
8 | pkgdesc="Steel Bank Common Lisp" | 8 | pkgdesc="Steel Bank Common Lisp" |
9 | url="http://www.sbcl.org/" | 9 | url="http://www.sbcl.org/" |
10 | arch="x86_64 armv7" #aarch64 support inbound on 2.0.4 | 10 | arch="x86_64 armv7 aarch64" |
11 | license="custom" | 11 | license="custom" |
12 | options="!check" | 12 | options="!check" |
13 | checkdepends="ed" | 13 | checkdepends="ed" |
14 | makedepends="ecl ecl-dev gmp-dev gc gc-dev libffi-dev linux-headers paxmark zlib-dev" | 14 | makedepends="ecl ecl-dev gmp-dev gc gc-dev libffi-dev linux-headers paxmark zlib-dev" |
15 | subpackages="$pkgname-doc" | 15 | subpackages="$pkgname-doc" |
16 | source="$pkgname-$pkgver.tar.bz2::https://prdownloads.sourceforge.net/sbcl/sbcl-$pkgver-source.tar.bz2 | 16 | source="$pkgname-$pkgver.tar.bz2::https://prdownloads.sourceforge.net/sbcl/sbcl-$pkgver-source.tar.bz2 |
17 | 0001-Fix-sb-bsd-sockets-on-musl-libc.patch | ||
18 | 0002-Fix-threads-on-musl-libc.patch | ||
19 | 0003-Fix-foreign-tests-on-musl-libc.patch | ||
20 | 0004-Only-include-old-memcpy-version-on-glibc.patch | 17 | 0004-Only-include-old-memcpy-version-on-glibc.patch |
21 | Fix-ARM-build-using-ECL-host.patch | 18 | Fix-ARM-build-using-ECL-host.patch |
22 | march-armv5-removed.patch" | 19 | march-armv5-removed.patch" |
@@ -48,10 +45,7 @@ package() { | |||
48 | "$pkgdir"/usr/share/info 2>/dev/null || true | 45 | "$pkgdir"/usr/share/info 2>/dev/null || true |
49 | } | 46 | } |
50 | 47 | ||
51 | sha512sums="c29c115fff0e118e5c05959dd8d73ae876458daeb5ddde67ce485b10e6d1583b1f8a9597b54b45606696ab1b1eea5392dcb09357c83fce31323f2a5a154f2dd1 sbcl-2.0.3.tar.bz2 | 48 | sha512sums="0c27e22dd76d157a74ef7e97dcd03030096dde0eb46901ea27acb60faa0ab34881d76a9c6708d963b0e6f62da6331b85b8d3de76fd1fc9163c159e631759f808 sbcl-2.0.5.tar.bz2 |
52 | 0f5b3cac8fed2bac1bfa25f4116ef62e7226994318aff26a69bae6e29a7952e16fe930f14bba2a41b0e50c4cc3e30ce2a36dd8d0b85e6090d455ec6712f3a10a 0001-Fix-sb-bsd-sockets-on-musl-libc.patch | ||
53 | 36bbe64437763f7963dab7af3bcc26ab92ee10d6b12532be40706ce01a5fe29878d8ef9392037be8f09b357a6527e992d1698ea4cd1048050544b2e653edd5fa 0002-Fix-threads-on-musl-libc.patch | ||
54 | 9a1b20c07a1f43ea60d1bd0f4de2474c38441858a7de7351f046943d022c21803bd5d9eb05b5c684519a76dc623d9893af1967c3a26177e7447e05e30e61b18b 0003-Fix-foreign-tests-on-musl-libc.patch | ||
55 | 7c7d7b982814435463a7678ff59ab354426bcee62a3b7ba253d8da1391e68c614cd4d90970fbbfd68ea0927c2689b6c16f01b0e0185489329700ce21aaa5a92c 0004-Only-include-old-memcpy-version-on-glibc.patch | 49 | 7c7d7b982814435463a7678ff59ab354426bcee62a3b7ba253d8da1391e68c614cd4d90970fbbfd68ea0927c2689b6c16f01b0e0185489329700ce21aaa5a92c 0004-Only-include-old-memcpy-version-on-glibc.patch |
56 | 6f49d1f1c6bd4e8d839e6b4ab3bb74cbdcce85ee83a0f1c5efab04d97b613a624f8874dadd7f6d981940ff28c468f00b74a56ff2afc53f41884d753ac7a5028f Fix-ARM-build-using-ECL-host.patch | 50 | 6f49d1f1c6bd4e8d839e6b4ab3bb74cbdcce85ee83a0f1c5efab04d97b613a624f8874dadd7f6d981940ff28c468f00b74a56ff2afc53f41884d753ac7a5028f Fix-ARM-build-using-ECL-host.patch |
57 | 367454a75de122134fdbf1064182a96ee00cf0685db0922134fdbdfc0e0bb2c6a5cfb9878f23409eca48a443e0f19b291f8d380e3475176a4c8cea0c9768c2bd march-armv5-removed.patch" | 51 | 367454a75de122134fdbf1064182a96ee00cf0685db0922134fdbdfc0e0bb2c6a5cfb9878f23409eca48a443e0f19b291f8d380e3475176a4c8cea0c9768c2bd march-armv5-removed.patch" |