For those who are still trying to get the threading system of Kaffe 0.10.0 to run on a new architecture: On a UNIX-like system, the following program prints out the correct #define for SP_OFFSET. Maybe we can include this in the configure process? - Godmar -- sp_offset.c -- #include #include #include #include int sp_offset; char new_stack[4096]; static void check() { char x; exit (&x < new_stack || &new_stack[sizeof new_stack] < &x); } main(int ac, char *av[]) { int stat; pid_t child; jmp_buf buf; for (; sp_offset < sizeof (buf) / sizeof (void *); sp_offset++) { if ((child = fork()) == 0) { /* child */ if (setjmp(buf)) check(); *(void **)(((void **)buf) + sp_offset) = &new_stack[(sizeof new_stack)/2]; longjmp(buf, 1); exit(-1); } else { /* parent */ assert(child == wait(&stat)); if (WEXITSTATUS(stat) == 0 && !WIFSIGNALED(stat)) printf("#define\tSP_OFFSET\t%d\n", sp_offset); } } }