I can't seem to build threaded sbcl 0.8.21 for x86_64. It errors out
while compiling gencgc.c.
(pushnew :sb-thread l)
(pushnew :sb-futex l)
During make.sh, I (eventually) get , which indicates that cc is
expecting reg_ESP to be defined. I google'd and grep'd a bit and found
that it's is found in src/runtime/x86-lispregs.h (but not
src/runtime/x86-64-lispregs.h), and that REG_ESP is defined in
/usr/include/sys/ucontext.h, but only if the wordsize is 32 bits
(which it isn't) and __USE_GNU is #define'd (which I tried, but of
course didn't help).
Just for fun, I #define'd reg_ESP 8 in gencgc.c . Then gencgc.c
compiled successfully, but I got a really ugly backtrace  in
subsequent portions of the build.
cc -g -Wall -O3 -fno-omit-frame-pointer -I. -c -o gencgc.o gencgc.c
gencgc.c:3588: error: `reg_ESP' undeclared (first use in this function)
gencgc.c:3588: error: (Each undeclared identifier is reported only once
gencgc.c:3588: error: for each function it appears in.)
<more warnings ...>
gmake: *** [gencgc.o] Error 1
 It's the attachment.
--- sbcl-0.8.21/src/runtime/gencgc.c 2005-03-20 22:35:24.000000000 -0500
+++ sbcl-0.8.21-new//src/runtime/gencgc.c 2005-03-30
@@ -3576,6 +3576,7 @@
void **esp=(void **)-1;
+#define reg_ESP 8
esp = (void **) &raise;