firmware: qmod-dfu: disable stack protector

Prevent build failure on debian 9, ubuntu 20.04, 20.10, where
bin/qmod-dfu-flash.elf does not fit the ROM.

Fixes: OS#5081
Change-Id: I9fffe4c323094679062428f41a4246b1c1b30ca2
This commit is contained in:
Oliver Smith 2021-04-07 15:19:00 +02:00
parent 7a3d93682f
commit 9e0e0ddd5a
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,11 @@ OUTPUT = $(BOARD)-$(APP)
BIN = bin
OBJ = obj/$(BOARD)
# Disable stack protector for code in small ROM regions (OS#5081)
ifeq ($(BOARD)-$(APP), qmod-dfu)
CFLAGS_EXTRA ?= -fno-stack-protector
endif
#-------------------------------------------------------------------------------
# Tools
#-------------------------------------------------------------------------------
@ -178,6 +183,7 @@ CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_L
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)
CFLAGS += $(CFLAGS_EXTRA)
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
LDFLAGS = -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=ResetException -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--print-memory-usage -Wl,--no-undefined $(LIB)
#LD_OPTIONAL=-Wl,--print-gc-sections -Wl,--stats