aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-07-24 16:44:02 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-09-09 14:34:21 +0200
commit1c05070bbf19f7a90f9014285ebe70d9e80ddf3b (patch)
tree4f6864b11b92c0547632d5c4fe085b206d433c90
parent368d19d31a057bf4d82ba428629694618edce133 (diff)
downloadinitscripts-1c05070bbf19f7a90f9014285ebe70d9e80ddf3b.tar
initscripts-1c05070bbf19f7a90f9014285ebe70d9e80ddf3b.tar.gz
initscripts-1c05070bbf19f7a90f9014285ebe70d9e80ddf3b.tar.bz2
initscripts-1c05070bbf19f7a90f9014285ebe70d9e80ddf3b.tar.xz
initscripts-1c05070bbf19f7a90f9014285ebe70d9e80ddf3b.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 7875abc5..aa9daa24 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 \
consoletype genhostid rename_device
@@ -43,20 +43,20 @@ usleep: $(USLEEP_OBJS)
$(CC) $(LDFLAGS) -o $@ $(USLEEP_OBJS) -lpopt
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
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`