[PATCH master] RISC-V: cpu: fix build with CONFIG_RISCV_EXCEPTIONS=n
Ahmad Fatoum
ahmad at a3f.at
Sat Dec 4 05:08:54 PST 2021
Building without CONFIG_RISCV_EXCEPTIONS causes a compile error, because
of a definition mismatch. data_abort_mask is a no-op without exception
support, but interrupt.c defines it as a different type of symbol. Skip
interrupt.c compilation to fix the build error.
Reported-by: Yann Sionneau <ysionneau at kalray.eu>
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
arch/riscv/cpu/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/cpu/Makefile b/arch/riscv/cpu/Makefile
index 717baaaaa727..d79bafc6f142 100644
--- a/arch/riscv/cpu/Makefile
+++ b/arch/riscv/cpu/Makefile
@@ -2,6 +2,8 @@
obj-y += core.o time.o
obj-$(CONFIG_HAS_DMA) += dma.o
+ifeq ($(CONFIG_RISCV_EXCEPTIONS),y)
obj-pbl-$(CONFIG_RISCV_M_MODE) += mtrap.o
obj-pbl-$(CONFIG_RISCV_S_MODE) += strap.o
obj-pbl-y += interrupts.o
+endif
--
2.33.0
More information about the barebox
mailing list