mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Kernel/aarch64: Add -mstrict-align flag to Kernel build
The ARM CPU is set up to trap on unaligned accesses, however the compiler will still generate them if this flag is not set. We also need the -Wno-cast-align as there are some files in AK that don't build without the flag.
This commit is contained in:
parent
0226390b21
commit
a473cfd71b
Notes:
sideshowbarker
2024-07-17 10:31:19 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/a473cfd71b Pull-request: https://github.com/SerenityOS/serenity/pull/16604 Reviewed-by: https://github.com/nico ✅
1 changed files with 4 additions and 0 deletions
|
@ -671,6 +671,10 @@ endif()
|
|||
|
||||
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
add_compile_options(-fno-threadsafe-statics)
|
||||
|
||||
# Unaligned memory access will cause a trap, so to make sure the compiler doesn't generate
|
||||
# those unaligned accesses, this flag is added.
|
||||
add_compile_options(-mstrict-align -Wno-cast-align)
|
||||
endif()
|
||||
|
||||
add_compile_definitions(KERNEL)
|
||||
|
|
Loading…
Add table
Reference in a new issue