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

[Xen-changelog] [xen-unstable] libxenguest: correct order of zlib linker options to avoid link errors



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1280139891 -3600
# Node ID 2092c06f9467747da608c448ddd01e2f1f82290a
# Parent  c33055fcda423047e1ebf4de3c3d986dbd2c3f0d
libxenguest: correct order of zlib linker options to avoid link errors

The order of objects and linked libraries is important with recent
toolchain when --as-needed is used.

Introduce new variable COMPRESSION_LIBS and place it at the end of cc
commandline options.  Without this change, symbols in libbzip2 are not
found when building with openSuSE 11.2 and newer.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxc/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r c33055fcda42 -r 2092c06f9467 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Mon Jul 26 11:15:40 2010 +0100
+++ b/tools/libxc/Makefile      Mon Jul 26 11:24:51 2010 +0100
@@ -179,9 +179,9 @@ xc_dom_bzimageloader.o: CFLAGS += $(call
 xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
 xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
 
-libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)
+libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l)
 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz 
-lxenctrl $(PTHREAD_LIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) 
$(COMPRESSION_LIBS) -lz -lxenctrl $(PTHREAD_LIBS)
 
 -include $(DEPS)
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.