From 8a0fa577b1ad3cf682279acdc91f28c712a23574 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 21 Dec 2008 02:38:37 +0000 Subject: [PATCH] fPIC related improvements to Jamfile --- Jamfile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Jamfile b/Jamfile index e3ed7864a..3e5c204fb 100755 --- a/Jamfile +++ b/Jamfile @@ -110,10 +110,26 @@ rule linking ( properties * ) { if static in $(properties) { - result += /boost/thread//boost_thread/static - /boost/filesystem//boost_filesystem/static + if gcc in $(properties) && shared in $(properties) + { + result += on ; + } + + result += /boost/filesystem//boost_filesystem/static /boost/system//boost_system/static ; + + # if we're building a shared library + # we need to link dynamically against the + # pthread library + if on in $(properties) && linux in $(properties) + { + result += /boost/thread//boost_thread/shared ; + } + else + { + result += /boost/thread//boost_thread/static ; + } } else { @@ -251,6 +267,7 @@ feature test-coverage : off on : composite propagated ; feature fpic : off on : composite propagated link-incompatible ; feature.compose on : -fPIC ; +feature.compose off : darwin:-mdynamic-no-pic ; feature visibility : defeault hidden : composite propagated link-incompatible ; feature.compose hidden : -fvisibility=hidden ;