There needs to be a better way of doing this..
preferably we could add another pass to the
normal libc makefiles to do _r versions as well as _p versions
It uses a static constructor to call _thread_init() at program start-up
time. That eliminates the need for any initialization hooks in crt0.o.
Added a symbol reference in "uthread_init.c", to ensure that the new
module will always be pulled in when the archive version of the library
is used.
In "Makefile.inc", defined CPLUSPLUSLIB, so that the constructor will be
properly invoked in the shared library.
Suggested by: Christopher Provenzano, Peter Wemm, and others.