vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 61e79221f00d2f375279db770cc82f9e4d9e5d33
parent 45253cd24bdfafc6833bfc5673520b4ec5c33c54
Author: jvoisin <julien.voisin@dustri.org>
Date:   Wed, 14 Jan 2015 01:09:30 +0100

Add hardening flags for gcc and clang

Diffstat:
Mconfig.mk | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk @@ -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