diff --git a/ta/os_test/sub.mk b/ta/os_test/sub.mk index f9a04f5ff..6f230c05a 100644 --- a/ta/os_test/sub.mk +++ b/ta/os_test/sub.mk @@ -9,6 +9,12 @@ srcs-y += os_test.c srcs-y += ta_entry.c srcs-$(CFG_TA_FLOAT_SUPPORT) += test_float_subj.c ifneq ($(COMPILER),clang) +# Profiling (-pg) is disabled for C++ tests because in case it is used for +# function tracing (CFG_FTRACE_SUPPORT=y) then the exception handling code in +# the C++ runtime won't be able to unwind the (modified) stack. +# https://github.com/OP-TEE/optee_os/issues/4022 srcs-y += cxx_tests.cpp +cxxflags-remove-cxx_tests.cpp-y += -pg srcs-y += cxx_tests_c.c +cflags-remove-cxx_tests_c.c-y += -pg endif