1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

Kernel: Add -mgeneral-regs-only flag to aarch64 Kernel build

With the update to GCC 12.1.0, the compiler now vectorizes code with
-O2. This causes vector ops to be emitted, which are not supported in
the Kernel. Add the -mgeneral-regs-only flag to force the compiler to
not emit floating-point and SIMD ops.
This commit is contained in:
Timon Kruiper 2022-05-14 13:50:07 +02:00 committed by Linus Groh
parent cc7723b6c4
commit 9f3303c869

View file

@ -461,9 +461,13 @@ endif()
add_compile_options(-fsigned-char) add_compile_options(-fsigned-char)
add_compile_options(-Wno-unknown-warning-option -Wvla -Wnull-dereference) add_compile_options(-Wno-unknown-warning-option -Wvla -Wnull-dereference)
add_compile_options(-fno-rtti -ffreestanding -fbuiltin) add_compile_options(-fno-rtti -ffreestanding -fbuiltin)
if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64") if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
add_compile_options(-mno-80387 -mno-mmx -mno-sse -mno-sse2) add_compile_options(-mno-80387 -mno-mmx -mno-sse -mno-sse2)
elseif("${SERENITY_ARCH}" STREQUAL "aarch64")
add_compile_options(-mgeneral-regs-only)
endif() endif()
add_compile_options(-fno-asynchronous-unwind-tables) add_compile_options(-fno-asynchronous-unwind-tables)
add_compile_options(-fstack-protector-strong) add_compile_options(-fstack-protector-strong)
add_compile_options(-fno-exceptions) add_compile_options(-fno-exceptions)