From 0a5df8e6191a1c8b010a5a630605ca64f68eacd1 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Tue, 9 Apr 2024 19:42:02 +0200 Subject: [PATCH] WIP support compiling with clang needed unless KernelFWholeProgram is fixed Signed-off-by: Axel Heider --- settings.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/settings.cmake b/settings.cmake index 54af1d77..eb53c4ab 100644 --- a/settings.cmake +++ b/settings.cmake @@ -64,7 +64,14 @@ if(NOT Sel4benchAllowSettingsOverride) # This option is controlled by ApplyCommonReleaseVerificationSettings mark_as_advanced(CMAKE_BUILD_TYPE) if(RELEASE) - if(NOT KernelArchRiscV) + # Known issues with KernelFWholeProgram ('-fwhole-program'): + # - the RISC-V kernel build with gcc currently fails due to a missing + # compiler runtime helper function. + # - this option is not supposed by 'clang' at all. Note that we can't + # check CMAKE_C_COMPILER_ID here, because it is empty, as this file + # might get processed before CMake does any compiler evaluation. Thus, + # the only option is checking if TRIPLE is set or not. + if((NOT KernelArchRiscV) AND (TRIPLE STREQUAL "")) set(KernelFWholeProgram ON CACHE BOOL "" FORCE) endif() endif()