Boost logo

Boost-Build :

From: Boris Gubenko (Boris.Gubenko_at_[hidden])
Date: 2007-03-23 09:00:12


David Abrahams wrote:
> Is GCC available on HPUX and if people use gcc there does the same
> logic apply?

  GCC is available on HP-UX and the same logic applies. From g++ manpage:

      -pthreads
          Add support for multithreading using the POSIX threads library.
          This option sets flags for both the preprocessor and linker. This
          option does not affect the thread safety of object code produced
          by the compiler or that of libraries supplied with it.

  A quick experiment confirms that, like aC++, g++ automatically adds
  pthread library to the link when compiled/linked -pthread:

bash-2.03$ g++ -v x.o 2>&1 | (grep -q "\-lpthread" ; echo $?)
1
bash-2.03$ g++ -v x.o 2>&1 -pthread | (grep -q "\-lpthread" ; echo $?)
0
bash-2.03$

> Or do I need
>
> <toolset>gcc:<library>pthread

  No, you don't.

  Thanks for looking into it!
    Boris

----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: <boost-build_at_[hidden]>
Sent: Friday, March 23, 2007 12:44 AM
Subject: Re: [Boost-build] How to deal with debug-python?

>
> on Fri Mar 23 2007, "Boris Gubenko" <Boris.Gubenko-AT-hp.com> wrote:
>
>> While we are dealing with HP-UX - specific code in python.jam, can
>> you do me a favour and remove 'pthread' on line 602:
>>
>> case hpux : return pthread rt ;
>>
>> It was me who added 'pthread' in the previous incarnation of python.jam:
>>
>> case HPUX :
>> {
>> extra-libs = pthread rt ;
>> }
>>
>> and it was a mistake. As stated in
>>
>> <http://docs.hp.com/en/8759/options.htm#opt-mt>
>>
>> the aC++ driver takes care of linking against pthread library when
>> appropriate. In the best case, explicit -lpthread is redundant. In
>> the worst case, if the program was compiled without -mt, forcing
>> pthread to the link is illegal and may lead to runtime error:
>>
>> aCC runtime: Use of "-mt" must be consistent during both compilation
>> and linking.
>>
>> If you could remove this erroneous 'pthread' on line 602, it would be
>> great. It is a safe change because it only affects HP-UX platform.
>
> Is GCC available on HPUX and if people use gcc there does the same
> logic apply? Or do I need
>
> <toolset>gcc:<library>pthread
>
> ??
>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk