public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Exception Handling is thread safe?
@ 1998-03-19 12:55 Bastiaan Bakker
  1998-03-22 11:46 ` Jeffrey A Law
  0 siblings, 1 reply; 6+ messages in thread
From: Bastiaan Bakker @ 1998-03-19 12:55 UTC (permalink / raw)
  To: egcs

Hi ,

On the OmniORB project pages I read  that egcs' exception handling is
not thread safe but that it can be fixed with a patch from Teemu Torma.
Now that egcs 1.02 is released I wonder whether this patch has been
incorporated. If not, how do I make egcs thread safe? Can I still apply
the same patch. Should I use g++ 2.8.1 for multi threading code instead,
or does it have the same problems?
Thanks in advance for any info on this subject,

Bastiaan Bakker

PS. Could the egcs project page maintainer please add a few lines about
this subject to the caveats page, I guess I'm not the only one
interested to know about egcs' thread safety.




^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Exception Handling is thread safe?
@ 1998-03-23 15:11 Kaz Kylheku
  1998-03-23 16:09 ` Joe Buck
  0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kylheku @ 1998-03-23 15:11 UTC (permalink / raw)
  To: 'Bastiaan Bakker', egcs

On Thursday, March 19, 1998 2:13 AM, Bastiaan Bakker 
[SMTP:Bastiaan.Bakker@Harbinger.nl] wrote:
> Hi ,
>
> On the OmniORB project pages I read  that egcs' exception handling is
> not thread safe but that it can be fixed with a patch from Teemu Torma.

Thread safe exception handling is available in the March 8th snapshot,
which is what I am using right now. Presumably, it has been incorporated
into the 1.0.2 release; I have not yet checked.

In the March 8th (980308) snapshot, you have to manually enable thread-safe
exception handling by editing the 'gthr.h' header file in the 'gcc' 
subdirectory.

At the top, add

	#define _PTHREADS = 1

if you are using POSIX threads. Otherwise #define _DCE_THREADS
or _SOLARIS_THREADS in the same way.

Then remove the 'libgcc2.a' file, and do a make install. Watch for
libgcc.a being built; if it doesn't happen, remove libgcc2.a and try
again.

Once you have everything successfully built and installed, your
libgcc.a now contains undefined symbols referring to the appropriate
threading library, thus you may have to add the appropriate link options
on the compiler command line to compile C++ code that does
exception handling. (On my system, the pthreads API is in
a separate library; I'm using LinuxThreads in conjunction with
libc5.)

This advice may work for 1.0.2; I don't know yet.

Watch out; I tried to ``cheat'' by doing only a ``make libgcc.a''
in the gcc directory and copying the libgcc.a file manually to
its destination. It did not work for some reason that I don't fully
understand. Only a ``make install'' did the right magic.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-03-23 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-19 12:55 Exception Handling is thread safe? Bastiaan Bakker
1998-03-22 11:46 ` Jeffrey A Law
1998-03-23 10:41   ` erwin
1998-03-23 16:39   ` Andi Kleen
1998-03-23 15:11 Kaz Kylheku
1998-03-23 16:09 ` Joe Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).