Compile with SSP and as PIE and RELRO by default

This commit is contained in:
Pierre Pronchery 2015-09-18 00:33:40 +02:00
parent a1041d8ea5
commit b984b60ccf

View File

@ -1,10 +1,12 @@
targets=compare,fontsel,progress targets=compare,fontsel,progress
#cflags_force=-W `pkg-config gtk+-3.0 --cflags` cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
cflags_force=-W `pkg-config gtk+-2.0 --cflags` ldflags=-Wl,-pie -Wl,-z,relro -Wl,-z,now
cflags=-Wall -g -O2 -pedantic -fstack-protector -fPIE #for Gtk+ 2
#ldflags_force=`pkg-config gtk+-3.0 --libs` cflags_force=`pkg-config gtk+-2.0 --cflags`
ldflags_force=`pkg-config gtk+-2.0 --libs` ldflags_force=`pkg-config gtk+-2.0 --libs`
ldflags=-Wl,-pie #for Gtk+ 3
#cflags_force=-W `pkg-config gtk+-3.0 --cflags`
#ldflags_force=`pkg-config gtk+-3.0 --libs`
dist=Makefile dist=Makefile
[compare] [compare]
@ -20,6 +22,7 @@ install=$(BINDIR)
[progress] [progress]
type=binary type=binary
sources=progress.c sources=progress.c
#for Gtk+ 3
#cflags=`pkg-config --cflags gtk+-x11-3.0` #cflags=`pkg-config --cflags gtk+-x11-3.0`
#ldflags=`pkg-config --cflags gtk+-x11-3.0` #ldflags=`pkg-config --cflags gtk+-x11-3.0`
install=$(BINDIR) install=$(BINDIR)