summaryrefslogtreecommitdiffstats
path: root/static_libaio.patch
blob: 43c80e38a3767f752158e6d9f1e37371041acd20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: multipath-tools/multipath/Makefile
===================================================================
--- multipath-tools.orig/multipath/Makefile
+++ multipath-tools/multipath/Makefile
@@ -7,7 +7,7 @@ include ../Makefile.inc
 OBJS = main.o
 
 CFLAGS += -I$(multipathdir)
-LDFLAGS += -lpthread -ldevmapper -laio -ldl \
+LDFLAGS += -lpthread -ldevmapper -Wl,-Bstatic,-laio,-Bdynamic -ldl \
 	   -lmultipath -L$(multipathdir)
 
 EXEC = multipath
@@ -15,7 +15,7 @@ EXEC = multipath
 all: $(EXEC)
 
 $(EXEC): $(OBJS)
-	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS)
+	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) -Wl,-undefined=io_submit,-undefined=io_getevents,-undefined=io_destroy,-undefined=io_setup $(LDFLAGS) -rdynamic
 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
 	$(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz