From 969fa472998bea22ea59ee8317b49563683270e1 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 26 Aug 2015 01:39:33 +0200 Subject: [PATCH] Build with SSP and PIE --- src/auth/project.conf | 10 +++++----- src/demos/project.conf | 10 +++++----- src/plugins/project.conf | 10 +++++----- src/project.conf | 4 ++-- tests/project.conf | 5 +++-- tools/project.conf | 7 ++++--- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/auth/project.conf b/src/auth/project.conf index 9ed9d24..48a8e2b 100644 --- a/src/auth/project.conf +++ b/src/auth/project.conf @@ -1,13 +1,13 @@ targets=password,slider,template cppflags_force=-I ../../include cppflags= -cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector +cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all #for Gtk+ 2 -cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0` -ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0` +cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC +ldflags_force=`pkg-config --libs libSystem gtk+-2.0` #for Gtk+ 3 -#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0` -#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0` +#cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC +#ldflags_force=`pkg-config --libs libSystem gtk+-3.0` dist=Makefile [password] diff --git a/src/demos/project.conf b/src/demos/project.conf index a3b49cc..3b45f3a 100644 --- a/src/demos/project.conf +++ b/src/demos/project.conf @@ -1,13 +1,13 @@ targets=colors,gtk-demo,logo,template,xscreensaver,xterm cppflags_force=-I ../../include cppflags= -cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector +cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all #for Gtk+ 2 -cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0 x11` -ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0 x11` +cflags_force=`pkg-config --cflags libSystem gtk+-2.0 x11` -fPIC +ldflags_force=`pkg-config --libs libSystem gtk+-2.0 x11` -fPIC #for Gtk+ 3 -#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0 x11` -#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0 x11` +#cflags_force=`pkg-config --cflags libSystem gtk+-3.0 x11` -fPIC +#ldflags_force=`pkg-config --libs libSystem gtk+-3.0 x11` -fPIC dist=Makefile [colors] diff --git a/src/plugins/project.conf b/src/plugins/project.conf index b89d9da..47ff409 100644 --- a/src/plugins/project.conf +++ b/src/plugins/project.conf @@ -1,13 +1,13 @@ targets=debug,openmoko,suspend,systray,template cppflags_force=-I ../../include cppflags= -cflags=-Wall -g -O2 -pedantic -fPIC +cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all #for Gtk+ 2 -cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0` -ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0` +cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC +ldflags_force=`pkg-config --libs libSystem gtk+-2.0` #for Gtk+ 3 -#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0` -#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0` +#cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC +#ldflags_force=`pkg-config --libs libSystem gtk+-3.0` dist=Makefile [debug] diff --git a/src/project.conf b/src/project.conf index 3308f29..ea32714 100644 --- a/src/project.conf +++ b/src/project.conf @@ -1,8 +1,8 @@ subdirs=auth,demos,plugins targets=locker,lockerctl #cppflags=-D EMBEDDED -cflags_force=-W `pkg-config --cflags libDesktop` -cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector +cflags_force=`pkg-config --cflags libDesktop` +cflags=-Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all ldflags_force=`pkg-config --libs libDesktop` -lintl ldflags=-Wl,-pie dist=Makefile,locker.h diff --git a/tests/project.conf b/tests/project.conf index 6b5ab31..232b44a 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,8 +1,9 @@ targets=auth,tests.log cppflags_force=-I ../include -cflags_force=-W `pkg-config --cflags libDesktop` -cflags=-Wall -g -O2 +cflags_force=`pkg-config --cflags libDesktop` +cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all ldflags_force=-W `pkg-config --libs libDesktop` +ldflags=-Wl,-pie dist=Makefile,tests.sh [auth] diff --git a/tools/project.conf b/tools/project.conf index e9fa28a..478df76 100644 --- a/tools/project.conf +++ b/tools/project.conf @@ -1,11 +1,12 @@ targets=locker-test -cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector +cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all #for Gtk+ 2 -cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0` +cflags_force=`pkg-config --cflags libSystem gtk+-2.0` ldflags_force=`pkg-config --libs libSystem gtk+-2.0` #for Gtk+ 3 -#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0` +#cflags_force=`pkg-config --cflags libSystem gtk+-3.0` #ldflags_force=`pkg-config --libs libSystem gtk+-3.0` +ldflags=-Wl,-pie dist=Makefile [locker-test]