1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 02:50:44 +00:00

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.
This commit is contained in:
Sönke Holz 2024-04-14 00:30:40 -04:00 committed by Andrew Kaster
parent b8c3e75573
commit bee7070da0

View File

@ -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()