mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +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:
committed by
Sam Atkins
parent
0226390b21
commit
a473cfd71b
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user