aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/Makefile
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2010-07-26 11:24:51 +0100
committerOlaf Hering <olaf@aepfle.de>2010-07-26 11:24:51 +0100
commit2369c119530abde03e9195e7f22cf2b401e31f31 (patch)
tree000ac6f1b5e8dfcec1b57d15d3aed155dfec961d /tools/libxc/Makefile
parentfd452d0f6493416332ca1dd91b8450003a05563e (diff)
downloadxen-2369c119530abde03e9195e7f22cf2b401e31f31.tar.gz
xen-2369c119530abde03e9195e7f22cf2b401e31f31.tar.bz2
xen-2369c119530abde03e9195e7f22cf2b401e31f31.zip
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@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/Makefile')
-rw-r--r--tools/libxc/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 63eeb6ddb7..a87d6c36fa 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -179,9 +179,9 @@ endif
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)