On Tue, 13 Apr 2004, Albert Chin wrote:
When linking a C program and using the Sun C compiler, we use the Sun
linker to create a shared libraries. The problem with this is if -mt
is passed to the Sun C compiler _without_ -lpthread/-lthread. From
cc(1):
-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 mul-
tiprocessor system. On a single-processor system, the
resulting executable usually runs more slowly with this
option.
So, to accommodate this, how about we use cc to create shared
libraries on Solaris?
This problem is not specific to Solaris. The same problem occurs on
Digital Unix, or any other OS where libtool doesn't currently use the
C compiler to link.