From 0725406d48a955b93ec55facba39b9420f53d01e Mon Sep 17 00:00:00 2001 From: Ivan-Velickovic Date: Wed, 13 Sep 2023 17:30:17 +1000 Subject: [PATCH] Use specific AArch64 toolchain when compiling seL4 The seL4 build system is configured to find installations of compilers on the host, meaning that the `aarch64-none-elf-` toolchain that we use might not be used when building seL4 depending on what other toolchains are installed. Signed-off-by: Ivan-Velickovic --- build_sdk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_sdk.py b/build_sdk.py index 0223fddfd..4f097da7c 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -26,6 +26,10 @@ MICROKIT_EPOCH = 1616367257 +# Due to only supporting AArch64 (for now), we hard-code +# the prefix of the toolchain used to compile seL4. +TOOLCHAIN_PREFIX = "aarch64-none-elf-" + KERNEL_CONFIG_TYPE = Union[bool, str] KERNEL_OPTIONS = Dict[str, KERNEL_CONFIG_TYPE] @@ -187,6 +191,7 @@ def build_sel4( cmd = ( f"cmake -GNinja -DCMAKE_INSTALL_PREFIX={sel4_install_dir.absolute()} "\ f" -DPYTHON3={executable} " \ + f" -DCROSS_COMPILER_PREFIX={TOOLCHAIN_PREFIX}" \ f" -DKernelPlatform={platform} {config_str} " \ f"-S {sel4_dir.absolute()} -B {sel4_build_dir.absolute()}")