Build with -fstack-protector and executables as PIE

This commit is contained in:
Pierre Pronchery 2015-07-12 22:26:16 +02:00
parent 7ef06a20b1
commit 04acbb6e0d
4 changed files with 13 additions and 11 deletions

View File

@ -1,9 +1,9 @@
targets=battery,bluetooth,brightness,clock,close,cpu,cpufreq,desktop,embed,gps,gsm,lock,logout,menu,memory,mixer,mpd,network,pager,phone,rotate,separator,spacer,swap,systray,tasks,template,title,usb,user,volume,wpa_supplicant
cppflags_force=-I ../../include
#cppflags=-D EMBEDDED
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0` -fPIC
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0` -fPIC
cflags=-Wall -g -O2 -pedantic -fstack-protector
#cflags_force=-W `pkg-config --cflags libSystem gtk+-3.0`
cflags_force=-W `pkg-config --cflags libSystem gtk+-2.0`
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
#ldflags_force=`pkg-config --libs libSystem gtk+-3.0`
ldflags_force=`pkg-config --libs libSystem gtk+-2.0`
dist=Makefile,tasks.atoms

View File

@ -2,14 +2,14 @@ subdirs=applets
targets=libPanel,panel,panelctl,run
#cppflags=-D EMBEDDED
cflags_force=-W
cflags=-Wall -g -O2 -pedantic -fstack-protector
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
dist=Makefile,helper.c,panel.h,window.h
[libPanel]
type=library
sources=panel.c,window.c
cppflags=-D PREFIX=\"$(PREFIX)\"
cflags=`pkg-config --cflags libDesktop` -fPIC
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -lintl
install=$(LIBDIR)
@ -19,7 +19,7 @@ depends=$(OBJDIR)libPanel.a
sources=main.c
cppflags=-D PREFIX=\"$(PREFIX)\"
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -lintl -L. -L$(OBJDIR). -Wl,-rpath,$(LIBDIR) -lPanel
ldflags=`pkg-config --libs libDesktop` -lintl -L. -L$(OBJDIR). -Wl,-rpath,$(LIBDIR) -lPanel -Wl,-pie
install=$(BINDIR)
[main.c]
@ -35,7 +35,7 @@ depends=../include/Panel.h,panel.h,window.h
type=binary
sources=panelctl.c
cflags=`pkg-config --cflags libDesktop`
ldflags=`pkg-config --libs libDesktop` -lintl
ldflags=`pkg-config --libs libDesktop` -lintl -Wl,-pie
install=$(BINDIR)
[panelctl.c]
@ -46,7 +46,7 @@ type=binary
sources=run.c
cppflags=-D PREFIX=\"$(PREFIX)\"
#cflags=`pkg-config --cflags libSystem gtk+-3.0`
#ldflags=`pkg-config --libs libSystem gtk+-3.0` -lintl
#ldflags=`pkg-config --libs libSystem gtk+-3.0` -lintl -Wl,-pie
cflags=`pkg-config --cflags libSystem gtk+-2.0`
ldflags=`pkg-config --libs libSystem gtk+-2.0` -lintl
ldflags=`pkg-config --libs libSystem gtk+-2.0` -lintl -Wl,-pie
install=$(BINDIR)

View File

@ -1,8 +1,9 @@
targets=applets,applets2,tests.log
cppflags_force=-I ../include
cflags_force=-W `pkg-config --cflags libDesktop`
cflags=-Wall -g -O2 -pedantic -fstack-protector
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
ldflags_force=-W `pkg-config --libs libDesktop`
ldflags=-Wl,-pie
dist=Makefile,tests.sh
[applets]

View File

@ -1,7 +1,8 @@
targets=panel-embed,panel-message,panel-notify,panel-test,settings,wifibrowser
cflags_force=-W `pkg-config --cflags libDesktop`
cflags=-Wall -g -O2 -pedantic -fstack-protector
cflags=-Wall -g -O2 -pedantic -fPIC -fstack-protector
ldflags_force=`pkg-config --libs libDesktop`
ldflags=-Wl,-pie
dist=Makefile,helper.c
[panel-embed]