x86_64/common/Toolchain.defs: change optimization to -Os for CONFIG_DEBUG_FULLOPT

change optimization to -Os for CONFIG_DEBUG_FULLOPT to be compatible with other architectures
and add an option to select CONFIG_DEBUG_CUSTOMOPT

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-02-26 08:18:48 +01:00 committed by Alan Carvalho de Assis
parent 3a3341ba0e
commit b3c4f3afc3
1 changed files with 4 additions and 4 deletions

View File

@ -22,10 +22,10 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += -O2 -fno-optimize-sibling-calls
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-crossjumping
ARCHOPTIMIZATION += -fno-delete-null-pointer-checks
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
ARCHOPTIMIZATION += -Os
endif
ARCHCPUFLAGS = -fPIC -fno-stack-protector -mno-red-zone -mrdrnd