From bee7070da0aeb6e54a95c0eb65f6876d682d73f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Sun, 14 Apr 2024 00:30:40 -0400 Subject: [PATCH] Kernel: Do not use -mcmodel=large for x86_64 kernel Small position independent code model (which we end up using after this change) is suitable for us since the kernel is not expected to grow more than 2Gb in size. This might be a bit risky since this model is not mentioned anywhere except for System V ABI document but experiments show that the kernel compiled with this change works just fine. --- Kernel/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index 8ecf3b3a9e..b4a75a48da 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -697,7 +697,7 @@ macro (set_new_alignment alignment) endmacro() if ("${SERENITY_ARCH}" STREQUAL "x86_64") - add_compile_options(-mcmodel=large -mno-red-zone) + add_compile_options(-mno-red-zone) set_new_alignment(8) endif()