This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ld on sparc-solaris: linkage order
- To: boercher at kidata dot de, hjl at lucon dot org
- Subject: Re: ld on sparc-solaris: linkage order
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Thu, 13 Jul 2000 12:32:22 -0400
- Cc: gcc at gcc dot gnu dot org
Volker Boerchers <boercher@kidata.de>:
> Don't know if this is a problem. I don't have the sun compiler so i can't
> check what the `-mt' really does.
From the Solaris cc (not ld) man page:
# -mt Passes D_REENTRANT to preprocessor. Appends -lthread.
# If you are doing your own multithread coding, you must
# use this option in the compile and link steps. To
# obtain faster execution, this option requires a mul-
# tiprocessor system. On a single-processor system, the
# resulting executable usually runs more slowly with this
# option.
So I don't know that it /ensures/ that the argument order is "-lpthread
-lc" but it does just append -lpthread, and the normal compiler driver
just appends -lc to /that/.
The native Solaris ld doesn't have an -mt option AFAICT.
H.J., when you said
> > I think gcc should take -mt on Solaris. Could you please send me a
did you mean "should accept -mt on Solaris" or did you mean "should use
[the effects of] -mt by default"? I'm assuming you meant the former.
Phil