From: Zdenek Kabelac Date: Fri, 15 Oct 2010 09:41:21 +0000 (+0000) Subject: Fix linking order for liblvm2cmd X-Git-Tag: v2_02_91~1469 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=78725dd13a51014b7862a852e7a5b49ae0c6acb3;p=lvm2.git Fix linking order for liblvm2cmd 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> --- 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 $< $@