Index: sanlock-3.5.0/fence_sanlock/Makefile =================================================================== --- sanlock-3.5.0.orig/fence_sanlock/Makefile +++ sanlock-3.5.0/fence_sanlock/Makefile @@ -35,7 +35,7 @@ CFLAGS += -DVERSION=\"$(VER)\" -I../src CFLAGS += -fPIE -DPIE LDFLAGS = -Wl,-z,now -Wl,-z,relro -pie -LDADD = -lrt -laio -lblkid -lsanlock -lwdmd +LDADD = -lsanlock -lwdmd -lrt -laio -lblkid all: $(TARGET1) $(TARGET2) Index: sanlock-3.5.0/src/Makefile =================================================================== --- sanlock-3.5.0.orig/src/Makefile +++ sanlock-3.5.0/src/Makefile @@ -96,17 +96,16 @@ CFLAGS += -DVERSION=\"$(VER)\" CMD_CFLAGS = $(CFLAGS) -fPIE -DPIE CMD_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie -CMD_LDADD += -lpthread -luuid -lrt -laio -lblkid -lsanlock -L../wdmd -lwdmd +CMD_LDADD += -lsanlock -L../wdmd -lwdmd -lpthread -luuid -lrt -laio -lblkid -LIB_ENTIRE_LDFLAGS += -lpthread -lrt -laio -lblkid -L../wdmd -lwdmd LIB_ENTIRE_LDFLAGS += -Wl,-z,relro -pie - +LIB_ENTIRE_LDADD += -L../wdmd -lwdmd -lpthread -lrt -laio -lblkid LIB_CLIENT_LDFLAGS += -Wl,-z,relro -pie all: $(LIBSO_ENTIRE_TARGET) $(LIBSO_CLIENT_TARGET) $(CMD_TARGET) $(LIBPC_ENTIRE_TARGET) $(LIBPC_CLIENT_TARGET) -$(LIBSO_ENTIRE_TARGET): $(LIB_ENTIRE_SOURCE) - $(CC) $(CFLAGS) $(LIB_ENTIRE_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $^ +$(LIBSO_ENTIRE_TARGET): + $(CC) $(CFLAGS) $(LIB_ENTIRE_LDFLAGS) -shared -fPIC -o $@ -Wl,-soname=$(LIB_ENTIRE_TARGET).so.$(SOMAJOR) $(LIB_ENTIRE_SOURCE) $(LIB_ENTIRE_LDADD) $^ ln -sf $(LIBSO_ENTIRE_TARGET) $(LIB_ENTIRE_TARGET).so ln -sf $(LIBSO_ENTIRE_TARGET) $(LIB_ENTIRE_TARGET).so.$(SOMAJOR) Index: sanlock-3.5.0/tests/Makefile =================================================================== --- sanlock-3.5.0.orig/tests/Makefile +++ sanlock-3.5.0/tests/Makefile @@ -34,7 +34,7 @@ CFLAGS += -D_GNU_SOURCE -g \ -fasynchronous-unwind-tables \ -fdiagnostics-show-option -LDFLAGS = -lrt -laio -lblkid -lsanlock +LDFLAGS = -lsanlock -lrt -laio -lblkid all: $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6) $(TARGET7) Index: sanlock-3.5.0/reset/Makefile =================================================================== --- sanlock-3.5.0.orig/reset/Makefile +++ sanlock-3.5.0/reset/Makefile @@ -35,7 +35,7 @@ CFLAGS += -DVERSION=\"$(VER)\" -I../src CFLAGS += -fPIE -DPIE LDFLAGS = -Wl,-z,now -Wl,-z,relro -pie -LDADD = -lsanlock -lwdmd +LDADD = -lsanlock -lwdmd -lrt -laio -lblkid all: $(TARGET1) $(TARGET2)