This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-1.1: AIX problems
- To: Andrey Slepuhin <pooh at msu dot ru>
- Subject: Re: egcs-1.1: AIX problems
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 17 Jul 1998 09:59:35 -0400
- Cc: law at cygnus dot com, egcs at cygnus dot com
>>>>> Andrey Slepuhin writes:
Andrey> 1) What about multithreading support on AIX? As I understand,
Andrey> --enable-threads configure option now stands not only for objc,
Andrey> but it should enable generation of thread-safe libraries. If yes,
Andrey> what changes are necessary to do this on AIX? Note, if
Andrey> thread-safe exception handling will be enabled, then only -mthreads
Andrey> compiler option is needed.
One needs to compile all libraries with -mthreads which is not
compatible with non-thread version. All applications would need to be
compiled with -mthreads because thread-safe currently needs a different
startup file.
I think that adding a thread-safe multilib option would be quite
onerous given how many variants already must be built.
I believe that the thread-safe / non-reentrant distinction
eventually will go away. I basically have been waiting for that solution
to the problems -- whenever "someday" arrives. :^)
Andrey> 2) What about a status of David Edelsohn's patch solving the
Andrey> __builtin_setjmp problems with shared libraries? This patch never
Andrey> was merged into main tree, though it works fine for me.
My changes turned out to be a kludge which really did not work
correctly. The only way to do this correctly using setjmp/longjmp is
*extremely* expensive. The correct solution is to implement real
exception-handling for AIX/XCOFF. I have not been tasked with that as
part of my work at IBM, so it remains on my todo list. If anyone wants to
work on it, I will be happy to provide guidance.
AIX XCOFF already has stack-walking information in a default
tag-table. All one should need to do is append the EGCS
exception-handling table to the tag-table with an appropriate
magic-header. One can use the exception regions and stack-walking
information to implement real exception-handling which will work across
modules where the current one fails.
David