From c2859bc7aa4f5db28fab269cf1d956b3130e052d Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Sat, 11 Sep 2021 22:08:45 +0900 Subject: [PATCH] cmake: compiler: Add nostdincxx property for gcc This commit adds the `nostdincxx` C++ compiler property for GCC, which is specified when the C++ standard library (`CONFIG_LIB_CPLUSPLUS`) is disabled. Signed-off-by: Stephanos Ioannidis --- cmake/compiler/gcc/compiler_flags.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/compiler/gcc/compiler_flags.cmake b/cmake/compiler/gcc/compiler_flags.cmake index 4e8883992de..a2f3020b8a1 100644 --- a/cmake/compiler/gcc/compiler_flags.cmake +++ b/cmake/compiler/gcc/compiler_flags.cmake @@ -120,6 +120,8 @@ if (NOT CONFIG_NEWLIB_LIBC AND set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC}) endif() +set_compiler_property(TARGET compiler-cpp PROPERTY nostdincxx "-nostdinc++") + # Required C++ flags when using gcc set_property(TARGET compiler-cpp PROPERTY required "-fcheck-new")