fix(system): fixed -fstack-protector issue on P4

During cpu_start stack-smashing would errorounsly trigger when compiled
with -Os on P4. This happened due to the stack canary value (stored in bss) changing when
we initialized bss and then getting flagged as a stackoverflow.

Disable fstack-protector for cpu_start to avoid this issue
This commit is contained in:
Marius Vikhammer
2024-01-25 11:12:21 +08:00
parent 8c1f5e6015
commit 21d0c65e52

View File

@@ -86,7 +86,7 @@ else()
# Disable stack protection in files which are involved in initialization of that feature
set_source_files_properties(
"startup.c" "stack_check.c"
"startup.c" "stack_check.c" "port/cpu_start.c"
PROPERTIES COMPILE_FLAGS
-fno-stack-protector)