AIX status
David Edelsohn
dje@watson.ibm.com
Mon Oct 30 16:48:00 GMT 2000
>>>>> Phil Edwards writes:
Phil> WRT -lpthread...
Phil> Doesn't libtool track dependancies? (Assume for argument's sake that
Phil> libtool would work on AIX "as well" as it does on Linux today.) If we're
Phil> using libtool properly, we should be able to tell it to supply -lpthread
Phil> when needed, automatically.
Are you referring to mknumeric_limits or general pthread support
when compiling the library? GCC normally supplies -lpthread itself;
however, mknumeric_limits invokes GCC with -nodefaultlibs which disables
the normal library processing. There is no problem when compiling and
linking the library itself and no need to introduce libtool.
mknumeric_limits explicitly links with libgcc.a and libc.a. AIX
happens to need libpthread.a when configuring for pthreads. Cygwin has
other dependencies. I do not understand why this raises such attention.
Phil> The thread targets aren't for "posix under machine X,"
Phil> they're for entirely different kinds of threads. If you want to use posix
Phil> threads, then we need to make --enable-threads=posix work properly, rather
Phil> than introducing a "synonym wrapper". IMO.
I would be happy to collaborate with anyone to allow
--enable-threads=posix to "work properly" on AIX given AIX's requirements.
Some of the previous comments lead me to believe that "posix" support
should not be cluttered with AIX's needs, so I was trying to keep the
changes localized to configure and not affecting common files and
configure case.
Can the pthreads case for configure include a special set of AIX
tests for when to use threads-posix.h and threads-no.h?
Can threads-no.h and threads-posix.h be merged and wrapped by
_GLIBCPP_USE_THREADS after including c++config.h to choose which set of
definitions?
AIX needs to include pthread.h and define the v3/libio threads
symbols when the -pthread compile/link option is present and not reference
those symbols when the -pthread compile/link option is absent. AIX does
not (cannot) provide weak, no-op versions of the symbols when the option
is absent.
Some avenue needs to be left open for platforms with this type of
requirement. I would be happy for anyone to suggest viable alternatives.
David
More information about the Libstdc++
mailing list