public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Is there an equivalent to the Sun Compiler's -mt option
@ 2000-03-15 16:04 Gary Matsunami
  2000-03-15 16:24 ` Martin v. Loewis
  2000-04-01  0:00 ` Gary Matsunami
  0 siblings, 2 replies; 4+ messages in thread
From: Gary Matsunami @ 2000-03-15 16:04 UTC (permalink / raw)
  To: help-gcc

Hello,
     We are trying to run the C++ compiled with gcc and Java, and C++
compiled with Sun Solaris and Java.  We need to set the -mt flag
(compile and link for multithreaded code) for the Sun compiler, but
don't know the equivalent flag to set for gcc.  Would you please let
me know if there is an equivalent flag and what it is?



Thank you in advance,
Gary Matsunami



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

* Re: Is there an equivalent to the Sun Compiler's -mt option
  2000-03-15 16:04 Is there an equivalent to the Sun Compiler's -mt option Gary Matsunami
@ 2000-03-15 16:24 ` Martin v. Loewis
  2000-04-01  0:00   ` Martin v. Loewis
  2000-04-01  0:00 ` Gary Matsunami
  1 sibling, 1 reply; 4+ messages in thread
From: Martin v. Loewis @ 2000-03-15 16:24 UTC (permalink / raw)
  To: matsu; +Cc: help-gcc

>      We are trying to run the C++ compiled with gcc and Java, and C++
> compiled with Sun Solaris and Java.  We need to set the -mt flag
> (compile and link for multithreaded code) for the Sun compiler, but
> don't know the equivalent flag to set for gcc.  Would you please let
> me know if there is an equivalent flag and what it is?

For the compiler itself, you don't need a flag. It will work just fine
- single-threaded or not. For the system libraries, you can use the
-pthreads option. This will add -D_REENTRANT -D_PTHREADS to the
preprocessor predefines, and adds -lpthread to the linker command
line.

Please note that you should have specified --enable-threads when you
built the compiler, to get thread-safe exception handling.

Regards,
Martin

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

* Is there an equivalent to the Sun Compiler's -mt option
  2000-03-15 16:04 Is there an equivalent to the Sun Compiler's -mt option Gary Matsunami
  2000-03-15 16:24 ` Martin v. Loewis
@ 2000-04-01  0:00 ` Gary Matsunami
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Matsunami @ 2000-04-01  0:00 UTC (permalink / raw)
  To: help-gcc

Hello,
     We are trying to run the C++ compiled with gcc and Java, and C++
compiled with Sun Solaris and Java.  We need to set the -mt flag
(compile and link for multithreaded code) for the Sun compiler, but
don't know the equivalent flag to set for gcc.  Would you please let
me know if there is an equivalent flag and what it is?



Thank you in advance,
Gary Matsunami



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

* Re: Is there an equivalent to the Sun Compiler's -mt option
  2000-03-15 16:24 ` Martin v. Loewis
@ 2000-04-01  0:00   ` Martin v. Loewis
  0 siblings, 0 replies; 4+ messages in thread
From: Martin v. Loewis @ 2000-04-01  0:00 UTC (permalink / raw)
  To: matsu; +Cc: help-gcc

>      We are trying to run the C++ compiled with gcc and Java, and C++
> compiled with Sun Solaris and Java.  We need to set the -mt flag
> (compile and link for multithreaded code) for the Sun compiler, but
> don't know the equivalent flag to set for gcc.  Would you please let
> me know if there is an equivalent flag and what it is?

For the compiler itself, you don't need a flag. It will work just fine
- single-threaded or not. For the system libraries, you can use the
-pthreads option. This will add -D_REENTRANT -D_PTHREADS to the
preprocessor predefines, and adds -lpthread to the linker command
line.

Please note that you should have specified --enable-threads when you
built the compiler, to get thread-safe exception handling.

Regards,
Martin

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

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-15 16:04 Is there an equivalent to the Sun Compiler's -mt option Gary Matsunami
2000-03-15 16:24 ` Martin v. Loewis
2000-04-01  0:00   ` Martin v. Loewis
2000-04-01  0:00 ` Gary Matsunami

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).