From 5bb91feef945cb6bcf5a9f26f8e24ef77ce852ab Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 6 Oct 2012 20:24:00 +0000 Subject: [PATCH] Fix rtti=off and exception-handling=off for gcc. Patch from Alexey Nikitin. [SVN r80893] --- v2/tools/gcc.jam | 4 +++- v2/tools/gcc.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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