This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld on sparc-solaris: linkage order



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]