Skip to content

Commit 969fa47

Browse files
committed
Build with SSP and PIE
1 parent 0d7f25d commit 969fa47

6 files changed

Lines changed: 24 additions & 22 deletions

File tree

src/auth/project.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
targets=password,slider,template
22
cppflags_force=-I ../../include
33
cppflags=
4-
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
4+
cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all
55
#for Gtk+ 2
6-
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0`
7-
ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0`
6+
cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC
7+
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
88
#for Gtk+ 3
9-
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0`
10-
#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0`
9+
#cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC
10+
#ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
1111
dist=Makefile
1212

1313
[password]

src/demos/project.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
targets=colors,gtk-demo,logo,template,xscreensaver,xterm
22
cppflags_force=-I ../../include
33
cppflags=
4-
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
4+
cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all
55
#for Gtk+ 2
6-
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0 x11`
7-
ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0 x11`
6+
cflags_force=`pkg-config --cflags libSystem gtk+-2.0 x11` -fPIC
7+
ldflags_force=`pkg-config --libs libSystem gtk+-2.0 x11` -fPIC
88
#for Gtk+ 3
9-
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0 x11`
10-
#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0 x11`
9+
#cflags_force=`pkg-config --cflags libSystem gtk+-3.0 x11` -fPIC
10+
#ldflags_force=`pkg-config --libs libSystem gtk+-3.0 x11` -fPIC
1111
dist=Makefile
1212

1313
[colors]

src/plugins/project.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
targets=debug,openmoko,suspend,systray,template
22
cppflags_force=-I ../../include
33
cppflags=
4-
cflags=-Wall -g -O2 -pedantic -fPIC
4+
cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all
55
#for Gtk+ 2
6-
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0`
7-
ldflags_force=-W `pkg-config --libs libSystem gtk+-2.0`
6+
cflags_force=`pkg-config --cflags libSystem gtk+-2.0` -fPIC
7+
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
88
#for Gtk+ 3
9-
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0`
10-
#ldflags_force=-W `pkg-config --libs libSystem gtk+-3.0`
9+
#cflags_force=`pkg-config --cflags libSystem gtk+-3.0` -fPIC
10+
#ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
1111
dist=Makefile
1212

1313
[debug]

src/project.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
subdirs=auth,demos,plugins
22
targets=locker,lockerctl
33
#cppflags=-D EMBEDDED
4-
cflags_force=-W `pkg-config --cflags libDesktop`
5-
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
4+
cflags_force=`pkg-config --cflags libDesktop`
5+
cflags=-Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
66
ldflags_force=`pkg-config --libs libDesktop` -lintl
77
ldflags=-Wl,-pie
88
dist=Makefile,locker.h

tests/project.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
targets=auth,tests.log
22
cppflags_force=-I ../include
3-
cflags_force=-W `pkg-config --cflags libDesktop`
4-
cflags=-Wall -g -O2
3+
cflags_force=`pkg-config --cflags libDesktop`
4+
cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
55
ldflags_force=-W `pkg-config --libs libDesktop`
6+
ldflags=-Wl,-pie
67
dist=Makefile,tests.sh
78

89
[auth]

tools/project.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
targets=locker-test
2-
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
2+
cflags=-W -Wall -g -O2 -pedantic -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector-all
33
#for Gtk+ 2
4-
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0`
4+
cflags_force=`pkg-config --cflags libSystem gtk+-2.0`
55
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
66
#for Gtk+ 3
7-
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0`
7+
#cflags_force=`pkg-config --cflags libSystem gtk+-3.0`
88
#ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
9+
ldflags=-Wl,-pie
910
dist=Makefile
1011

1112
[locker-test]

0 commit comments

Comments
 (0)