diff --git a/arch/tricore/include/tc3xx/irq.h b/arch/tricore/include/tc3xx/irq.h index a9b76965b68..6eafe64688b 100644 --- a/arch/tricore/include/tc3xx/irq.h +++ b/arch/tricore/include/tc3xx/irq.h @@ -119,12 +119,13 @@ #ifndef __ASSEMBLY__ struct xcptcontext { +#ifdef CONFIG_ENABLE_ALL_SIGNALS /* These are saved copies of the context used during * signal processing. */ uintptr_t *saved_regs; - +#endif /* Register save area with XCPTCONTEXT_SIZE, only valid when: * 1.The task isn't running or * 2.The task is interrupted diff --git a/arch/tricore/src/common/CMakeLists.txt b/arch/tricore/src/common/CMakeLists.txt index c0f55332edb..f3023df661b 100644 --- a/arch/tricore/src/common/CMakeLists.txt +++ b/arch/tricore/src/common/CMakeLists.txt @@ -36,8 +36,6 @@ set(SRCS tricore_registerdump.c tricore_releasestack.c tricore_saveusercontext.c - tricore_schedulesigaction.c - tricore_sigdeliver.c tricore_stackframe.c tricore_svcall.c tricore_tcbinfo.c @@ -45,6 +43,10 @@ set(SRCS tricore_systimer.c tricore_usestack.c) +if(CONFIG_ENABLE_ALL_SIGNALS) + list(APPEND SRCS tricore_schedulesigaction.c tricore_sigdeliver.c) +endif() + if(CONFIG_SPINLOCK) list(APPEND SRCS tricore_testset.c) endif() diff --git a/arch/tricore/src/common/Make.defs b/arch/tricore/src/common/Make.defs index 8dbfbffd427..5c0f5c8f785 100644 --- a/arch/tricore/src/common/Make.defs +++ b/arch/tricore/src/common/Make.defs @@ -37,8 +37,6 @@ CMN_CSRCS += tricore_nputs.c CMN_CSRCS += tricore_registerdump.c CMN_CSRCS += tricore_releasestack.c CMN_CSRCS += tricore_saveusercontext.c -CMN_CSRCS += tricore_schedulesigaction.c -CMN_CSRCS += tricore_sigdeliver.c CMN_CSRCS += tricore_stackframe.c CMN_CSRCS += tricore_svcall.c CMN_CSRCS += tricore_tcbinfo.c @@ -46,6 +44,10 @@ CMN_CSRCS += tricore_trapcall.c CMN_CSRCS += tricore_systimer.c CMN_CSRCS += tricore_usestack.c +ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y) +CMN_CSRCS += tricore_schedulesigaction.c tricore_sigdeliver.c +endif + ifeq ($(CONFIG_SPINLOCK),y) CMN_CSRCS += tricore_testset.c endif