From 8f07013fea8c3a6cae9819f1761340ae4c57e24c Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Mon, 19 Apr 2004 03:41:40 +0000 Subject: [PATCH] 0.8.9.49: merged Scott Parish's patch for OpenBSD, with a few tweaks... ...reduced space sizes to work around ulimit problems (as a quick hack, probably not the ideal long-term solution) ...fiddling to work around collisions with NetBSD patch; ah, the joys of working on living, squirmy code ...I think s/LISP_FEATURE_LINUX/LISP_FEATURE_SB_THREAD/ on create_thread() is correct; it was motivated by the way that now new_thread_trampoline() is defined only when LISP_FEATURE_SB_THREAD. minor issue encountered while going through xc: clean.sh should blow away src/runtime/genesis/. --- NEWS | 3 +++ clean.sh | 2 +- src/compiler/x86/parms.lisp | 22 +++++++++++++++------- src/compiler/x86/vm.lisp | 6 ++---- src/runtime/bsd-os.c | 1 - src/runtime/bsd-os.h | 4 +++- src/runtime/thread.c | 2 ++ src/runtime/undefineds.h | 2 +- src/runtime/validate.c | 2 ++ src/runtime/x86-assem.S | 22 +++++++++++++++++----- version.lisp-expr | 2 +- 11 files changed, 47 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 1706448..3a2ccc4 100644 --- a/NEWS +++ b/NEWS @@ -2367,6 +2367,9 @@ changes in sbcl-0.8.10 relative to sbcl-0.8.9: * Support for the forthcoming 2.0 version of the NetBSD kernel running on x86 hardware has been added. (thanks to Perry E. Metzger most immediately, and others for their past work) + * SBCL now runs on OpenBSD 3.4. (Thanks to Scott Parish; 3.4 is the + current release version; SBCL's OpenBSD support had been broken + since about the time of OpenBSD's switch to ELF binary format.) * [placeholder for DX summary] ** user code with &REST lists declared dynamic-extent, under high speed or space and low safety and debug optimization policy. diff --git a/clean.sh b/clean.sh index 945d399..50feec1 100755 --- a/clean.sh +++ b/clean.sh @@ -13,7 +13,7 @@ # this script (including "gmake clean" in the src/runtime directory) # several times in a row without failure.. so we leave the output/ # directory in place.) -rm -rf obj/* output/* doc/user-manual \ +rm -rf obj/* output/* src/runtime/genesis/ doc/user-manual \ doc/user-manual.junk doc/DBTOHTML_OUTPUT_DIR* # (The doc/user-manual.junk and doc/DBTOHTML_OUTPUT_DIR* directories # are created by the Cygnus db2html script when it formats the the diff --git a/src/compiler/x86/parms.lisp b/src/compiler/x86/parms.lisp index dbbde62..b15bb06 100644 --- a/src/compiler/x86/parms.lisp +++ b/src/compiler/x86/parms.lisp @@ -164,18 +164,26 @@ #!+(or freebsd openbsd) (progn - (def!constant read-only-space-start #x10000000) - (def!constant read-only-space-end #x1ffff000) + (def!constant read-only-space-start + #!+freebsd #x10000000 + #!+openbsd #x40000000) + (def!constant read-only-space-end + #!+freebsd #x1ffff000 + #!+openbsd #x47fff000) (def!constant static-space-start #!+freebsd #x30000000 - #!+openbsd #x28000000) - (def!constant static-space-end #x37fff000) + #!+openbsd #x50000000) + (def!constant static-space-end + #!+freebsd #x37fff000 + #!+openbsd #x5ffff000) (def!constant dynamic-space-start - #!+freebsd #x48000000 - #!+openbsd #x50000000) - (def!constant dynamic-space-end #x88000000)) + #!+freebsd #x48000000 + #!+openbsd #x80000000) + (def!constant dynamic-space-end + #!+freebsd #x88000000 + #!+openbsd #xA0000000)) #!+netbsd (progn diff --git a/src/compiler/x86/vm.lisp b/src/compiler/x86/vm.lisp index 97d10f7..c66c6f6 100644 --- a/src/compiler/x86/vm.lisp +++ b/src/compiler/x86/vm.lisp @@ -451,7 +451,5 @@ ;;; the symbol table (for example, prepending an underscore). (defun extern-alien-name (name) (declare (type simple-base-string name)) - ;; OpenBSD is non-ELF, and needs a _ prefix - #!+openbsd (concatenate 'string "_" name) - ;; The other (ELF) ports currently don't need any prefix - #!-openbsd name) + ;; non-ELF ports currently don't need any prefix + name) diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index a16e9de..0bca439 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -37,7 +37,6 @@ #include /* #include */ #include "validate.h" - os_vm_size_t os_vm_page_size; diff --git a/src/runtime/bsd-os.h b/src/runtime/bsd-os.h index 18c2951..85d6568 100644 --- a/src/runtime/bsd-os.h +++ b/src/runtime/bsd-os.h @@ -18,8 +18,10 @@ #include typedef caddr_t os_vm_address_t; -#ifdef __NetBSD__ +#if defined __NetBSD__ typedef vsize_t os_vm_size_t; +#elif defined __OpenBSD__ +typedef size_t os_vm_size_t; #else typedef vm_size_t os_vm_size_t; #endif diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 83c9e72..e099012 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -48,6 +48,7 @@ initial_thread_trampoline(struct thread *th) * whatever other bookkeeping needs to be done */ +#ifdef LISP_FEATURE_SB_THREAD int new_thread_trampoline(struct thread *th) { @@ -62,6 +63,7 @@ new_thread_trampoline(struct thread *th) th->state=STATE_RUNNING; return funcall0(function); } +#endif /* LISP_FEATURE_SB_THREAD */ /* this is called from any other thread to create the new one, and * initialize all parts of it that can be initialized from another diff --git a/src/runtime/undefineds.h b/src/runtime/undefineds.h index 78c58b1..7b132c6 100644 --- a/src/runtime/undefineds.h +++ b/src/runtime/undefineds.h @@ -160,7 +160,7 @@ F(sigvec) F(socket) F(socketpair) F(stat) -#ifndef SVR4 +#if !defined(SVR4) && !defined(__OpenBSD__) F(swapon) #endif F(symlink) diff --git a/src/runtime/validate.c b/src/runtime/validate.c index b8bf283..f9b6ab1 100644 --- a/src/runtime/validate.c +++ b/src/runtime/validate.c @@ -30,6 +30,8 @@ ensure_space(lispobj *start, unsigned long size) "ensure_space: failed to validate %ld bytes at 0x%08lx\n", size, (unsigned long)start); + fprintf(stderr, + "(hint: Try \"ulimit -a\"; maybe you should increase memory limits.)\n"); exit(1); } } diff --git a/src/runtime/x86-assem.S b/src/runtime/x86-assem.S index d42060a..a1b1385 100644 --- a/src/runtime/x86-assem.S +++ b/src/runtime/x86-assem.S @@ -22,16 +22,29 @@ #include "genesis/symbol.h" #include "genesis/thread.h" -/* Minimize conditionalization for different OS naming schemes. */ -#if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ /* (but *not* OpenBSD) */ +/* Minimize conditionalization for different OS naming schemes. + * + * (As of sbcl-0.8.10, this seems no longer to be much of an issue, + * since everyone has converged on ELF. If this generality really + * turns out not to matter, perhaps it's just clutter we could get + * rid of? -- WHN 2004-04-18) + */ +#if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ #define GNAME(var) var #else #define GNAME(var) _##var #endif /* Get the right type of alignment. Linux, FreeBSD and NetBSD (but not OpenBSD) - * want alignment in bytes. */ -#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) + * want alignment in bytes. + * + * (As in the GNAME() definitions above, as of sbcl-0.8.10, this seems + * no longer to be much of an issue, since everyone has converged on + * the same value. If this generality really turns out not to + * matter any more, perhaps it's just clutter we could get + * rid of? -- WHN 2004-04-18) + */ +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define align_4byte 4 #define align_8byte 8 #define align_16byte 16 @@ -44,7 +57,6 @@ .text .global GNAME(foreign_function_call_active) .global GNAME(all_threads) - /* * A call to call_into_c preserves esi, edi, and ebp. diff --git a/version.lisp-expr b/version.lisp-expr index 8cb531f..e68bfed 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.9.48" +"0.8.9.49" -- 1.7.10.4