vis

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

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

commit 16eced4d4572d265e0e734cd603fc4f0a573fe20
parent 9b2d63f41a2eda60ef072c3317f239132bc35d2a
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 21 Mar 2016 16:40:18 +0100

configure: probe for hardening flags

Diffstat:
Mconfigure | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure b/configure @@ -198,7 +198,7 @@ tryflag CFLAGS_TRY -Werror=unused-command-line-argument tryldflag LDFLAGS_TRY -Werror=unknown-warning-option tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument -CFLAGS_STD="-std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG" +CFLAGS_STD="-std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG -D_FORTIFY_SOURCE=2" LDFLAGS_STD="-lc" OS=$(uname) @@ -217,6 +217,13 @@ tryflag CFLAGS_AUTO -Os #tryflag CFLAGS_AUTO -fdata-sections #tryldflag LDFLAGS_AUTO -Wl,--gc-sections +# Try hardening flags +tryflag CFLAGS_AUTO -fPIE +tryflag CFLAGS_AUTO -fstack-protector-all +tryldflag LDFLAGS_AUTO "-z now" +tryldflag LDFLAGS_AUTO "-z relro" +tryldflag LDFLAGS_AUTO -pie + have_pkgconfig=no printf "checking for pkg-config... " cmdexists pkg-config && have_pkgconfig=yes