backport fix for attaching -pthreads to cxxflags on solaris

This commit is contained in:
Dane Springmeyer 2010-10-12 05:43:54 +00:00
parent f1caa3bbd4
commit 790837f344

View file

@ -854,6 +854,12 @@ if not preconfigured:
if env['THREADING'] == 'multi':
BOOST_LIBSHEADERS.append(['thread', 'boost/thread/mutex.hpp', True])
# on solaris the configure checks for boost_thread
# require the -pthreads flag to be able to check for
# threading support, so we add as a global library instead
# of attaching to cxxflags after configure
if env['PLATFORM'] == 'SunOS':
env.Append(CXXFLAGS = '-pthreads')
# if requested, sort LIBPATH and CPPPATH before running CheckLibWithHeader tests
if env['PRIORITIZE_LINKING']:
@ -1009,8 +1015,6 @@ if not preconfigured:
# but will retain logic for future use
#if platform.mac_ver()[0].startswith('10.5'):
# common_cxx_flags += '-DOSX_LEOPARD '
elif env['PLATFORM'] == 'SunOS':
pthread = '-pthreads'
else:
pthread = '-pthread'