aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-07-24 16:44:02 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-07-24 16:44:10 +0200
commitfbd19f7ca1653d7d27ef5bfcad606d12abdaeb89 (patch)
tree00dad79b44d4c13ebe673ef6353e10a34a3ec69c
parentc08a67c0e460f5c7f1454b403c806e3ca41bdeae (diff)
downloadinitscripts-fbd19f7ca1653d7d27ef5bfcad606d12abdaeb89.tar
initscripts-fbd19f7ca1653d7d27ef5bfcad606d12abdaeb89.tar.gz
initscripts-fbd19f7ca1653d7d27ef5bfcad606d12abdaeb89.tar.bz2
initscripts-fbd19f7ca1653d7d27ef5bfcad606d12abdaeb89.tar.xz
initscripts-fbd19f7ca1653d7d27ef5bfcad606d12abdaeb89.zip
use pie and relro by default
-rw-r--r--src/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile
index e1265694..76f340fc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,5 @@
-CFLAGS+=$(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE
-LDFLAGS+=$(RPM_LD_FLAGS)
+CFLAGS+=$(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -fPIE
+LDFLAGS+=$(RPM_LD_FLAGS) -pie -z relro -z now
PROGS=usernetctl netreport usleep ipcalc brandbot \
ppp-watch consoletype genhostid rename_device udev-kvm-check
@@ -59,16 +59,16 @@ udev-kvm-check: $(UDEV_KVM_CHECK_OBJS)
$(CC) $(LDFLAGS) -o $@ $(UDEV_KVM_CHECK_OBJS) `pkg-config glib-2.0 --libs`
usernetctl.o: usernetctl.c
- $(CC) $(CFLAGS) -fPIE -c usernetctl.c -o usernetctl.o
+ $(CC) $(CFLAGS) -c usernetctl.c -o usernetctl.o
usernetctl: usernetctl.c usernetctl.o
- $(CC) $(LDFLAGS) -pie -z relro -z now -o $@ $@.o
+ $(CC) $(LDFLAGS) -o $@ $@.o
netreport.o: netreport.c
- $(CC) $(CFLAGS) -fPIE -c netreport.c -o netreport.o
+ $(CC) $(CFLAGS) -c netreport.c -o netreport.o
netreport: netreport.o
- $(CC) $(LDFLAGS) -pie -z relro -z now -o $@ $@.o
+ $(CC) $(LDFLAGS) -o $@ $@.o
shvar.o: shvar.c
$(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c shvar.c -o shvar.o
@@ -80,7 +80,7 @@ ppp-watch.o: ppp-watch.c
$(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c ppp-watch.c -o ppp-watch.o
rename_device: rename_device.c
- $(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -o $@ $< `pkg-config glib-2.0 --libs`
+ $(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -o $@ $< $(LDFLAGS) `pkg-config glib-2.0 --libs`
udev-kvm-check.o: udev-kvm-check.c
$(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c udev-kvm-check.c -o udev-kvm-check.o