I don't have Solaris to test this on, but other people have sent me information regarding compiling and running POSIX threads programs on Solaris:

Roland Kletzing uses Sun's Forte compiler and suggests adding to CFLAGS:

-mt -R/usr/lib/lwp
for proper thread compilation, and
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
for large file support.

Dave Barstow uses GCC and adds the following nugget:

(-mt) is only applicable to the Sun Forte/Workshop compiler.
After compiling mgzip or lzop running below Solaris 9, you need /usr/lib/lwp adding to LD_LIBRARY_PATH otherwise it will freak out when you run it.

Field reporter Charles writes:

I finally figured out how to get mgzip working on Solaris 9. You need to add -lpthread to the CLIB line. This doesn't seem needed for Solaris 10.

So I added:
-lpthread -R/usr/lib/lwp to CLIB and

-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 to CFLAGS.

Compiled using GCC.

More info as it comes in.
--Dru