From 1a7ca5af5c13a619acccc3ecca91bafc7002a16c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 24 Aug 2015 03:02:36 +0200 Subject: [PATCH] Build with SSP and PIE by default --- src/project.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/project.conf b/src/project.conf index 64eb6ca..f7d068f 100644 --- a/src/project.conf +++ b/src/project.conf @@ -1,8 +1,8 @@ targets=libcpp,cpp cppflags_force=-I ../include cppflags= -cflags_force=-W `pkg-config --cflags libSystem` -cflags=-Wall -g -O2 -pedantic +cflags_force=`pkg-config --cflags libSystem` +cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all ldflags_force=`pkg-config --libs libSystem` ldflags= dist=Makefile,common.h,parser.h @@ -26,6 +26,7 @@ depends=common.h,../include/CPP.h type=binary sources=main.c depends=$(OBJDIR)libcpp.so +cflags=-fPIE ldflags=-L$(OBJDIR). -L$(LIBDIR) -Wl,-rpath,$(LIBDIR) -lcpp install=$(BINDIR)