From 3a59644485688df928e0db6fe5b106438c67e80b Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Thu, 28 Mar 2024 11:24:33 +0800 Subject: [PATCH] build/cmake: kernel mode revision This fixes kernel mode regression caused by #12011 Signed-off-by: Yanfeng Liu --- arch/risc-v/src/common/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/risc-v/src/common/CMakeLists.txt b/arch/risc-v/src/common/CMakeLists.txt index 164d828bd6..c83f576c98 100644 --- a/arch/risc-v/src/common/CMakeLists.txt +++ b/arch/risc-v/src/common/CMakeLists.txt @@ -51,7 +51,9 @@ endif() if(NOT CONFIG_BUILD_FLAT) list(APPEND SRCS riscv_task_start.c riscv_pthread_start.c riscv_signal_dispatch.c) - target_sources(arch_interface PRIVATE riscv_signal_handler.S) + if(CONFIG_BUILD_PROTECTED) + target_sources(arch_interface PRIVATE riscv_signal_handler.S) + endif() endif() if(CONFIG_SCHED_BACKTRACE)