BuildSystem: GCC will now complain on functions with 1 KiB stack

This commit is contained in:
Bananymous 2023-04-12 00:18:06 +03:00
parent 0ee7da92a3
commit 370a958379
1 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,8 @@ set(KERNEL_SOURCES
icxxabi.cpp icxxabi.cpp
) )
#set(ENABLE_KERNEL_UBSAN True)
if(ENABLE_KERNEL_UBSAN) if(ENABLE_KERNEL_UBSAN)
set(KERNEL_SOURCES ${KERNEL_SOURCES} ubsan.cpp) set(KERNEL_SOURCES ${KERNEL_SOURCES} ubsan.cpp)
endif() endif()
@ -106,7 +108,7 @@ target_compile_definitions(kernel PUBLIC __arch=${BANAN_ARCH})
target_compile_options(kernel PUBLIC -O2 -g) target_compile_options(kernel PUBLIC -O2 -g)
target_compile_options(kernel PUBLIC -Wno-literal-suffix) target_compile_options(kernel PUBLIC -Wno-literal-suffix)
target_compile_options(kernel PUBLIC -fno-rtti -fno-exceptions) target_compile_options(kernel PUBLIC -fno-rtti -fno-exceptions)
target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -fno-omit-frame-pointer -mno-sse -mno-sse2) target_compile_options(kernel PUBLIC -fstack-protector -ffreestanding -Wall -Wextra -Werror=return-type -Wstack-usage=1024 -fno-omit-frame-pointer -mno-sse -mno-sse2)
if(ENABLE_KERNEL_UBSAN) if(ENABLE_KERNEL_UBSAN)
target_compile_options(kernel PUBLIC -fsanitize=undefined) target_compile_options(kernel PUBLIC -fsanitize=undefined)