TLS and single/posix thread model in gcc for genode

Alexander Tormasov a.tormasov at
Thu Dec 12 10:58:09 CET 2019

By default, gcc compiled by toolchain says that thread model is single.
Is it correct? In particular, what’s with TLS (thread local storage), do we need TLS being enabled via —enable-tls option?

I run some programs with TLS support in multi thread environments (golang runtime)... now it have a race when variable which should be in TLS (in accordance with comments, like in getg() current g) sometimes return null. I am not sure - may be this is related to TLS support, may be in locking...

If I try just to add option  --enable-threads=posix
toolchain compilation stop giving Error

In file included from /home/alexs/genode_test/genode/contrib/gcc-20345a83596fa42a25a85938329aea54bb4b2146/src/noux-pkg/gcc/libgcc/gthr.h:148,

                 from /home/alexs/genode_test/genode/contrib/gcc-20345a83596fa42a25a85938329aea54bb4b2146/src/noux-pkg/gcc/libgcc/libgcov-interface.c:27:

./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory

 #include <pthread.h>


compilation terminated.

Makefile:921: recipe for target '_gcov_dump.o' failed

Any suggestions? Should TLS work in genode over Nova “as it is”?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list