ld on sparc-solaris: linkage order
Phil Edwards
pedwards@disaster.jaj.com
Thu Jul 13 09:31:00 GMT 2000
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
More information about the Gcc
mailing list