This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Put libunwind.a in libgcc_s.so: versioning of_Unwind_*() symbols
On Wed, 2004-04-21 at 07:33, H. J. Lu wrote:
> Adding $(srcdir)/gthr-gnat.c seems to fix the Ada test hanging
> problems. If it isn't needed, you can remove it for ia64 to see if it
> introduces any problems for ia64.
Looking at gthr-gnat.c, I see that it defines a __gnat_install_locks
function, and the only use is in gcc/ada/adaint.c inside VMS ifdefs. So
apparently this file is not doing anything important for ia64-linux.
The question then is what does it do. Well, it defines
gthread_mutex_{,un}lock functions that do nothing. If you link with
these instead of the pthread versions, then obviously, you will never
run into pthread bugs because you aren't calling pthread locking
routines. Also, just as obviously, multi-threaded programs that require
locking won't work anymore. This seems like a potential problem to me.
There is another question of why we don't get link errors when we aren't
using gthr-gnat.c. Where do the __gthread_mutex* functions come from in
that case? I am puzzled. I haven't tried doing builds and looking at
them to see what is going on.
On the other hand, gnat-gthr.c is there for apparently all other
targets, so it probably should be there, even if it seems to be flawed.
At least it means ia64-linux has the same flaw as every other target
instead of having a different set of flaws.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com