Index: gcc.jam =================================================================== --- gcc.jam (revision 77789) +++ gcc.jam (working copy) @@ -379,8 +379,10 @@ toolset.flags gcc.compile OPTIONS on : -g ; toolset.flags gcc.compile OPTIONS on : -pg ; -toolset.flags gcc.compile OPTIONS off : -fno-rtti ; +toolset.flags gcc.compile.c++ OPTIONS off : -fno-rtti ; +toolset.flags gcc.compile.c++ OPTIONS off : -fno-exceptions ; + rule setup-fpic ( targets * : sources * : properties * ) { local link = [ feature.get-values link : $(properties) ] ; Index: gcc.py =================================================================== --- gcc.py (revision 77789) +++ gcc.py (working copy) @@ -282,8 +282,10 @@ flags('gcc.compile', 'OPTIONS', ['on'], ['-g']) flags('gcc.compile', 'OPTIONS', ['on'], ['-pg']) -flags('gcc.compile', 'OPTIONS', ['off'], ['-fno-rtti']) +flags('gcc.compile.c++', 'OPTIONS', ['off'], ['-fno-rtti']) +flags('gcc.compile.c++', 'OPTIONS', ['off'], ['-fno-exceptions']) + # On cygwin and mingw, gcc generates position independent code by default, and # warns if -fPIC is specified. This might not be the right way of checking if # we're using cygwin. For example, it's possible to run cygwin gcc from NT