[Top][All Lists]

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

[patch #7666] ax_pthread macro fails for C++ on Solaris

From: Daniel Richard G.
Subject: [patch #7666] ax_pthread macro fails for C++ on Solaris
Date: Mon, 21 Nov 2011 23:33:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.10 Chromium/14.0.835.202 Chrome/14.0.835.202 Safari/535.1

Follow-up Comment #3, patch #7666 (project autoconf-archive):

> What does PTHREAD_CFLAGS and PTHREAD_LIBS return without this patch?

On both a 64-bit Solaris 8 system, and a 64-bit/AMD64 Solaris 10 system here:

    PTHREAD_CC = cc
    PTHREAD_LIBS = -lpthread

But then, things aren't as simple as they seem. From the cc(1) man page:

 -mt  Passes D_REENTRANT to preprocessor.  Appends  -lthread.
      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

So potentially, for the Solaris compiler, -D_REENTRANT is redundant and -mt is
also needed in PTHREAD_LIBS...


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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