From 78725dd13a51014b7862a852e7a5b49ae0c6acb3 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 15 Oct 2010 09:41:21 +0000 Subject: [PATCH] Fix linking order for liblvm2cmd MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reorder linked libraries so we better support --as-needed linker flag used by some distributions (i.e. Gentoo). Patch suggested by Diego Elio Pettenò gmail.com> --- tools/Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/Makefile.in b/tools/Makefile.in index 8f6d67d9a..70a1b61ee 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -149,8 +149,9 @@ liblvm2cmd-static.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib. liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS) $(CC) -shared -Wl,-soname,$@.$(LIB_VERSION) \ - $(CFLAGS) $(CLDFLAGS) -o $@ $(LVMLIBS) $(LIBS) \ - @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@ + $(CFLAGS) $(CLDFLAGS) -o $@ \ + @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@ \ + $(LVMLIBS) $(LIBS) liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX) $(LN_S) -f $< $@ -- 2.43.5