[thread] Patch for boost/config/platform/hpux.hpp

Hi, On HP-UX for toolset *acc*(aCC 6.13) Boost.Threads fails to build without the hardcoded *-mt* flag in RC_1_34_0/tools/build/v2/tools/acc.jam for following actions: 1.acc.link bind NEEDLIBS 2.acc.link.dll bind NEEDLIBS 3.acc.compile.c 4.acc.compile.c++ Below mentioned patch defines the macro "BOOST_HAS_THREADS" in boost/config/platform/hpux.hpp for toolset *acc* and does away with the necessity of having to hardcode *-mt* flag. ---------------------------------------------------------------------------- 38a39
# define BOOST_HAS_THREADS
regards, Prashant Thakre

Prashant Thakre wrote:
Hi, On HP-UX for toolset *acc*(aCC 6.13) Boost.Threads fails to build without the hardcoded *-mt* flag in RC_1_34_0/tools/build/v2/tools/acc.jam for following actions: 1.acc.link bind NEEDLIBS 2.acc.link.dll bind NEEDLIBS 3.acc.compile.c 4.acc.compile.c++
Below mentioned patch defines the macro "BOOST_HAS_THREADS" in boost/config/platform/hpux.hpp for toolset *acc* and does away with the necessity of having to hardcode *-mt* flag.
I'm wary of that, is the compiler *and* std lib really thread safe without this? Looking at the docs here http://docs.hp.com/en/8759/options.htm#opt-mt it seems that using -mt is the only sure-fire way to ensure thread safety throughout. John.

As John said: compiling -mt (which results in _REENTRANT and _RW_MULTI_THREAD macros being set) is the *only* way to ensure thread safety. See http://article.gmane.org/gmane.comp.lib.boost.devel/147160/ for more details. Thanks, Boris ----- Original Message ----- From: "Prashant Thakre" <prashant.thakre@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, February 27, 2007 1:04 PM Subject: [boost] [thread] Patch for boost/config/platform/hpux.hpp
Hi, On HP-UX for toolset *acc*(aCC 6.13) Boost.Threads fails to build without the hardcoded *-mt* flag in RC_1_34_0/tools/build/v2/tools/acc.jam for following actions: 1.acc.link bind NEEDLIBS 2.acc.link.dll bind NEEDLIBS 3.acc.compile.c 4.acc.compile.c++
Below mentioned patch defines the macro "BOOST_HAS_THREADS" in boost/config/platform/hpux.hpp for toolset *acc* and does away with the necessity of having to hardcode *-mt* flag.
---------------------------------------------------------------------------- 38a39
# define BOOST_HAS_THREADS
regards, Prashant Thakre
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 28/02/07, Boris Gubenko <Boris.Gubenko@hp.com> wrote:
As John said: compiling -mt (which results in _REENTRANT and _RW_MULTI_THREAD macros being set) is the *only* way to ensure thread safety.
Actually, I was refering to the *-mt* flag which is hardcoded in acc.jam i.e. there is no way to build single threaded libraries on HP-UX. Command line is always: "aCC -mt +DD64". Please see acc.jam.
See http://article.gmane.org/gmane.comp.lib.boost.devel/147160/ for more details. From the link: [John] If so then BOOST_HAS_THREADS should get turned on automatically when building in multithread-mode *only* in boost/config/suffix.hpp.
This fails to happen if I remove the hardcoded *-mt* flag and instead instruct bjam to build both sinlge and multi threaded versions of the libraries. Problems with bjam probably ? Seems like it's not passing *-mt* flag to the compiler for multi-threaded build.
Thanks, Boris
-- regards, Prashant Thakre

Prashant Thakre wrote:
Actually, I was refering to the *-mt* flag which is hardcoded in acc.jam i.e. there is no way to build single threaded libraries on HP-UX. Command line is always: "aCC -mt +DD64". Please see acc.jam.
I know that -mt and +DD64 are hard-coded in acc.jam, I think, we discussed it before. Making them features is on my list, but not as a high-priority task. Certainly, not before HP-UX/aCC6 is completely green. Of course, any help is welcome.
From the link: [John] If so then BOOST_HAS_THREADS should get turned on automatically when building in multithread-mode *only* in boost/config/suffix.hpp.
This fails to happen if I remove the hardcoded *-mt* flag and instead instruct bjam to build both sinlge and multi threaded versions of the libraries. Problems with bjam probably ? Seems like it's not passing *-mt* flag to the compiler for multi-threaded build.
Volodya can give you definitive answer. Thanks, Boris ----- Original Message ----- From: "Prashant Thakre" <prashant.thakre@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, February 27, 2007 2:12 PM Subject: Re: [boost] [thread] Patch for boost/config/platform/hpux.hpp
On 28/02/07, Boris Gubenko <Boris.Gubenko@hp.com> wrote:
As John said: compiling -mt (which results in _REENTRANT and _RW_MULTI_THREAD macros being set) is the *only* way to ensure thread safety.
Actually, I was refering to the *-mt* flag which is hardcoded in acc.jam i.e. there is no way to build single threaded libraries on HP-UX. Command line is always: "aCC -mt +DD64". Please see acc.jam.
See http://article.gmane.org/gmane.comp.lib.boost.devel/147160/ for more details. From the link: [John] If so then BOOST_HAS_THREADS should get turned on automatically when building in multithread-mode *only* in boost/config/suffix.hpp.
This fails to happen if I remove the hardcoded *-mt* flag and instead instruct bjam to build both sinlge and multi threaded versions of the libraries. Problems with bjam probably ? Seems like it's not passing *-mt* flag to the compiler for multi-threaded build.
Thanks, Boris
-- regards, Prashant Thakre _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 28/02/07, Boris Gubenko <Boris.Gubenko@hp.com> wrote:
I know that -mt and +DD64 are hard-coded in acc.jam, I think, we discussed it before. Making them features is on my list, but not as a high-priority task. Certainly, not before HP-UX/aCC6 is completely green. Of course, any help is welcome.
Guess, I took a short cut by defining the macro *BOOST_HAS_THREADS*
From the link: [John] If so then BOOST_HAS_THREADS should get turned on automatically when building in multithread-mode *only* in boost/config/suffix.hpp.
This fails to happen if I remove the hardcoded *-mt* flag and instead instruct bjam to build both sinlge and multi threaded versions of the libraries. Problems with bjam probably ? Seems like it's not passing *-mt* flag to the compiler for multi-threaded build.
Volodya can give you definitive answer.
Please see: http://thread.gmane.org/gmane.comp.lib.boost.build/15204 for more details.
Thanks, Boris -- regards, Prashant Thakre
participants (3)
-
Boris Gubenko
-
John Maddock
-
Prashant Thakre