This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 2493654a64809d43bf955d832002abb0f4261816 Author: zhangyu117 <[email protected]> AuthorDate: Wed Jun 24 10:58:37 2026 +0800 arch/tricore: support ubsan for tricore cmake build Add CONFIG_MM_UBSAN_ALL and CONFIG_MM_UBSAN_TRAP_ON_ERROR to the GCC cmake toolchain file, the makefile build already has them. Signed-off-by: zhangyu117 <[email protected]> --- arch/tricore/src/cmake/gcc.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/tricore/src/cmake/gcc.cmake b/arch/tricore/src/cmake/gcc.cmake index f923771509b..13955c535c1 100644 --- a/arch/tricore/src/cmake/gcc.cmake +++ b/arch/tricore/src/cmake/gcc.cmake @@ -147,6 +147,14 @@ endif() add_link_options(-Wl,--no-warn-rwx-segments) +if(CONFIG_MM_UBSAN_ALL) + add_compile_options(${CONFIG_MM_UBSAN_OPTION}) +endif() + +if(CONFIG_MM_UBSAN_TRAP_ON_ERROR) + add_compile_options(-fsanitize-undefined-trap-on-error) +endif() + if(CONFIG_MM_KASAN_INSTRUMENT_ALL) add_compile_options(-fsanitize=kernel-address) add_compile_options(--param=asan-stack=0)
