2013/3/27 vasily postnicov <shamaz.mazum@gmail.com>
Hello. I started porting sbcl to DragonFlyBSD (earlier attempt was
http://leaf.dragonflybsd.org/mailarchive/users/2006-05/msg00108.html,
but this patch seems to be abandoned and works no more).

I am able to build working sbcl now (even with thread support or so it
seems;) but have few questions I failed to figure out myself:

1) Why :gcc-tls (which stands for thread-local storage as I understand
it) is used for freebsd port and is not used anywhere else?
2) There are more multithreading-related features besides :sb-thread
in sbcl (for example :sb-futex). Can you explain these for me?
3.1) SBCL was build without floating point traps (because it is not
like freebsd, there is no fpu.h in dragonfly for example). Can you
explain how floating point exceptions handlers can be set?
3.2) What os_restore_fp_control is for? I left os_restore_fp_control
untouched by now because I do not understand it.

A question for DragonFly developers which I put here as a note for myself:
1) Is there 1:1 multithreading support in DragonFlyBSD (wikipedia says
yes) as there isn't lthr, only lpthread in the system.

BTW, why lpthread cannot be used in FreeBSD, for example?

When my work is finished, I'll put results on github as a fork from sbcl/sbcl.

Hello. I wrote here earlier about porting sbcl on DragonFly, but received no response.
This is what I have for now:
https://github.com/shamazmazum/sbcl-dragonfly

See 'dragonfly' branch. In few words: I was able to make sbcl work both on x86 and x86-64 platforms. Everything seems to be working except multithreading. Running multithreaded applications and tests on x86-64 causes sbcl to crash with 'Illegal instruction' error, and there is no multithreading on x86 (just because i386_set_ldt differs from FreeBSD version).

Due to spontaneous nature of these crashes I think that this is some kind of race condition. I tried to use only 'sb-thread' feature, sb-thread+sb-futex and sb-thread+sb-futex+sb-posix-futex. Sbcl still crashes.

So I turned threads off by default so they can be turned on with --fancy on x86-64 or with --with-sb-thread.

Can these changes be accepted to upstream on github if I send a pull requests?
 And can anyone who is interested in what I am doing help me to fix thread support?