diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 52b03c37e..167da17a3 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -381,7 +381,9 @@ toolset.flags gcc.compile OPTIONS on : -Werror ; 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 * ) { diff --git a/v2/tools/gcc.py b/v2/tools/gcc.py index b0aba1d29..70dd9ea72 100644 --- a/v2/tools/gcc.py +++ b/v2/tools/gcc.py @@ -282,7 +282,9 @@ flags('gcc.compile', 'OPTIONS', ['on'], ['-Werror']) 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