ld on sparc-solaris: linkage order

Michael Meissner meissner@cygnus.com
Wed Jul 12 12:29:00 GMT 2000


On Wed, Jul 12, 2000 at 08:07:25AM -0700, H . J . Lu wrote:
> On Wed, Jul 12, 2000 at 01:11:56PM +0200, Volker Boerchers wrote:
> > Hi,
> > 
> > we are having problems getting a multithreaded application to run on
> > sparc-solaris7 (gcc-2.95.2, ld version 2.10 (with BFD 2.10)).
> > 
> > we found in the sun docs
> > ( http://docs.sun.com:80/ab2/coll.45.10/MTP/@Ab2PageView/14940?DwebQuery=thread&Ab2Lang=C&Ab2Enc=iso-8859-1 ),
> > that the linkage order of libc and libthread has to be -lpthread -lc.
> > 
> > So we are fixing now the link line in the makefiles to see if this helps.
> > 
> > The sunpro linker has an option `-mt' to ensure this order automatically.
> 
> If you use gcc, you can modify the specs file.

Modifying the specs file really should be the last resort, since you have to
remember doing it everytime you install GCC.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


More information about the Binutils mailing list