diff --git a/arch/arm/src/cmake/Toolchain.cmake b/arch/arm/src/cmake/Toolchain.cmake index 3d3de23681..8039952d9d 100644 --- a/arch/arm/src/cmake/Toolchain.cmake +++ b/arch/arm/src/cmake/Toolchain.cmake @@ -184,11 +184,11 @@ endif() set(ARCHCFLAGS "-Wstrict-prototypes") set(ARCHCXXFLAGS "-nostdinc++") -if(CONFIG_CXX_EXCEPTION) +if(NOT CONFIG_CXX_EXCEPTION) string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new") endif() -if(CONFIG_CXX_RTTI) +if(NOT CONFIG_CXX_RTTI) string(APPEND ARCHCXXFLAGS " -fno-rtti") endif()