mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxc: More LZMA/BZIP fixes.
- Fix an error message in xc_try_bzip2_decode() - Check library installation on demand using a Makefile function, rather than generating a dependency file. Cleaner and avoids a race on generating the dep file. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
b0ae5f8bd1
commit
552cd79c66
3 files changed
+17
-23
No files matched your search
@@ -102,6 +102,7 @@
|
||||
^stubdom/ocaml-.*$
|
||||
^stubdom/lwip/
|
||||
^stubdom/ioemu/
|
||||
^stubdom/stubdompath\.sh$
|
||||
^tools/.*/build/lib.*/.*\.py$
|
||||
^tools/blktap2/daemon/blktapctrl$
|
||||
^tools/blktap2/drivers/img2qcow$
|
||||
@@ -170,7 +171,6 @@
|
||||
^tools/ioemu/qemu\.1$
|
||||
^tools/ioemu/qemu\.pod$
|
||||
^tools/ioemu/tapdisk-ioemu$
|
||||
^tools/libxc/\.zlib\.deps$
|
||||
^tools/libxc/ia64/asm/.*\.h$
|
||||
^tools/libxc/ia64/acpi/.*\.h$
|
||||
^tools/libxc/ia64/acpi/platform/.*\.h$
|
||||
|
||||
+15
-21
@@ -114,7 +114,7 @@ TAGS:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *.rpm $(LIB) *~ $(DEPS) .*.deps \
|
||||
rm -rf *.rpm $(LIB) *~ $(DEPS) \
|
||||
$(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
|
||||
$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
|
||||
|
||||
@@ -152,30 +152,24 @@ libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
|
||||
ln -sf $< $@
|
||||
|
||||
ifeq ($(CONFIG_MiniOS),y)
|
||||
.zlib.deps:
|
||||
echo >$@
|
||||
zlib-options =
|
||||
else
|
||||
.zlib.deps:
|
||||
@(set -e; \
|
||||
. ../check/funcs.sh; \
|
||||
echo >$@.new; \
|
||||
if has_header bzlib.h; then \
|
||||
echo "-DHAVE_BZLIB" >>$@.new; \
|
||||
echo "-lbz2" >>$@.new; \
|
||||
echo " - BZIP2 decompression supported"; \
|
||||
fi; \
|
||||
if has_header lzma.h; then \
|
||||
echo "-DHAVE_LZMA" >>$@.new; \
|
||||
echo "-llzma" >>$@.new; \
|
||||
echo " - LZMA decompression supported"; \
|
||||
fi; \
|
||||
mv $@.new $@)
|
||||
zlib-options = $(shell \
|
||||
(. ../check/funcs.sh; \
|
||||
if has_header bzlib.h; then \
|
||||
echo "-DHAVE_BZLIB"; \
|
||||
echo "-lbz2"; \
|
||||
fi; \
|
||||
if has_header lzma.h; then \
|
||||
echo "-DHAVE_LZMA"; \
|
||||
echo "-llzma"; \
|
||||
fi) | grep $(1))
|
||||
endif
|
||||
|
||||
xc_dom_bzimageloader.o: .zlib.deps
|
||||
xc_dom_bzimageloader.o: CFLAGS += $(shell grep D .zlib.deps)
|
||||
xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
|
||||
xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
|
||||
|
||||
libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(shell grep l .zlib.deps)
|
||||
libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(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)
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ static int xc_try_bzip2_decode(
|
||||
static int xc_try_bzip2_decode(
|
||||
struct xc_dom_image *dom, void **blob, size_t *size)
|
||||
{
|
||||
xc_dom_printf("%s: LZMA decompress support unavailable\n",
|
||||
xc_dom_printf("%s: BZIP2 decompress support unavailable\n",
|
||||
__FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||