Hey, Ken Raeburn <raeb...@raeburn.org> writes:
> I just took a little bit of a look... on my NetBSD 5.0.1 x86 system, > the __thread support simply uses the %gs segment register, That’s weird because it should only do such things with the ‘initial-exec’ or ‘local-exec’ thread models; otherwise, it relies on support from the C library at run-time, something called ‘__tls_get addr ()’ in glibc. > but the kernel or library or whatever doesn't seem to have set it up > properly. So it compiles and links just fine for me, but crashes when > running. Hmm, not good. > I think the autoconf test is thus going to have to run a test program > to see if __thread is supported, which means it won't be friendly to > cross-compilation setups. (I still don't have all the dependencies > built for NetBSD, so no working patch.) Or, we could hard-code > knowledge about systems where compiling and linking work but execution > fails; that's generally frowned upon.... Yeah, that doesn’t sound very good. Thanks, Ludo’.