|
|
4ae388 |
---
|
|
|
4ae388 |
Makefile.inc | 2 +-
|
|
|
4ae388 |
kpartx/Makefile | 4 ++--
|
|
|
4ae388 |
libmpathpersist/Makefile | 2 +-
|
|
|
4ae388 |
mpathpersist/Makefile | 4 ++--
|
|
|
4ae388 |
multipath/Makefile | 4 ++--
|
|
|
4ae388 |
multipathd/Makefile | 2 +-
|
|
|
4ae388 |
6 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
4ae388 |
|
|
|
4ae388 |
Index: multipath-tools-130222/Makefile.inc
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/Makefile.inc
|
|
|
4ae388 |
+++ multipath-tools-130222/Makefile.inc
|
|
|
4ae388 |
@@ -48,7 +48,7 @@ ifndef RPM_OPT_FLAGS
|
|
|
4ae388 |
RPM_OPT_FLAGS = -O2 -g -pipe -Wformat-security -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
|
|
|
4ae388 |
endif
|
|
|
4ae388 |
|
|
|
4ae388 |
-LDFLAGS += -Wl,-z,relro
|
|
|
4ae388 |
+LDFLAGS += -Wl,-z,relro -Wl,-z,now
|
|
|
4ae388 |
OPTFLAGS = $(RPM_OPT_FLAGS) -Wunused -Wstrict-prototypes
|
|
|
4ae388 |
CFLAGS = $(OPTFLAGS) -DLIB_STRING=\"${LIB}\"
|
|
|
4ae388 |
SHARED_FLAGS = -shared
|
|
|
4ae388 |
Index: multipath-tools-130222/kpartx/Makefile
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/kpartx/Makefile
|
|
|
4ae388 |
+++ multipath-tools-130222/kpartx/Makefile
|
|
|
4ae388 |
@@ -4,7 +4,7 @@
|
|
|
4ae388 |
#
|
|
|
4ae388 |
include ../Makefile.inc
|
|
|
4ae388 |
|
|
|
4ae388 |
-CFLAGS += -fPIC -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
4ae388 |
+CFLAGS += -fPIE -DPIE -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
4ae388 |
|
|
|
4ae388 |
LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h)
|
|
|
4ae388 |
|
|
|
4ae388 |
@@ -12,7 +12,7 @@ ifneq ($(strip $(LIBDM_API_COOKIE)),0)
|
|
|
4ae388 |
CFLAGS += -DLIBDM_API_COOKIE
|
|
|
4ae388 |
endif
|
|
|
4ae388 |
|
|
|
4ae388 |
-LDFLAGS = -ldevmapper
|
|
|
4ae388 |
+LDFLAGS += -ldevmapper -pie
|
|
|
4ae388 |
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
|
|
|
4ae388 |
gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
|
|
|
4ae388 |
EXEC = kpartx
|
|
|
4ae388 |
Index: multipath-tools-130222/libmpathpersist/Makefile
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/libmpathpersist/Makefile
|
|
|
4ae388 |
+++ multipath-tools-130222/libmpathpersist/Makefile
|
|
|
4ae388 |
@@ -21,7 +21,7 @@ all: $(LIBS)
|
|
|
4ae388 |
|
|
|
4ae388 |
$(LIBS):
|
|
|
4ae388 |
$(CC) -Wall -c $(CFLAGS) *.c
|
|
|
4ae388 |
- $(CC) -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
|
|
|
4ae388 |
+ $(CC) $(LDFLAGS) -shared $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
|
|
|
4ae388 |
ln -s $(LIBS) $(DEVLIB)
|
|
|
4ae388 |
$(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
|
|
|
4ae388 |
$(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
|
|
|
4ae388 |
Index: multipath-tools-130222/mpathpersist/Makefile
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/mpathpersist/Makefile
|
|
|
4ae388 |
+++ multipath-tools-130222/mpathpersist/Makefile
|
|
|
4ae388 |
@@ -4,8 +4,8 @@ include ../Makefile.inc
|
|
|
4ae388 |
|
|
|
4ae388 |
OBJS = main.o
|
|
|
4ae388 |
|
|
|
4ae388 |
-CFLAGS += -I$(multipathdir) -I$(mpathpersistdir)
|
|
|
4ae388 |
-LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev
|
|
|
4ae388 |
+CFLAGS += -fPIE -DPIE -I$(multipathdir) -I$(mpathpersistdir)
|
|
|
4ae388 |
+LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev -pie
|
|
|
4ae388 |
|
|
|
4ae388 |
EXEC = mpathpersist
|
|
|
4ae388 |
|
|
|
4ae388 |
Index: multipath-tools-130222/multipath/Makefile
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/multipath/Makefile
|
|
|
4ae388 |
+++ multipath-tools-130222/multipath/Makefile
|
|
|
4ae388 |
@@ -6,9 +6,9 @@ include ../Makefile.inc
|
|
|
4ae388 |
|
|
|
4ae388 |
OBJS = main.o
|
|
|
4ae388 |
|
|
|
4ae388 |
-CFLAGS += -I$(multipathdir) -I$(mpathcmddir)
|
|
|
4ae388 |
+CFLAGS += -fPIE -DPIE -I$(multipathdir) -I$(mpathcmddir)
|
|
|
4ae388 |
LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \
|
|
|
4ae388 |
- -L$(mpathcmddir) -lmpathcmd
|
|
|
4ae388 |
+ -L$(mpathcmddir) -lmpathcmd -pie
|
|
|
4ae388 |
|
|
|
4ae388 |
EXEC = multipath
|
|
|
4ae388 |
|
|
|
4ae388 |
Index: multipath-tools-130222/multipathd/Makefile
|
|
|
4ae388 |
===================================================================
|
|
|
4ae388 |
--- multipath-tools-130222.orig/multipathd/Makefile
|
|
|
4ae388 |
+++ multipath-tools-130222/multipathd/Makefile
|
|
|
4ae388 |
@@ -8,7 +8,7 @@ include ../Makefile.inc
|
|
|
4ae388 |
CFLAGS += -fPIE -DPIE -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir)
|
|
|
4ae388 |
LDFLAGS += -lpthread -ldevmapper -lreadline -ludev -ldl \
|
|
|
4ae388 |
-L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
|
|
|
4ae388 |
- -L$(mpathcmddir) -lmpathcmd -Wl,-z,now -pie
|
|
|
4ae388 |
+ -L$(mpathcmddir) -lmpathcmd -pie
|
|
|
4ae388 |
|
|
|
4ae388 |
#
|
|
|
4ae388 |
# debuging stuff
|