AIX pthread patch (preliminary)
David Edelsohn
dje@watson.ibm.com
Wed Aug 16 07:58:00 GMT 2000
>>>>> Geoff Keating writes:
Geoff> On ELF systems, for instance, all the thread routines from pthread.so
Geoff> are imported weak. Then before they are used, they are tested to see
Geoff> if their address is 0. That way, if the application doesn't use
Geoff> pthreads no problems occur. Can't we do the equivalent thing on AIX?
Geoff> This sort of thing is almost always better than multilibs. For
Geoff> instance, it allows users to create one version of a (non-threaded)
Geoff> library which will work both with and without pthreads.
AIX does not have weak symbols / weak imports. AIX uses a
different C library for pthreads, so one cannot simply link libpthread.a
with lazy binding.
I have thought about this a little more and I think that we should
flatten out the multilibs:
common/power/powerpc/ppc64/soft-float with optional /pthread.
That is five or six multilibs. AIX does not need a soft-float variant of
every other variant.
David
More information about the Gcc-patches
mailing list