Skip to content

Commit

Permalink
Build with SSP and PIE
Browse files Browse the repository at this point in the history
  • Loading branch information
khorben committed Aug 25, 2015
1 parent 0d7f25d commit 969fa47
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
10 changes: 5 additions & 5 deletions src/auth/project.conf
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
10 changes: 5 additions & 5 deletions src/demos/project.conf
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/project.conf
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/project.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions tests/project.conf
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
7 changes: 4 additions & 3 deletions tools/project.conf
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 969fa47

Please sign in to comment.