diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-05-24 13:32:04 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-05-24 13:40:36 +0200 |
commit | 37dd6912701cb16f6339af97216e159c3f9038ee (patch) | |
tree | 3523b2941175a1d35d74ae25e77fd06fef0297e3 | |
parent | 97d26b9ee4bffda96e74fd1379cdddd47adbaf49 (diff) |
make: minor update in cflags
Add -z relro for linking, move --param ssp-buffer-size=4 to stack
protector flag, and more.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -38,7 +38,8 @@ endif # For packaging purposes, you might want to call your own: # make CFLAGS="<flags>" -CFLAGS_DEF = -fstack-protector +CFLAGS_DEF = -fstack-protector-all -Wstack-protector +CFLAGS_DEF += --param=ssp-buffer-size=4 ifeq ($(DEBUG), 1) CFLAGS_DEF += -g CFLAGS_DEF += -O2 @@ -46,13 +47,13 @@ else CFLAGS_DEF += -march=native CFLAGS_DEF += -mtune=native CFLAGS_DEF += -O3 - CFLAGS_DEF += -fpie + CFLAGS_DEF += -fPIE -pie CFLAGS_DEF += -pipe CFLAGS_DEF += -fomit-frame-pointer + CFLAGS_DEF += -Wl,-z,relro,-z,now endif -CFLAGS_DEF += --param=ssp-buffer-size=4 CFLAGS_DEF += -fno-strict-aliasing -CFLAGS_DEF += -fexceptions +CFLAGS_DEF += -fexceptions -ftrapv CFLAGS_DEF += -fasynchronous-unwind-tables CFLAGS_DEF += -fno-delete-null-pointer-checks CFLAGS_DEF += -D_FORTIFY_SOURCE=2 |