Skip to content

Commit

Permalink
os_test: C++: disable profiling (-pg)
Browse files Browse the repository at this point in the history
os_test includes C++ exception tests which are incompatible with ftrace
by design [1]. This commit makes sure the C++ tests are not compiled
with the profiling flag (-pg), which is the flag that one would use to
enable function tracing in TAs.

Link: [1] OP-TEE/optee_os#4022
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
  • Loading branch information
jforissier committed Aug 14, 2020
1 parent 58e3a83 commit d57b084
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ta/os_test/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d57b084

Please sign in to comment.