diff --git a/arch/tricore/src/cmake/platform.cmake b/arch/tricore/src/cmake/platform.cmake index 6e5ae1e983..ce367e09cf 100644 --- a/arch/tricore/src/cmake/platform.cmake +++ b/arch/tricore/src/cmake/platform.cmake @@ -23,7 +23,9 @@ get_directory_property(TOOLCHAIN_DIR_FLAGS DIRECTORY ${CMAKE_SOURCE_DIR} set(NUTTX_EXTRA_FLAGS "") foreach(FLAG ${TOOLCHAIN_DIR_FLAGS}) if(NOT FLAG MATCHES "^\\$<.*>$") - list(APPEND NUTTX_EXTRA_FLAGS ${FLAG}) + if(NOT FLAG MATCHES "-nostdlib") + list(APPEND NUTTX_EXTRA_FLAGS ${FLAG}) + endif() else() string(REGEX MATCH "\\$<\\$:(.*)>" matched ${FLAG}) if(matched)