You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2025/07/21 11:21:08 UTC
(nuttx) branch master updated: cmake(bugfix):add missing c++ toolchain search path
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 956a50bb7d cmake(bugfix):add missing c++ toolchain search path
956a50bb7d is described below
commit 956a50bb7d18fae82e95d96b4072e90b955c88a2
Author: xuxin19 <xu...@xiaomi.com>
AuthorDate: Sun Jul 20 14:10:28 2025 +0800
cmake(bugfix):add missing c++ toolchain search path
when libcxx or uClib++ is not selected, we use the default NUTTX cxx
Signed-off-by: xuxin19 <xu...@xiaomi.com>
---
arch/arm/src/cmake/gcc.cmake | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/src/cmake/gcc.cmake b/arch/arm/src/cmake/gcc.cmake
index ea2a03098b..fa253d2400 100644
--- a/arch/arm/src/cmake/gcc.cmake
+++ b/arch/arm/src/cmake/gcc.cmake
@@ -247,10 +247,8 @@ if(CONFIG_BUILD_PIC)
add_link_options(-Wl,--emit-relocs)
endif()
-add_compile_options(
- -Wno-attributes -Wno-unknown-pragmas
- $<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
- $<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
+add_compile_options(-Wno-attributes -Wno-unknown-pragmas
+ $<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>)
# When all C++ code is built using GCC 7.1 or a higher version, we can safely
# disregard warnings of the type "parameter passing for X changed in GCC 7.1."
@@ -259,6 +257,10 @@ add_compile_options(
add_compile_options(-Wno-psabi)
+if(NOT CONFIG_LIBCXXTOOLCHAIN)
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
+endif()
+
if(CONFIG_CXX_STANDARD)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=${CONFIG_CXX_STANDARD}>)
endif()