Index: tools/build/v2/tools/gcc.jam =================================================================== --- tools/build/v2/tools/gcc.jam (revision 50187) +++ tools/build/v2/tools/gcc.jam (working copy) @@ -118,6 +118,8 @@ } } + configure-version-specific $(version) ; + local condition ; if $(flavor) { @@ -214,6 +216,20 @@ rc.configure $(rc) : $(condition) : $(rc-type) ; } +rule configure-version-specific ( version ) +{ + if [ MATCH ^("4.*") : $(version) ] + { + toolset.flags gcc.compile OPTIONS on : -fvisibility=hidden ; + toolset.flags gcc.compile OPTIONS off : -fvisibility=default ; + toolset.flags gcc.compile OPTIONS inlines : -fvisibility-inlines-hidden ; + } + if [ MATCH ^("4.3.*") : $(version) ] + { + toolset.flag gcc.compile OPTIONS ms-compat : -fvisibility-ms-compat ; + } +} + if [ os.name ] = NT { # This causes single-line command invocation to not go through .bat files, Index: tools/build/v2/tools/darwin.jam =================================================================== --- tools/build/v2/tools/darwin.jam (revision 50187) +++ tools/build/v2/tools/darwin.jam (working copy) @@ -71,7 +71,11 @@ x86/ power/32 power/64 - power/ ; + power/ + on + off + ms-compat + inlines ; # Options: # Index: tools/build/v2/tools/builtin.jam =================================================================== --- tools/build/v2/tools/builtin.jam (revision 50187) +++ tools/build/v2/tools/builtin.jam (working copy) @@ -289,6 +289,9 @@ # Used to select a specific variant of C++ ABI if the compiler supports several. feature.feature c++abi : : propagated optional ; +# Hide symbols +feature.feature hide-symbols : on off ms-compat inlines : optional free composite ; + feature.feature conditional : : incidental free ; # The value of 'no' prevents building of a target.