[Spread-users] Solaris cc compiler support

Theo Schlossnagle jesus at omniti.com
Wed Jan 28 20:00:06 EST 2004

On Jan 28, 2004, at 5:16 PM, Gayathri Dongre wrote:

> Hi
> I noticed that the Spread distribution as of version
> 3.16.1 claims to have the Makefile support to be
> compiled with Solaris cc compiler for Solaris 8.
> I'm however having trouble compiling 3.16.1 on a
> Solaris 8 box using the Sun Workshop compiler. Even
> after getting around the problem of *.to, *.lo etc
> being unacceptable extensions for this compiler, i'm
> encountering problems in generating the shared
> library. It generates the static library fine though.

Spread uses autoconf now.  So, it should be fixable with little effort. 
  Some of the key points to note:

Solaris cc uses -KPIC -DPIC instead of -fPIC to generate point 
invariant code suitable for building shared objects and libraries.  
Also, if you are running on a specific architecture and want to compile 
for that you can add things like:
   -xtarget=ultra -xarch=v9 -xcode=pic32

As for building shared libraries.  Spread doesn't use libtool -- just 
because I don't like it and I am the one who wrote the autoconf stuff.  
If someone were to add libtool support into Spread and not break 
anything, I'd wager the patch would be accepted.

Instead of "gcc -shared" to build the shared libraries, try: "ld -z 
text -G" as the shared link command.

> I'd appreciate any ideas about whether i should expect
> this compiler to work. I'm also curious about what
> exactly libtspread is?

tspread is for threaded programs.  It requires pthread mutexes for 
concurrent mailbox access in multiple threads.  If you use Spread in a 
non-threaded fashion, link against -lspread, otherwise compile with the 
-D_REENTRANT flag and link with -ltspread

// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on earth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1949 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20040128/1c75f84f/attachment.bin 

More information about the Spread-users mailing list