From 944916628f4f09b62ab18c3fa87fabf8d38475da Mon Sep 17 00:00:00 2001 From: Kent McLeod Date: Thu, 15 Feb 2024 23:09:06 +1100 Subject: [PATCH] elfloader: Only include driver source on arm RISC-V platforms don't use any extension drivers currently so it's not useful to compile and link them in when not building for arm. Signed-off-by: Kent McLeod --- elfloader-tool/CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/elfloader-tool/CMakeLists.txt b/elfloader-tool/CMakeLists.txt index ac747c94..99bf0997 100644 --- a/elfloader-tool/CMakeLists.txt +++ b/elfloader-tool/CMakeLists.txt @@ -164,14 +164,22 @@ elseif(KernelSel4ArchAarch32) add_compile_options(-mno-unaligned-access) endif() -file( - GLOB - files - src/*.c +if(KernelArchARM) + # Only the Arm arch uses extension drivers. + set( + driver_file_globs src/drivers/*.c src/drivers/smp/*.c src/drivers/uart/*.c src/drivers/timer/*.c + ) +endif() + +file( + GLOB + files + src/*.c + ${driver_file_globs} src/utils/*.c src/arch-${KernelArch}/*.c src/arch-${KernelArch}/*.S