[gccsdk] Problems running C++ programs compiled with GCC4
John.Tytgat at aaug.net
Wed Jul 30 13:05:08 PDT 2008
In message <48904FAE.4090002 at sky.com>
Lee Noar <leenoar at sky.com> wrote:
> So far, I can tell you that the function that makes the branch to 0 is
> std::locale::_S_initialize() in libstdc++. I think that the function it
> is attempting (and failing) to call is gthread_once(), but I can't find
> a definition for it in the binary (although all the pthread ones are
> there). This should cause a build time linker error, however, if
> gthread_once is declared as weak, then that may explain why there was no
> error and a NULL value used instead. So it seems that __GTHREADS is
> defined, but there's no implementation to bind it to pthreads in
> UnixLib? Or perhaps __GTHREADS shouldn't be defined at all?
The gthread stuff is gcc specific and gets implemented using one of
several possible thread implementations. We're using the pthread one
and a quick check seems to confirm that is really the case.
Would it be possible to craft a small C++ testcase showing this problem
so that I could have a further look please ?
John Tytgat, in his comfy chair at home BASS
John.Tytgat at aaug.net ARM powered, RISC OS driven
More information about the gcc