diff -ur a/client/Makefile.in b/client/Makefile.in
--- a/client/Makefile.in 2014-06-23 15:56:09.000000000 -0400
+++ b/client/Makefile.in 2017-05-22 12:33:13.587241001 -0400
@@ -40,10 +40,10 @@
ln -snf $^ $@
fence_virt: ${fence_virt_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -L../common -lfence_virt
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -L../common -lfence_virt
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
+ $(CC) -c -o $@ $^ $(INCLUDES) $(CFLAGS)
install: all
if [ ! -d ${DESTDIR}/${sbindir} ]; then \
diff -ur a/Makefile.top.in b/Makefile.top.in
--- a/Makefile.top.in 2014-06-23 15:56:09.000000000 -0400
+++ b/Makefile.top.in 2017-05-22 12:24:26.973934895 -0400
@@ -1,8 +1,9 @@
CC=@CC@
CXX=@CXX@
-CFLAGS=@CFLAGS@
-CFLAGS+=-fPIC -Wall -Wstrict-prototypes -Wshadow -D_GNU_SOURCE
+CFLAGS=-fPIC -Wall -Wstrict-prototypes -Wshadow -D_GNU_SOURCE -Wl,-z,relro,-z,now
+CFLAGS_BIN=@CFLAGS@
+LDFLAGS=@LDFLAGS@
LEX=@LEX@
YACC=@YACC@
diff -ur a/server/Makefile.in b/server/Makefile.in
--- a/server/Makefile.in 2014-06-23 15:56:09.000000000 -0400
+++ b/server/Makefile.in 2017-05-22 13:03:14.183158260 -0400
@@ -152,38 +152,38 @@
all: ${TARGETS} ${MODULES}
fence_virtd: ${fence_virtd_SOURCES:.c=.o} ${fence_virtd_cxx_SOURCES:.cpp=.opp}
- $(CXX) -o $@ $^ $(MAIN_LIBS) $(LIBS)
+ $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(MAIN_LIBS) $(LIBS)
multicast.so: ${multicast_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS)
libvirt-qmf.so: ${libvirt_qmf_so_SOURCES:.c=.o} ${libvirt_qmf_cxx_so_SOURCES:.cpp=.opp}
- $(CXX) -o $@ $^ $(LIBS) -shared $(VIRT_QPID)
+ $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_QPID)
pm-fence.so: ${pm_fence_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(PACEMAKER_LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(PACEMAKER_LIBS)
null.so: ${null_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) \
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) \
$(COROSYNC_LIBS) $(CMAN_LIBS)
serial.so: ${serial_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS)
tcp.so: ${tcp_so_SOURCES:.c=.o}
- $(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
+ $(CC) -c -o $@ $^ $(INCLUDES) $(CFLAGS)
%.opp: %.cpp
- $(CXX) $(CFLAGS) -c -o $@ $^ $(INCLUDES)
+ $(CXX) -c -o $@ $^ $(INCLUDES) $(CFLAGS)
install: all
if [ ! -d ${DESTDIR}/${sbindir} ]; then \