summaryrefslogtreecommitdiffstats
path: root/linking_change.patch
blob: 69cea86d35876fab6a691ccfabe5a7e3d075f48b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: multipath-tools-080519/libmultipath/Makefile
===================================================================
--- multipath-tools-080519.orig/libmultipath/Makefile
+++ multipath-tools-080519/libmultipath/Makefile
@@ -23,14 +23,16 @@ endif
 all: $(LIBS)
 
 $(LIBS): $(OBJS)
-	$(CC) $(SHARED_FLAGS) $(CFLAGS) -o $@ $(OBJS)
+	$(CC) $(SHARED_FLAGS) -Wl,-soname,$@ $(CFLAGS) -o $@ $(OBJS)
 
 install:
+	$(INSTALL_PROGRAM) -d $(DESTDIR)$(prefix)/lib
+	$(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(DESTDIR)$(prefix)/lib/$(LIBS)
 	$(INSTALL_PROGRAM) -o root -g root -m 755 -d $(DESTDIR)$(libdir)
-	$(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(DESTDIR)$(libdir)/$(LIBS)
+	ldconfig
 
 uninstall:
-	rm -f $(DESTDIR)$(libdir)/$(LIBS)
+	rm -f $(DESTDIR)$(prefix)/lib/$(LIBS)
 
 clean:
 	rm -f core *.a *.o *.gz *.so
Index: multipath-tools-080519/multipath/Makefile
===================================================================
--- multipath-tools-080519.orig/multipath/Makefile
+++ multipath-tools-080519/multipath/Makefile
@@ -6,7 +6,7 @@ include ../Makefile.inc
 
 OBJS = main.o
 
-CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
+CFLAGS += -I$(multipathdir)
 LDFLAGS += -lpthread -ldevmapper -laio -ldl \
 	   -lmultipath -L$(multipathdir)
 
Index: multipath-tools-080519/multipathd/Makefile
===================================================================
--- multipath-tools-080519.orig/multipathd/Makefile
+++ multipath-tools-080519/multipathd/Makefile
@@ -5,7 +5,7 @@ include ../Makefile.inc
 #
 # basic flags setting
 #
-CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
+CFLAGS += -I$(multipathdir)
 LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \
 	   -lmultipath -L$(multipathdir)