Subject: [clisp-list] SPARC/Linux and releases

From: Christophe Rhodes <[email-masked]>
Date: Wed Jan 30 03:46:02 2002

Dear all,

Firstly, let me report some things that may or may not turn out to be
germane to the issues that CLISP has on SPARC/Linux; the context for
this is that over the last few months I have been porting SBCL[1] to
that platform, and there were a couple of surprises that may turn out
to be relevant.

Probably the most important is the signal handling stuff. Some of this
is documented in the SBCL internals SPARC page, at
<http://ww.telent.net/sbcl-internals/SPARC>; basically, the gist is
that SPARC/Linux completely ignores the POSIX specification for
signals. So signal handlers written as 

void handler(int signo, siginfo_t *info, void *void_context) {
  ...
}

and expecting anything useful (like, say, a ucontext structure) in
void_context will die very quickly, as the SPARC/Linux kernel seems to
put something random in there and a sigcontext on the stack.

The amusement doesn't stop there, unfortunately, because various
glibcs don't necessarily agree with the kernel on the sigcontext
layout. One combination that works(tm) is a 2.2 or 2.4 kernel and
glibc 2.2; at which point the definition in
/usr/include/bits/sigcontext.h seems to match what is on the stack at
&(void_context+37) -- this is robust enough to recompile SBCL with
itself, anyway...

There's more pain, involving traps to get the local and in registers
onto the stack as well; feel free to ask if there's anything else I
can help you with.

On a related issue, is there any change in moving towards a release,
as was thought in December? There are only so many CVS trees I can
follow, and it would be nice(tm) to have a release incorporating the
improvements that I've seen flying past in the CVS logs...

Cheers,

Christophe

[1] <http://sbcl.sourceforge.net/>
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar 
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)