[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC with '-threads' on SOLARIS not supported by

From: Eric PAIRE
Subject: Re: GCC with '-threads' on SOLARIS not supported by
Date: Thu, 08 Jun 2006 17:20:11 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0


The threads(3THR) manual page for Solaris specifies:

    cc -mt [ flag... ] file...- lpthread [ -lposix4 library... ]
    cc - mt [ flag... ] file...[ library... ]

But, if you read closely, you will see that the page refers to 'cc' and not 'gcc' :-(, and if you read the specs files of 'gcc', you will discover that gcc refuses the '-mt' flag but accepts '-pthreads' flag when compiling for POSIX threads, and '-threads' one when compiling for SOLARIS threads, without having to add '-lpthread' (which is much simpler IMHO).

The problem now with, is that it recognizes '-pthreads' and '-mt' flags (and plenty other ones) , but not '-threads' one (probably because nobody uses SOLARIS threads with libtool and gcc).

Hope this clarifies my request,

Bob Friesenhahn wrote:

On Thu, 8 Jun 2006, Eric PAIRE wrote:

I try to use libtool with a SOLARIS multithreaded library using SOLARIS threads (not PTRHEADS) and gcc. It occurs that the option to use with gcc '-threads' is not taken into account by, whereas '-mt' (the one to be used with Sun CC) is. I read in the latest version (1.5.22) that the problem is still present.

I suggest that you read the threads(3THR) manual page for Solaris. It will become clear within the first paragraph. I promise!

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]