diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-01-17 09:27:42 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-01-17 09:27:42 +0100 |
| commit | e03ce9ae5a8ee6b460b2766b7adc756a91924494 (patch) | |
| tree | e780a8c4945c1fb9507dd85997ff838fceb3c138 | |
| parent | 38fc17befacfea70e12ab9244b90cfa8bc2e08c8 (diff) | |
| parent | a83c61a66ea7a0bfc21d86fddc9ea5325c86ac24 (diff) | |
| download | vis-e03ce9ae5a8ee6b460b2766b7adc756a91924494.tar.gz vis-e03ce9ae5a8ee6b460b2766b7adc756a91924494.tar.xz | |
Merge branch 'hardening' of https://github.com/jvoisin/vis
| -rw-r--r-- | config.mk | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -33,3 +33,12 @@ DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -Wno-missing-field- CC ?= cc STRIP ?= strip + +# Hardening +ifeq (${CC},gcc) + CFLAGS += -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 + LDFLAGS += -z now -z relro -pie +else ifeq (${CC},clang) + CFLAGS += -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2 + LDFLAGS += -z now -z relro -pie +endif |
