diff --git a/dev-lisp/sbcl/patches/sbcl-2.1.10.22_20211029.patchset b/dev-lisp/sbcl/patches/sbcl-2.1.10.22_20211029.patchset deleted file mode 100644 index 76888c8e4..000000000 --- a/dev-lisp/sbcl/patches/sbcl-2.1.10.22_20211029.patchset +++ /dev/null @@ -1,284 +0,0 @@ -From a2b423beaa4e5457449f389b39b733eb7a778314 Mon Sep 17 00:00:00 2001 -From: Al Hoang <3811822-hoanga@users.noreply.gitlab.com> -Date: Sun, 31 Oct 2021 21:00:26 -0500 -Subject: patches for haiku - - -diff --git a/contrib/sb-bsd-sockets/sockets.lisp b/contrib/sb-bsd-sockets/sockets.lisp -index 18e94cc..2a3b2f9 100644 ---- a/contrib/sb-bsd-sockets/sockets.lisp -+++ b/contrib/sb-bsd-sockets/sockets.lisp -@@ -345,7 +345,9 @@ request an input stream and get an output stream in response\)." - (define-socket-condition sockint::EOPNOTSUPP operation-not-supported-error) - (define-socket-condition sockint::EPERM operation-not-permitted-error) - (define-socket-condition sockint::EPROTONOSUPPORT protocol-not-supported-error) --(define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) -+;; handle lack of ESOCKTNOSUPPORT on haiku -+#+haiku (define-socket-condition -4025 socket-type-not-supported-error) -+#-haiku (define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) - (define-socket-condition sockint::ENETUNREACH network-unreachable-error) - (define-socket-condition sockint::ENOTCONN not-connected-error) - (define-socket-condition sockint::EAFNOSUPPORT address-family-not-supported) -diff --git a/contrib/sb-bsd-sockets/tests.lisp b/contrib/sb-bsd-sockets/tests.lisp -index dddf316..46ac26e 100644 ---- a/contrib/sb-bsd-sockets/tests.lisp -+++ b/contrib/sb-bsd-sockets/tests.lisp -@@ -82,6 +82,7 @@ - ;; here, not socket-type-not-supported-error or - ;; protocol-not-supported-error. - ((or #+darwin socket-error -+ #+haiku address-family-not-supported - operation-not-supported-error - socket-type-not-supported-error - protocol-not-supported-error) -@@ -100,6 +101,7 @@ - ;; protocol-not-supported-error. - ((or - #+darwin socket-error -+ #+haiku address-family-not-supported - operation-not-supported-error - protocol-not-supported-error - socket-type-not-supported-error) -@@ -497,7 +499,7 @@ - ;; translates into an END-OF-FILE on the other end, no matter which - ;; end performs the shutdown and independent of the element-type of - ;; the stream. --#+ipv4-support -+#+(and ipv4-support (not haiku)) - (macrolet - ((define-shutdown-test (name who-shuts-down who-reads element-type direction) - `(deftest ,name -diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp -index 7c94a43..28b46d3 100644 ---- a/contrib/sb-posix/posix-tests.lisp -+++ b/contrib/sb-posix/posix-tests.lisp -@@ -168,6 +168,8 @@ - #+win32 - #.sb-posix::einval) - -+;;; disable test for haiku -+#-haiku - (deftest rmdir.error.3 - (handler-case - (sb-posix:rmdir #-win32 "/" #+win32 (sb-ext:posix-getenv "windir")) -@@ -179,11 +181,11 @@ - #.sb-posix:eisdir - #+win32 - #.sb-posix::eacces -- #+win32 -+ #+(or win32 haiku) - #.sb-posix::enotempty - #+sunos - #.sb-posix::einval -- #-(or darwin openbsd win32 sunos) -+ #-(or darwin openbsd win32 sunos haiku) - #.sb-posix::ebusy)))) t) - - (deftest rmdir.error.4 -@@ -235,7 +237,7 @@ - (logand mode (logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec))) - #.(logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec)) - --#-(or (and darwin x86) win32) -+#-(or (and darwin x86) win32 haiku) - (deftest stat.2 - (let* ((stat (sb-posix:stat "/")) - (mode (sb-posix::stat-mode stat))) -@@ -256,7 +258,7 @@ - (< (- atime unix-now) 10)) - t) - --#-(or (and darwin x86) win32) -+#-(or (and darwin x86) win32 haiku) - (deftest stat.4 - (let* ((stat (sb-posix:stat (make-pathname :directory '(:absolute :up)))) - (mode (sb-posix::stat-mode stat))) -@@ -441,7 +443,7 @@ - sb-posix::o-nonblock)) - t) - --#-(or win32 netbsd) ; fix: cant handle c-vargs -+#-(or win32 netbsd haiku) ; fix: cant handle c-vargs - (deftest fcntl.flock.1 - (locally (declare (sb-ext:muffle-conditions sb-ext:compiler-note)) - (let ((flock (make-instance 'sb-posix:flock -@@ -592,7 +594,7 @@ - (not (sb-posix:getpwuid 0)) - nil) - --#-(or android win32) -+#-(or android win32 haiku) - (deftest pwent.2 - ;; make sure that we found something - (not (sb-posix:getpwnam "root")) -@@ -665,7 +667,7 @@ - (plusp (sb-posix:time)) - t) - --#-(or (and darwin x86) win32) -+#-(or (and darwin x86) win32 haiku) - (macrolet ((test (name posix-fun) - `(deftest ,name - (let ((file (merge-pathnames #p"utimes.1" *test-directory*)) -@@ -713,6 +715,8 @@ - #.(concatenate 'string "/" (make-string 255 :initial-element #\a))) - - ;; The error tests are in the order of exposition from SUSv3. -+ ;; disable test on haiku -+ #-haiku - (deftest readlink.error.1 - (let* ((subdir-pathname (merge-pathnames - (make-pathname -@@ -732,6 +736,8 @@ - (sb-posix:unlink link-pathname) - (sb-posix:rmdir subdir-pathname)))) - #.sb-posix:eacces) -+ ;; disable test on haiku -+ #-haiku - (deftest readlink.error.2 - (let* ((non-link-pathname (make-pathname :name "readlink.error.2" - :defaults *test-directory*)) -@@ -762,6 +768,8 @@ - #.sb-posix:eloop) - ;; Note: PATH_MAX and NAME_MAX need not be defined, and may vary, so - ;; failure of this test is not too meaningful. -+ ;; TERRIBLE -+ #-haiku - (deftest readlink.error.4 - (let ((pathname - (make-pathname :name (make-string 257 ;NAME_MAX plus some, maybe -diff --git a/contrib/sb-sprof/test.lisp b/contrib/sb-sprof/test.lisp -index 8816728..65f67b5 100644 ---- a/contrib/sb-sprof/test.lisp -+++ b/contrib/sb-sprof/test.lisp -@@ -55,40 +55,40 @@ - - #-sparc - (defun run-tests () -- (proclaim '(sb-ext:muffle-conditions style-warning)) -- (sb-sprof:with-profiling (:max-samples *sprof-loop-test-max-samples* -- :report :flat :loop t :show-progress t) -- ;; Notice that "./foo.fasl" writes into this directory, whereas simply "foo.fasl" -- ;; would write into "../../src/code/" -- ;; Notice also that our file I/O routines are so crappy that 15% of the test -- ;; is spent in lseek, and 12% in write. Just wow! -- ;; Self Total Cumul -- ;; Nr Count % Count % Count % Calls Function -- ;; ------------------------------------------------------------------------ -- ;; 1 15 15.0 15 15.0 15 15.0 - foreign function __lseek -- ;; 2 12 12.0 12 12.0 27 27.0 - foreign function write -- ;; 3 7 7.0 7 7.0 34 34.0 - foreign function __pthread_sigmask -+ ;;;; (proclaim '(sb-ext:muffle-conditions style-warning)) -+ ;;;; (sb-sprof:with-profiling (:max-samples *sprof-loop-test-max-samples* -+ ;;;; :report :flat :loop t :show-progress t) -+ ;;;; ;; Notice that "./foo.fasl" writes into this directory, whereas simply "foo.fasl" -+ ;;;; ;; would write into "../../src/code/" -+ ;;;; ;; Notice also that our file I/O routines are so crappy that 15% of the test -+ ;;;; ;; is spent in lseek, and 12% in write. Just wow! -+ ;;;; ;; Self Total Cumul -+ ;;;; ;; Nr Count % Count % Count % Calls Function -+ ;;;; ;; ------------------------------------------------------------------------ -+ ;;;; ;; 1 15 15.0 15 15.0 15 15.0 - foreign function __lseek -+ ;;;; ;; 2 12 12.0 12 12.0 27 27.0 - foreign function write -+ ;;;; ;; 3 7 7.0 7 7.0 34 34.0 - foreign function __pthread_sigmask - -- ;; -- (compile-file *compiler-input* :output-file *compiler-output* :print nil)) -- (delete-file *compiler-output*) -- (let ((*standard-output* (make-broadcast-stream))) -- (test) -- (consing-test) -- ;; This test shows that STOP-SAMPLING and START-SAMPLING on a thread do something. -- ;; Based on rev b6bf65d9 it would seem that the API got broken a little. -- ;; The thread doesn't do a whole lot, which is fine for what it is. -- #+sb-thread -- (let* ((sem (sb-thread:make-semaphore)) -- (some-thread (sb-thread:make-thread #'sb-thread:wait-on-semaphore :arguments sem -- :name "donothing"))) -- (sb-sprof:stop-sampling some-thread) -- (sb-sprof:start-sampling some-thread) -- (sb-thread:signal-semaphore sem) -- ;; Join because when run by run-tests.sh, it's an error to have random leftover threads -- (sb-thread:join-thread some-thread)) -- ;; For debugging purposes, print output for visual inspection to see where -- ;; the allocation sequence gets hit. -- ;; It can be interrupted even inside pseudo-atomic now. -- (disassemble #'consalot :stream *error-output*)) -+ ;;;; ;; -+ ;;;; (compile-file *compiler-input* :output-file *compiler-output* :print nil)) -+ ;;;; (delete-file *compiler-output*) -+ ;;;; (let ((*standard-output* (make-broadcast-stream))) -+ ;;;; (test) -+ ;;;; (consing-test) -+ ;;;; ;; This test shows that STOP-SAMPLING and START-SAMPLING on a thread do something. -+ ;;;; ;; Based on rev b6bf65d9 it would seem that the API got broken a little. -+ ;;;; ;; The thread doesn't do a whole lot, which is fine for what it is. -+ ;;;; #+sb-thread -+ ;;;; (let* ((sem (sb-thread:make-semaphore)) -+ ;;;; (some-thread (sb-thread:make-thread #'sb-thread:wait-on-semaphore :arguments sem -+ ;;;; :name "donothing"))) -+ ;;;; (sb-sprof:stop-sampling some-thread) -+ ;;;; (sb-sprof:start-sampling some-thread) -+ ;;;; (sb-thread:signal-semaphore sem) -+ ;;;; ;; Join because when run by run-tests.sh, it's an error to have random leftover threads -+ ;;;; (sb-thread:join-thread some-thread)) -+ ;;;; ;; For debugging purposes, print output for visual inspection to see where -+ ;;;; ;; the allocation sequence gets hit. -+ ;;;; ;; It can be interrupted even inside pseudo-atomic now. -+ ;;;; (disassemble #'consalot :stream *error-output*)) - t) -diff --git a/src/code/unix.lisp b/src/code/unix.lisp -index d9858da..0a5b8c9 100644 ---- a/src/code/unix.lisp -+++ b/src/code/unix.lisp -@@ -970,10 +970,20 @@ avoiding atexit(3) hooks, etc. Otherwise exit(2) is called." - (it-interval (struct timeval)) ; timer interval - (it-value (struct timeval)))) ; current value - -+#-haiku - (defconstant itimer-real 0) -+#-haiku - (defconstant itimer-virtual 1) -+#-haiku - (defconstant itimer-prof 2) - -+#+haiku -+(defconstant itimer-real 1) -+#+haiku -+(defconstant itimer-virtual 2) -+#+haiku -+(defconstant itimer-prof 3) -+ - #-win32 - (defun unix-getitimer (which) - "UNIX-GETITIMER returns the INTERVAL and VALUE slots of one of --- -2.30.2 - - -From f317a6a2df3a23fe13e5682c57071b6a8450fda1 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Thu, 25 Nov 2021 18:27:19 +0100 -Subject: Haiku: access to fpu registers was changed in beta3 - - -diff --git a/src/runtime/x86-64-haiku-os.c b/src/runtime/x86-64-haiku-os.c -index 2f8e25c..af4924e 100644 ---- a/src/runtime/x86-64-haiku-os.c -+++ b/src/runtime/x86-64-haiku-os.c -@@ -47,10 +47,10 @@ os_restore_fp_control(os_context_t *context) - // just guessing here - - /* reset exception flags and restore control flags on SSE2 FPU */ -- unsigned int temp = (context->uc_mcontext.fpu.mxcsr) & ~0x3F; -+ unsigned int temp = (context->uc_mcontext.fpu.fp_fxsave.mxcsr) & ~0x3F; - asm ("ldmxcsr %0" : : "m" (temp)); - /* same for x87 FPU. */ -- asm ("fldcw %0" : : "m" (context->uc_mcontext.fpu.control)); -+ asm ("fldcw %0" : : "m" (context->uc_mcontext.fpu.fp_fxsave.control)); - } - - void --- -2.30.2 - diff --git a/dev-lisp/sbcl/patches/sbcl-2.2.4.patchset b/dev-lisp/sbcl/patches/sbcl-2.2.4.patchset deleted file mode 100644 index 29f50d41f..000000000 --- a/dev-lisp/sbcl/patches/sbcl-2.2.4.patchset +++ /dev/null @@ -1,406 +0,0 @@ -From 21453c4c6795acf63cc918ce59d89bda121f028f Mon Sep 17 00:00:00 2001 -From: Al Hoang <3811822-hoanga@users.noreply.gitlab.com> -Date: Sun, 8 May 2022 23:06:29 -0500 -Subject: updated haiku patch - - -diff --git a/contrib/sb-bsd-sockets/sockets.lisp b/contrib/sb-bsd-sockets/sockets.lisp -index 18e94cc..0b74411 100644 ---- a/contrib/sb-bsd-sockets/sockets.lisp -+++ b/contrib/sb-bsd-sockets/sockets.lisp -@@ -345,7 +345,9 @@ request an input stream and get an output stream in response\)." - (define-socket-condition sockint::EOPNOTSUPP operation-not-supported-error) - (define-socket-condition sockint::EPERM operation-not-permitted-error) - (define-socket-condition sockint::EPROTONOSUPPORT protocol-not-supported-error) --(define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) -+;; haiku hack -+#+haiku (define-socket-condition -4025 socket-type-not-supported-error) -+#-haiku (define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) - (define-socket-condition sockint::ENETUNREACH network-unreachable-error) - (define-socket-condition sockint::ENOTCONN not-connected-error) - (define-socket-condition sockint::EAFNOSUPPORT address-family-not-supported) -diff --git a/contrib/sb-bsd-sockets/tests.lisp b/contrib/sb-bsd-sockets/tests.lisp -index dddf316..46ac26e 100644 ---- a/contrib/sb-bsd-sockets/tests.lisp -+++ b/contrib/sb-bsd-sockets/tests.lisp -@@ -82,6 +82,7 @@ - ;; here, not socket-type-not-supported-error or - ;; protocol-not-supported-error. - ((or #+darwin socket-error -+ #+haiku address-family-not-supported - operation-not-supported-error - socket-type-not-supported-error - protocol-not-supported-error) -@@ -100,6 +101,7 @@ - ;; protocol-not-supported-error. - ((or - #+darwin socket-error -+ #+haiku address-family-not-supported - operation-not-supported-error - protocol-not-supported-error - socket-type-not-supported-error) -@@ -497,7 +499,7 @@ - ;; translates into an END-OF-FILE on the other end, no matter which - ;; end performs the shutdown and independent of the element-type of - ;; the stream. --#+ipv4-support -+#+(and ipv4-support (not haiku)) - (macrolet - ((define-shutdown-test (name who-shuts-down who-reads element-type direction) - `(deftest ,name -diff --git a/contrib/sb-posix/constants.lisp b/contrib/sb-posix/constants.lisp -index 4c991ef..bdc6092 100644 ---- a/contrib/sb-posix/constants.lisp -+++ b/contrib/sb-posix/constants.lisp -@@ -274,10 +274,11 @@ - #-(and linux largefile) "struct dirent" - #-(or win32 android) (:ino-t ino "ino_t" "d_ino") - #+android ((unsigned 64) ino "unsigned long long" "d_ino") -- (:c-string name "char *" "d_name" -- ;; FIXME: sunos should really have :distrust-length -- ;; t, but this is currently broken. -- Jim Wise 2010-08-31 -- :distrust-length nil)) t) -+ )) -+ ;;(:c-string name "char *" "d_name" -+ ;; ;; FIXME: sunos should really have :distrust-length -+ ;; ;; t, but this is currently broken. -- Jim Wise 2010-08-31 -+ ;; :distrust-length nil)) t) - - ;; password database - #-(or android win32) -diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp -index 0a642bd..da1b357 100644 ---- a/contrib/sb-posix/posix-tests.lisp -+++ b/contrib/sb-posix/posix-tests.lisp -@@ -168,6 +168,8 @@ - #+win32 - #.sb-posix::einval) - -+;; disable for haiku -+#-haiku - (deftest rmdir.error.3 - (handler-case - (sb-posix:rmdir #-win32 "/" #+win32 (sb-ext:posix-getenv "windir")) -@@ -179,11 +181,11 @@ - #.sb-posix:eisdir - #+win32 - #.sb-posix::eacces -- #+win32 -+ #+(or win32 haiku) - #.sb-posix::enotempty - #+sunos - #.sb-posix::einval -- #-(or darwin openbsd win32 sunos) -+ #-(or darwin openbsd win32 sunos haiku) - #.sb-posix::ebusy)))) t) - - (deftest rmdir.error.4 -@@ -235,7 +237,7 @@ - (logand mode (logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec))) - #.(logior sb-posix::s-iread sb-posix::s-iwrite sb-posix::s-iexec)) - --#-(or (and darwin x86) win32) -+#-(or (and darwin x86) win32 haiku) - (deftest stat.2 - (eql - (sb-posix::stat-mode (sb-posix:stat "/")) -@@ -428,7 +430,7 @@ - sb-posix::o-nonblock)) - t) - --#-(or win32 netbsd) ; fix: cant handle c-vargs -+#-(or win32 netbsd haiku) ; fix: cant handle c-vargs - (deftest fcntl.flock.1 - (locally (declare (sb-ext:muffle-conditions sb-ext:compiler-note)) - (let ((flock (make-instance 'sb-posix:flock -@@ -520,7 +522,9 @@ - (sb-posix:closedir dir)))) - nil) - --#-(and darwin x86) -+;;#-(and darwin x86) -+;; disable on haiku -+#-haiku - (deftest readdir.1 - (let ((dir (sb-posix:opendir "/"))) - (unwind-protect -@@ -533,7 +537,8 @@ - (sb-posix:closedir dir))) - t) - --#-darwin -+;; disable on haiku as well -+#-(or darwin haiku) - (deftest readdir/dirent-name - (let ((dir (sb-posix:opendir *current-directory*))) - (unwind-protect -@@ -579,7 +584,7 @@ - (not (sb-posix:getpwuid 0)) - nil) - --#-(or android win32) -+#-(or android win32 haiku) - (deftest pwent.2 - ;; make sure that we found something - (not (sb-posix:getpwnam "root")) -@@ -652,7 +657,7 @@ - (plusp (sb-posix:time)) - t) - --#-(or (and darwin x86) win32) -+#-(or (and darwin x86) win32 haiku) - (macrolet ((test (name posix-fun) - `(deftest ,name - (let ((file (merge-pathnames #p"utimes.1" *test-directory*)) -@@ -700,6 +705,8 @@ - #.(concatenate 'string "/" (make-string 255 :initial-element #\a))) - - ;; The error tests are in the order of exposition from SUSv3. -+ ;; TERRIBLE -+ #-haiku - (deftest readlink.error.1 - (let* ((subdir-pathname (merge-pathnames - (make-pathname -@@ -719,6 +726,8 @@ - (sb-posix:unlink link-pathname) - (sb-posix:rmdir subdir-pathname)))) - #.sb-posix:eacces) -+ ;; TERRIBLE -+ #-haiku - (deftest readlink.error.2 - (let* ((non-link-pathname (make-pathname :name "readlink.error.2" - :defaults *test-directory*)) -@@ -749,6 +758,8 @@ - #.sb-posix:eloop) - ;; Note: PATH_MAX and NAME_MAX need not be defined, and may vary, so - ;; failure of this test is not too meaningful. -+ ;; TERRIBLE -+ #-haiku - (deftest readlink.error.4 - (let ((pathname - (make-pathname :name (make-string 257 ;NAME_MAX plus some, maybe -diff --git a/src/code/unix.lisp b/src/code/unix.lisp -index 65cfeea..1d09ded 100644 ---- a/src/code/unix.lisp -+++ b/src/code/unix.lisp -@@ -970,10 +970,20 @@ avoiding atexit(3) hooks, etc. Otherwise exit(2) is called." - (it-interval (struct timeval)) ; timer interval - (it-value (struct timeval)))) ; current value - -+#-haiku - (defconstant itimer-real 0) -+#-haiku - (defconstant itimer-virtual 1) -+#-haiku - (defconstant itimer-prof 2) - -+#+haiku -+(defconstant itimer-real 1) -+#+haiku -+(defconstant itimer-virtual 2) -+#+haiku -+(defconstant itimer-prof 3) -+ - #-win32 - (defun unix-getitimer (which) - "UNIX-GETITIMER returns the INTERVAL and VALUE slots of one of -diff --git a/src/runtime/run-program.c b/src/runtime/run-program.c -index 01a9f81..de74553 100644 ---- a/src/runtime/run-program.c -+++ b/src/runtime/run-program.c -@@ -32,7 +32,7 @@ - #include - #include - #include --#include -+//#include - #include "interr.h" // for lose() - - #ifdef LISP_FEATURE_OPENBSD --- -2.37.3 - - -From e20e02f6c33bc74f28680833322ae8a6e75c6400 Mon Sep 17 00:00:00 2001 -From: Estevan Castilho -Date: Sun, 28 May 2023 20:26:45 +0000 -Subject: UIOP: don't remove :HAIKU from *FEATURES* - -Haiku is in the same position as macOS, where it should have both -:OS-UNIX and it's own keyword in *FEATURES*, but UIOP inadvertedly -removes all other keywords once OS-UNIX-P returns true. A similar fix -is already on ASDF upstream. - -diff --git a/contrib/asdf/uiop.lisp b/contrib/asdf/uiop.lisp -index 6e23972..baf0e13 100644 ---- a/contrib/asdf/uiop.lisp -+++ b/contrib/asdf/uiop.lisp -@@ -1859,7 +1859,7 @@ except on ABCL where it might change between FASL compilation and runtime." - (:os-windows . os-windows-p) - (:genera . os-genera-p) (:os-oldmac . os-oldmac-p) - (:haiku . os-haiku-p)) -- :when (and (or (not o) (eq feature :os-macosx)) (funcall detect)) -+ :when (and (or (not o) (eq feature :os-macosx) (eq feature :os-haiku)) (funcall detect)) - :do (setf o feature) (pushnew feature *features*) - :else :do (setf *features* (remove feature *features*)) - :finally --- -2.37.3 - - -From 4c02550e5095d891969c4ce3e23ca3eec37ec80a Mon Sep 17 00:00:00 2001 -From: Estevan Castilho -Date: Sun, 28 May 2023 20:28:30 +0000 -Subject: Setup an alternate stack for signal handling in Haiku - -Otherwise we just segfault forever when a stack overflow occurs. - -diff --git a/src/runtime/x86-64-haiku-os.c b/src/runtime/x86-64-haiku-os.c -index 7d2c183..3e6fb4c 100644 ---- a/src/runtime/x86-64-haiku-os.c -+++ b/src/runtime/x86-64-haiku-os.c -@@ -2,9 +2,23 @@ - #include "gencgc-alloc-region.h" - #include "thread.h" - #include "genesis/thread.h" -+#include "interr.h" /* for lose() */ - #include -+#include - - int arch_os_thread_init(struct thread __attribute__((unused)) *thread) { -+ stack_t sigstack; -+#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK -+ /* Signal handlers are run on the control stack, so if it is exhausted -+ * we had better use an alternate stack for whatever signal tells us -+ * we've exhausted it */ -+ sigstack.ss_sp = calc_altstack_base(thread); -+ sigstack.ss_flags = 0; -+ sigstack.ss_size = calc_altstack_size(thread); -+ if(sigaltstack(&sigstack,0)<0) { -+ lose("Cannot sigaltstack: %s",strerror(errno)); -+ } -+#endif - return 1; - } - --- -2.37.3 - - -From e5abb82629b84b33807401eb8c8af4018aefa7e9 Mon Sep 17 00:00:00 2001 -From: Estevan Castilho -Date: Sun, 28 May 2023 20:30:03 +0000 -Subject: Mark TRACE :ENCAPSULATE NIL tests as broken on Haiku - -They just seem to hang while segfaulting forever. No attempt has been -made to debug this. - -diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp -index fd8e4af..4f305e8 100644 ---- a/tests/debug.impure.lisp -+++ b/tests/debug.impure.lisp -@@ -108,7 +108,7 @@ - ;;; bug 379 - (with-test (:name (trace :encapsulate nil) - :fails-on (or (and :ppc (not :linux)) :arm64) -- :broken-on (or :freebsd)) -+ :broken-on (or :freebsd :haiku)) - (let ((output (with-traced-function (trace-this :encapsulate nil) - (assert (eq 'ok (trace-this)))))) - (assert (search "TRACE-THIS" output)) -@@ -116,7 +116,7 @@ - - (with-test (:name (trace :encapsulate nil :recursive) - :fails-on (or (and :ppc (not :linux)) :arm64) -- :broken-on (or :freebsd)) -+ :broken-on (or :freebsd :haiku)) - (let ((output (with-traced-function (trace-fact :encapsulate nil) - (assert (= 120 (trace-fact 5)))))) - (assert (search "TRACE-FACT" output)) --- -2.37.3 - - -From f23833f7f94d7389a928de25b9fb480267c91c15 Mon Sep 17 00:00:00 2001 -From: Estevan Castilho -Date: Sun, 28 May 2023 20:32:37 +0000 -Subject: Don't assume env is under /usr/bin - -On Haiku, it is under /bin instead, and runtime_loader dynamically -patches script shebangs during load time; so we try getting the -location from PATH instead. - -diff --git a/tests/run-program.test.sh b/tests/run-program.test.sh -index 3a08741..54389ac 100755 ---- a/tests/run-program.test.sh -+++ b/tests/run-program.test.sh -@@ -22,8 +22,14 @@ export SOMETHING_IN_THE_ENVIRONMENT - PATH=/some/path/that/does/not/exist:${PATH} - export PATH - -+# Haiku notably has the env binary on /bin/env, and dynamically -+# patches shebangs referring to /usr/bin/env on runtime_loader. This, -+# of course, doesn't apply to us, so get the actual location from PATH. -+BIN_ENV="$(command -v env || echo /usr/bin/env)" -+ - # This should probably be broken up into separate pieces. --run_sbcl --eval "(defvar *exit-ok* $EXIT_LISP_WIN)" <<'EOF' -+run_sbcl --eval "(defvar *exit-ok* $EXIT_LISP_WIN)" \ -+ --eval "(defvar *bin-env* \"$BIN_ENV\")" <<'EOF' - ;; test that $PATH is searched - (assert (zerop (sb-ext:process-exit-code - (sb-ext:run-program "true" () :search t :wait t)))) -@@ -38,7 +44,7 @@ run_sbcl --eval "(defvar *exit-ok* $EXIT_LISP_WIN)" <<'EOF' - ;; Unix environment strings are ordinarily passed with SBCL convention - ;; (instead of CMU CL alist-of-keywords convention). - (let ((string (with-output-to-string (stream) -- (sb-ext:run-program "/usr/bin/env" () -+ (sb-ext:run-program *bin-env* () - :output stream - :environment '("FEEFIE=foefum"))))) - (assert (equal string "FEEFIE=foefum -@@ -67,7 +73,7 @@ run_sbcl --eval "(defvar *exit-ok* $EXIT_LISP_WIN)" <<'EOF' - (let* ((sb-impl::*default-external-format* :latin-1) - (sb-alien::*default-c-string-external-format* :latin-1) - (string (with-output-to-string (stream) -- (sb-ext:run-program "/usr/bin/env" () -+ (sb-ext:run-program *bin-env* () - :output stream))) - (expected (apply #'concatenate - 'string --- -2.37.3 - - -From 377f3ad9d5f154dfb011dded46104ef2df14b731 Mon Sep 17 00:00:00 2001 -From: Estevan Castilho -Date: Sun, 28 May 2023 20:34:28 +0000 -Subject: Include missing header, optionally install the SEGV handler on Haiku - - -diff --git a/src/runtime/haiku-os.c b/src/runtime/haiku-os.c -index f56d06a..74065bc 100644 ---- a/src/runtime/haiku-os.c -+++ b/src/runtime/haiku-os.c -@@ -3,6 +3,7 @@ - #include "interrupt.h" - #include "arch.h" // for arch_get_bad_addr - #include "interrupt.h" // for sig_stop_for_gc_handler -+#include "gc-internal.h" // for gencgc_handle_wp_violation - #include - #include - -@@ -78,7 +79,9 @@ sigsegv_handler(int signal, siginfo_t *info, os_context_t *context) - void - os_install_interrupt_handlers(void) - { -- ll_install_handler(SIGSEGV, sigsegv_handler); -+ if (INSTALL_SIG_MEMORY_FAULT_HANDLER) { -+ ll_install_handler(SIGSEGV, sigsegv_handler); -+ } - } - - int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr) --- -2.37.3 - diff --git a/dev-lisp/sbcl/sbcl-2.1.10.22_20211029.recipe b/dev-lisp/sbcl/sbcl-2.1.10.22_20211029.recipe deleted file mode 100644 index acf15e837..000000000 --- a/dev-lisp/sbcl/sbcl-2.1.10.22_20211029.recipe +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY="A high performance Common Lisp compiler" -DESCRIPTION="Steel Bank Common Lisp (SBCL) is a high performance Common \ -Lisp compiler. It is open source / free software, with a permissive license. \ -In addition to the compiler and runtime system for ANSI Common Lisp, it \ -provides an interactive environment including a debugger, a statistical \ -profiler, a code coverage tool, and many other extensions." -HOMEPAGE="https://sbcl.org" -COPYRIGHT="2002 Gerd Moellmann" -LICENSE="BSD (2-clause)" -REVISION="1" -srcGitRev="44e0d89ff14fcd8d599edd00668633c4772c26b9" -SOURCE_URI="https://github.com/sbcl/sbcl/archive/$srcGitRev.tar.gz" -CHECKSUM_SHA256="b59dba5b0c4d8a599b60f29d79e29115f1dd73f3b5f305123ecf0cb1ef1a8212" -SOURCE_DIR="sbcl-$srcGitRev" -SOURCE_FILENAME="sbcl-$portVersion.tar.gz" -PATCHES="sbcl-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="?x86" - -PROVIDES=" - sbcl$secondaryArchSuffix = $portVersion - cmd:sbcl$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libssl$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libssl$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - java:environment == 11 - cmd:abcl - cmd:find - cmd:gcc$secondaryArchPrefix - cmd:make - cmd:pkg_config$secondaryArchPrefix - cmd:sed - cmd:xargs - " - -BUILD() -{ - source /system/data/profile.d/openjdk11.sh - export PATH=$JDK11_HOME/bin:$PATH - export JAVA_HOME="$JDK11_HOME" - export DISABLE_ASLR=1 - - echo ';;; This file is auto-generated using generate-version.sh. Every time -;;; you re-run make.sh, this file will be overwritten if you are -;;; working from a Git checkout. -"2.1.10.22-44e0d89ff-WIP"' > version.lisp-expr - sh make.sh abcl -} - -INSTALL() -{ - INSTALL_ROOT=$prefix sh install.sh - - mkdir -p $docDir $manDir - mv $prefix/share/man/man1 $manDir - mv $prefix/share/doc/sbcl/* $docDir - rm -rf $prefix/share -} - diff --git a/dev-lisp/sbcl/sbcl-2.2.4.recipe b/dev-lisp/sbcl/sbcl-2.2.4.recipe deleted file mode 100644 index f8bedb7eb..000000000 --- a/dev-lisp/sbcl/sbcl-2.2.4.recipe +++ /dev/null @@ -1,63 +0,0 @@ -SUMMARY="A high performance Common Lisp compiler" -DESCRIPTION="Steel Bank Common Lisp (SBCL) is a high performance Common \ -Lisp compiler. It is open source / free software, with a permissive license. \ -In addition to the compiler and runtime system for ANSI Common Lisp, it \ -provides an interactive environment including a debugger, a statistical \ -profiler, a code coverage tool, and many other extensions." -HOMEPAGE="https://sbcl.org" -COPYRIGHT="2002 Gerd Moellmann" -LICENSE="BSD (2-clause)" -REVISION="2" -SOURCE_URI="https://github.com/sbcl/sbcl/archive/refs/tags/sbcl-$portVersion.tar.gz" -SOURCE_DIR="sbcl-sbcl-$portVersion" -CHECKSUM_SHA256="f9f85f1a2ab4f12068621dce5a7b7b9c43a5875b06d736b88cb1373ca2caed1f" -PATCHES="sbcl-2.2.4.patchset" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="?x86" - -PROVIDES=" - sbcl$secondaryArchSuffix = $portVersion - cmd:sbcl$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libssl$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libssl$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:find - cmd:gcc$secondaryArchSuffix - cmd:git - cmd:make - cmd:pkg_config$secondaryArchSuffix - cmd:sbcl - cmd:sed - cmd:xargs - " - -BUILD() -{ - echo ';;; This file is auto-generated using generate-version.sh. Every time -;;; you re-run make.sh, this file will be overwritten if you are -;;; working from a Git checkout. -"2.2.4-WIP"' > version.lisp-expr - sh make.sh sbcl -} - -INSTALL() -{ - mkdir -p $manDir - mkdir -p $docDir - INSTALL_ROOT=$prefix MAN_DIR=$manDir DOC_DIR=$docDir INFO_DIR=$infoDir sh install.sh -} - -TEST() -{ - cd tests - ./run-tests.sh -}