From 0832c58c0a80ec480a0df3849c8d73cca58aa3b9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2007 14:44:15 +0000 Subject: [PATCH] +Tue May 29 15:41:00 BST 2007 Richard W.M. Jones + + * TODO: Added a note about requiring C++ compiler because of a + possible problem with libtool autoconf macros. + * docs/examples/Makefile.am, proxy/Makefile.am, qemud/Makefile.am, + src/Makefile.am, tests/Makefile.am: Pass $(WARN_CFLAGS) when + linking, so if -fstack-protector is there, gcc will link to + the stack protector library. + * tests/xencapstest.c: Allow this test to compile when Xen + libraries are not enabled. + --- ChangeLog | 11 +++++++++++ TODO | 5 +++++ docs/examples/Makefile.am | 2 +- proxy/Makefile.am | 2 +- qemud/Makefile.am | 2 +- src/Makefile.am | 2 +- tests/Makefile.am | 1 + tests/xencapstest.c | 16 ++++++++++++++++ 8 files changed, 37 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba95e9b10d..c6d1674a0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue May 29 15:41:00 BST 2007 Richard W.M. Jones + + * TODO: Added a note about requiring C++ compiler because of a + possible problem with libtool autoconf macros. + * docs/examples/Makefile.am, proxy/Makefile.am, qemud/Makefile.am, + src/Makefile.am, tests/Makefile.am: Pass $(WARN_CFLAGS) when + linking, so if -fstack-protector is there, gcc will link to + the stack protector library. + * tests/xencapstest.c: Allow this test to compile when Xen + libraries are not enabled. + Tue May 29 15:54:17 CEST 2007 Daniel Veillard * src/virsh.c src/xen_internal.c src/xend_internal.c: memory leaks diff --git a/TODO b/TODO index b739d7f327..828d50d8f7 100644 --- a/TODO +++ b/TODO @@ -22,3 +22,8 @@ Cleanup: - now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ? same for the buffers +Autoconf: +- On Debian and other platforms, C++ compiler is required because + autoconf macros to detect libtool depend on it. (This is probably + an autoconf or libtool m4 macro bug, and the fact that it happens + on Debian is a red herring). diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index 18e1b134dd..6da54d6d30 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS=python INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include DEPS = $(top_builddir)/src/libvirt.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/src/libvirt.la +LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la rebuild: examples.xml index.html diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 17541130d8..c32e7b17d4 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -11,7 +11,7 @@ libvirt_proxy_SOURCES = libvirt_proxy.c @top_srcdir@/src/xend_internal.c \ @top_srcdir@/src/xen_internal.c @top_srcdir@/src/virterror.c \ @top_srcdir@/src/sexpr.c @top_srcdir@/src/xml.c \ @top_srcdir@/src/xs_internal.c -libvirt_proxy_LDFLAGS = +libvirt_proxy_LDFLAGS = $(WARN_CFLAGS) libvirt_proxy_DEPENDENCIES = libvirt_proxy_LDADD = diff --git a/qemud/Makefile.am b/qemud/Makefile.am index f4daaf4650..d2dbc80caa 100644 --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -19,7 +19,7 @@ libvirt_qemud_CFLAGS = \ $(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \ -DSYSCONF_DIR="\"$(sysconfdir)\"" \ -DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" -libvirt_qemud_LDFLAGS = $(LIBXML_LIBS) $(SYSFS_LIBS) +libvirt_qemud_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(SYSFS_LIBS) libvirt_qemud_DEPENDENCIES = libvirt_qemud_LDADD = diff --git a/src/Makefile.am b/src/Makefile.am index 7741f242ac..bcf42f3610 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -36,7 +36,7 @@ libvirt_la_SOURCES = \ bin_PROGRAMS = virsh virsh_SOURCES = virsh.c console.c console.h -virsh_LDFLAGS = $(COVERAGE_LDFLAGS) +virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS) virsh_DEPENDENCIES = $(DEPS) virsh_LDADD = $(LDADDS) $(VIRSH_LIBS) virsh_CFLAGS = $(COVERAGE_CFLAGS) diff --git a/tests/Makefile.am b/tests/Makefile.am index 77a965e77d..35c056c3c9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,6 +25,7 @@ INCLUDES = \ LDADDS = \ @STATIC_BINARIES@ \ @LIBXML_LIBS@ \ + $(WARN_CFLAGS) \ $(LIBVIRT) \ $(COVERAGE_LDFLAGS) diff --git a/tests/xencapstest.c b/tests/xencapstest.c index ecdea0ecf7..ab106e7f35 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -1,4 +1,10 @@ #include +#include + +#include "config.h" + +#ifdef WITH_XEN + #include #include "xml.h" @@ -197,3 +203,13 @@ main(int argc, char **argv) exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); } + +#else /* !WITH_XEN */ + +int +main (void) +{ + exit (EXIT_SUCCESS); +} + +#endif /* !WITH_XEN */