Fixing -pthreads (Re: ports and -current)
Alex Keahan
agkeahan at yahoo.co.uk
Wed Sep 24 03:25:12 PDT 2003
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
More information about the freebsd-current
mailing list