[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] Fix liblvm2cmd.so linking order for --as-needed builds

Hi all,

I'm attaching a patch that fix the linking of liblvm2cmd.so so that it
actually links to the libraries it needs... with the original Makefile,
the linking order is such that ld drops all the libraries, linking only
libc at the end... this in turn will cause undefined references to floor
when the library is loaded in (see http://bugs.gentoo.org/335205 for


Diego Elio Pettenò — “Flameeyes”

If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/

Index: LVM2.2.02.73/tools/Makefile.in
--- LVM2.2.02.73.orig/tools/Makefile.in
+++ LVM2.2.02.73/tools/Makefile.in
@@ -149,8 +149,8 @@ liblvm2cmd-static.a: $(top_builddir)/lib
 liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS)
 	$(CC) -shared -Wl,-soname,$  $(LIB_VERSION) \
-	$(CFLAGS) $(CLDFLAGS) -o $@ $(LVMLIBS) $(LIBS) \
+	$(CFLAGS) $(CLDFLAGS) -o $@ \
 liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
 	$(LN_S) -f $< $@

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]