Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2003 11:25:11 +0100 (BST)
From:      =?iso-8859-1?q?Alex=20Keahan?= <agkeahan@yahoo.co.uk>
To:        freebsd-current@freebsd.org
Subject:   Re: Fixing -pthreads (Re: ports and -current)
Message-ID:  <20030924102511.48634.qmail@web20705.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Why don't we make -pthread link to the *default*
thread library (kse)?

Solaris has a similar -mt option:

-mt  Passes D_REENTRANT to preprocessor. Appends
     -lthread after all other user-specified libraries
on
     the command line.  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 multiprocessor system. On
a
     single-processor system, the resulting executable
     usually runs more slowly with this option.

Solaris 8 also has two pthread libraries, M:N and 1:1,
located in /usr/lib and /usr/lib/lwp, respectively.  
It
defaults to M:N, but the alternate libpthread can be
selected at runtime by setting the dynamic linker
search path as follows:

LD_LIBRARY_PATH=/usr/lib/lwp (32-bit)
LD_LIBRARY_PATH_64=/usr/lib/lwp/sparcv9 (64-bit)

Alternatively, the runpath can be specified at link
time:

cc -mt ... -R /usr/lib/lwp (32-bit)
cc -mt ... -R /usr/lib/lwp/sparcv9 (64-bit)

Alex Keahan


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030924102511.48634.qmail>