On Tue, 4 May 2010, Ian Lance Taylor wrote:
> On GNU/Linux, you need to use -pthread or -D_REENTRANT at compilation
> time, and you need to use -pthread or -lpthread at link time.
_REENTRANT does essentially nothing (enables getlogin_r when the rest of
POSIX.1:1996 is disabled). See what I said
> On GNU/Linux, you need to use -pthread or -D_REENTRANT at compilation
> time, and you need to use -pthread or -lpthread at link time.
? gcc mailing list certainly worth reading for users. I always thought
that -lpthread at link time is enough.
Alexey
> I agree that this really ought to be documented.
There is an old PR about this: http://gcc.gnu.org/PR16519
--
Eric Botcazou
Magnus Fromreide writes:
> I recently ended up in a discussion about the -pthread flag at work and
> when looking at the documentation I noticed that it is defined onlt for
> SPARC and RS/6000/PowerPC.
>
> Additionally -fopenmp and -ftree-parallelize-loops say they are only
> supported on targets
Ian Lance Taylor wrote:
"John Maddock" <[EMAIL PROTECTED]> writes:
The crux of the issue is this: if gcc/g++ is configured with the
pthread threading model, then are object files always binary
compatible irrespective of whether they are compiled with the
-pthread command line option or not?
"John Maddock" <[EMAIL PROTECTED]> writes:
> The crux of the issue is this: if gcc/g++ is configured with the pthread
> threading model, then are object files always binary compatible irrespective
> of whether they are compiled with the -pthread command line option or not?
Yes, modulo the #define
Hi Ian,
Thanks for your reply.
This question is appropriate for [EMAIL PROTECTED], not for
[EMAIL PROTECTED] Please send any follow-ups to gcc-help. Thanks.
I will send to gcc-help.
Cheers
Maggie
Maggie <[EMAIL PROTECTED]> writes:
> I try to generate cross-compiler to support -pthread in command line
> with gcc-4.1.1. I build my compiler using the following configuration.
>
> ./configure --enable-threads=posix --target=our-cpu
>
> After I generate cc1, it doesn't support -pthread command