summaryrefslogtreecommitdiff
path: root/libmultipath
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2009-04-02 23:19:36 -0500
committerChristophe Varoqui <christophe.varoqui@free.fr>2009-04-03 23:26:36 +0200
commit1d80fee3649f66fbb49a3225af97eb90adf2c9d5 (patch)
tree17d0640858aae02a12afbabcd70da561b7ffdd56 /libmultipath
parent139136bb54ac9b99c7a5910e4ea1e6cb37fd8d00 (diff)
downloadmultipath-tools-1d80fee3649f66fbb49a3225af97eb90adf2c9d5.tar.gz
multipath-tools-1d80fee3649f66fbb49a3225af97eb90adf2c9d5.tar.bz2
multipath-tools-1d80fee3649f66fbb49a3225af97eb90adf2c9d5.zip
Clean up multipath linking
This is a patch to fix up the linking. It does two things. First, it makes libmultipath.so install to /lib/ just like a normal shared library, so you don't have to use -rpath to link to it. Second, and more importantly, it moves the libaio linking into libcheckdirectio.so, where it belongs. Since libcheckdirectio.so is a dynamic shared object, multipath and multipathd don't know what functions they need to link in from libaio. This fixes the directio lockup for me. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Diffstat (limited to 'libmultipath')
-rw-r--r--libmultipath/Makefile7
-rw-r--r--libmultipath/checkers/Makefile3
2 files changed, 7 insertions, 3 deletions
diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index c70d429..35cb911 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -23,14 +23,15 @@ 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) -m 755 $(LIBS) $(DESTDIR)$(prefix)/lib/$(LIBS)
$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
- $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)/$(LIBS)
uninstall:
- rm -f $(DESTDIR)$(libdir)/$(LIBS)
+ rm -f $(DESTDIR)$(prefix)/lib/$(LIBS)
clean:
rm -f core *.a *.o *.gz *.so
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
index a20dfac..22fe82c 100644
--- a/libmultipath/checkers/Makefile
+++ b/libmultipath/checkers/Makefile
@@ -17,6 +17,9 @@ CFLAGS += -I..
all: $(LIBS)
+libcheckdirectio.so: libsg.o directio.o
+ $(CC) $(SHARED_FLAGS) -o $@ $^ -laio
+
libcheck%.so: libsg.o %.o
$(CC) $(SHARED_FLAGS) -o $@ $^