This is the mail archive of the
mailing list for the GCC project.
RE: emulating tls for systems without
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'Richard Henderson' <rth at redhat dot com>, 'Jakub Jelinek' <jakub at redhat dot com>
- Cc: 'Diego Novillo' <dnovillo at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Sep 2006 09:09:58 +1200
- Subject: RE: emulating tls for systems without
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com] On Behalf Of Richard Henderson
> Sent: Thursday, 21 September 2006 1:59 p.m.
> To: Jakub Jelinek
> Cc: Diego Novillo; firstname.lastname@example.org
> Subject: emulating tls for systems without
> Jakub, I've finished up that WIP patch you sent me this morning.
> For everyone else, we've come up with a scheme to emulate tls
> with the __gthread_[gs]etspecific routines that
> thread-enabled systems are supposed to provide in their gcc
> It would be good if some windows or other similarly tls
> deprived systems could test to see if openmp threadprivate
> tests work as expected.
I applied your patch and tested using the libgomp testsuite on
I have modified specs to add -mthread -lpthread.a when compiling with
The former will pull in libmingwthrd and so make gthread_active_p()
return true. The latter provides a pthread
emulation libraray from the pthread-win32 project for the rest of the
The result with C were very promising;
All compilation tests passed. All but two (copyin-1.c, lib-1.c)
execution tests passed.
In C++ tescases, I think I ran into the problem Jakub described, with
many link failures of
+0x9): undefined reference to `(anonymous
In fortran, i ran into library problem with
ialias (foo) expansion, with undefined references to:
That should be relaltively simple to fix.
Thanks for working on this.