1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 07:51:19 +01:00

native: add stack smashing protection

When `DEVELHELP` is defined, add `-fstack-protector-all`.
This commit is contained in:
Ludwig Ortmann 2014-08-13 07:47:00 +02:00
parent 1d2a10fbc4
commit db6d6ae95e

View File

@ -24,8 +24,11 @@ export VALGRIND ?= valgrind
export CGANNOTATE ?= cg_annotate
export GPROF ?= gprof
# flags:
# basic cflags:
export CFLAGS += -Wall -Wextra -pedantic -m32
ifneq (,$(filter -DDEVELHELP,$(CFLAGS)))
export CFLAGS += -fstack-protector-all
endif
ifeq ($(shell uname -s),FreeBSD)
ifeq ($(shell uname -m),amd64)
export CFLAGS += -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32