From d8fd1be4f13f8f744b3a6eae1e4e633b405a8419 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Fri, 14 Feb 2025 16:55:45 -0500 Subject: build: Add Clang/LLVM toolchain support Added support for building with Clang/LLVM and made it the default since building a cross-compiling toolchain with GCC is generally less efficient. In `configure.ac`, `TOOLCHAIN` must be set to `clang` or `gcc`. Signed-off-by: Quinn Stephens Signed-off-by: Ian Moffett --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 41333c7..8a9db93 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,8 @@ KERN_CFLAGS_AMD64="-fexceptions --std=gnu11 -ffreestanding -fno-stack-protector -Werror=incompatible-pointer-types -Werror=int-to-pointer-cast \\ -Werror=return-type -Wunused -mabi=sysv -mno-80387 -mno-mmx -mno-3dnow \\ -mno-sse -mno-sse2 -mno-red-zone -mcmodel=kernel -pedantic \\ - -I sys/include/ -I sys/include/lib/ -D_KERNEL -Wno-pointer-sign -MMD" + -I sys/include/ -I sys/include/lib/ -D_KERNEL -Wno-pointer-sign -MMD \\ + -Wno-gnu-zero-variadic-macro-arguments -Wno-language-extension-token -Wno-tautological-constant-out-of-range-compare -Wno-c23-extensions" QEMU_FLAGS_AMD64="--enable-kvm -monitor stdio \\ -M q35 -m 1G -smp 4 -cpu host \\ @@ -23,5 +24,6 @@ AC_SUBST(KERNEL_CFLAGS, [$KERN_CFLAGS_AMD64]) AC_SUBST(QEMU_FLAGS, [$QEMU_FLAGS_AMD64]) AC_SUBST(QEMU, [qemu-system-x86_64]) AC_SUBST(ARCH, [amd64]) +AC_SUBST(TOOLCHAIN, [clang]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- cgit v1.2.3