1
0
forked from bip/bip

Add secure / strict CFLAGS

Ref: https://airbus-seclab.github.io/c-compiler-security/#gcc-tldr
This commit is contained in:
Loïc Gomez 2022-01-06 21:34:55 +01:00 committed by Pierre-Louis Bonicoli
parent e7d82acfff
commit fe108e390f
Signed by untrusted user: pilou
GPG Key ID: 06914C4A5EDAA6DD

View File

@ -27,4 +27,9 @@ bipmkpw_CFLAGS = ${OPENSSL_CFLAGS} $(AM_CFLAGS)
AM_YFLAGS= -d
BUILT_SOURCES = conf.c conf.h lex.c
AM_CFLAGS=-Wall -Wextra -Werror
AM_CFLAGS=-Wall -Wextra -Werror \
-O2 \
-D_FORTIFY_SOURCE=2 \
-fstack-protector-strong -fstack-clash-protection \
-Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-z,separate-code \
-Wpedantic -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-security -Wnull-dereference -Wstack-protector -Wtrampolines -Walloca -Wvla -Warray-bounds=2 -Wimplicit-fallthrough=3 -Wtraditional-conversion -Wshift-overflow=2 -Wcast-qual -Wstringop-overflow=4 -Wconversion -Warith-conversion -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wformat-signedness -Wshadow -Wstrict-overflow=4 -Wundef -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wstack-usage=1000000 -Wcast-align=strict