Skip to content
Snippets Groups Projects
Commit 3689fc5d authored by Guido Günther's avatar Guido Günther
Browse files

Drop patches applied upstream

- Skip-nodeinfo-test-on-non-intel-architectures.patch
- Split-out-dlopen-detection.patch
- nodeinfo-remove-superfluous-braces.patch
parent 1fa64b08
No related branches found
No related tags found
No related merge requests found
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Sun, 12 Jun 2011 21:57:01 +0200
Subject: Skip nodeinfo test on non intel architectures
since the testfiles assume a /proc/cpuinfo specific to this
architecture.
---
tests/nodeinfotest.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index b4e81b3..71e2926 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -11,7 +11,9 @@
#include "util.h"
#include "files.h"
-#ifndef __linux__
+#if ! (defined __linux__ && (defined(__x86_64__) || \
+ defined(__amd64__) || \
+ defined(__i386__)))
static int
mymain(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
--
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Mon, 13 Jun 2011 14:21:31 +0200
Subject: Split out dlopen detection
since it's needed for the lock manager too. Fixes linking on non intel
architectures.
---
configure.ac | 44 ++++++++++++++++++++++++++------------------
src/Makefile.am | 2 ++
2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5307a1d..6d36f4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2130,6 +2130,28 @@ esac
AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
+# Check for dlopen needed for the locking manager and driver-modules
+DLOPEN_CFLAGS=
+DLOPEN_LIBS=
+old_cflags="$CFLAGS"
+old_libs="$LIBS"
+have_dlopen="yes"
+AC_CHECK_HEADER([dlfcn.h],[],[have_dlopen="no"])
+AC_SEARCH_LIBS([dlopen], [dl], [], [have_dlopen="no"])
+CFLAGS="$old_cflags"
+LIBS="$old_libs"
+
+if test "$have_dlopen" != "no"; then
+ case $ac_cv_search_dlopen in
+ no*) DLOPEN_LIBS= ;;
+ *) DLOPEN_LIBS=$ac_cv_search_dlopen ;;
+ esac
+fi
+AM_CONDITIONAL([HAVE_DLOPEN], [test "$have_dlopen" != "no"])
+AC_SUBST([DLOPEN_CFLAGS])
+AC_SUBST([DLOPEN_LIBS])
+
+
dnl Driver-Modules library
AC_ARG_WITH([driver-modules],
AC_HELP_STRING([--with-driver-modules], [build drivers as loadable modules @<:@default=no@:>@]),
@@ -2137,30 +2159,16 @@ AC_ARG_WITH([driver-modules],
[with_driver_modules=no])
DRIVER_MODULE_CFLAGS=
-DRIVER_MODULE_LIBS=
if test "x$with_driver_modules" = "xyes" ; then
- old_cflags="$CFLAGS"
- old_libs="$LIBS"
- fail=0
- AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
- AC_SEARCH_LIBS([dlopen], [dl], [], [fail=1])
- test $fail = 1 &&
+ test $have_dlopen != "yes" &&
AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
-
- CFLAGS="$old_cflags"
- LIBS="$old_libs"
fi
if test "$with_driver_modules" = "yes"; then
DRIVER_MODULE_CFLAGS="-export-dynamic"
- case $ac_cv_search_dlopen in
- no*) DRIVER_MODULE_LIBS= ;;
- *) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
- esac
AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
fi
AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
AC_SUBST([DRIVER_MODULE_CFLAGS])
-AC_SUBST([DRIVER_MODULE_LIBS])
# Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
@@ -2455,10 +2463,10 @@ AC_MSG_NOTICE([])
AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux])
AC_MSG_NOTICE([AppArmor: $with_secdriver_apparmor])
AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Driver Loadable Modules])
+AC_MSG_NOTICE([Driver Loadable Modules / Dlopen])
AC_MSG_NOTICE([])
-if test "$with_driver_modules" != "no" ; then
-AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DRIVER_MODULE_LIBS])
+if test "$have_dlopen" != "no" ; then
+AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DLOPEN_CFLAGS $DLOPEN_LIBS])
else
AC_MSG_NOTICE([ dlopen: no])
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 273b407..6f4f548 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@ INCLUDES = \
-I@top_srcdir@/src/util \
-I@top_srcdir@/include \
$(DRIVER_MODULE_CFLAGS) \
+ $(DLOPEN_CFLAGS) \
$(LIBXML_CFLAGS) \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) \
@@ -1141,6 +1142,7 @@ libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
libvirt_la_LIBADD += $(LIBXML_LIBS) \
$(DRIVER_MODULE_LIBS) \
+ $(DLOPEN_LIBS) \
$(CYGWIN_EXTRA_LIBADD)
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
--
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Sat, 11 Jun 2011 18:10:40 +0200
Subject: nodeinfo: remove superfluous braces
that break compilation on non intel architectures:
mips:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=mips&ver=0.9.2-1&stamp=1307570195
powerpc:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=powerpc&ver=0.9.2-1&stamp=1307550913
s390:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=s390&ver=0.9.2-1&stamp=1307641748
sparc:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=sparc&ver=0.9.2-1&stamp=1307552926
---
src/nodeinfo.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index f55c83e..1fe6ec9 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -248,7 +248,6 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
&& (*p == '\0' || c_isspace(*p))
&& id > nodeinfo->cores)
nodeinfo->cores = id;
- }
# elif defined(__powerpc__) || \
defined(__powerpc64__)
} else if (STRPREFIX(buf, "clock")) {
@@ -266,7 +265,6 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
/* Accept trailing fractional part. */
&& (*p == '\0' || *p == '.' || c_isspace(*p)))
nodeinfo->mhz = ui;
- }
# elif defined(__s390__) || \
defined(__s390x__)
} else if (STRPREFIX(buf, "# processors")) {
@@ -289,10 +287,10 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
* and parsed in next iteration, because it is not in expected
* format and thus lead to error. */
break;
- }
# else
# warning Parser for /proc/cpuinfo needs to be adapted for your architecture
# endif
+ }
}
if (!nodeinfo->cpus) {
--
......@@ -7,8 +7,5 @@ patch-qemuMonitorTextGetMigrationStatus-to-intercept.patch
Debianize-libvirt-guests.patch
virsh-Initialize-library-before-calling-virResetLast.patch
Disable-daemon-start-test.patch
nodeinfo-remove-superfluous-braces.patch
Skip-nodeinfo-test-on-non-intel-architectures.patch
Split-out-dlopen-detection.patch
Update-generated-autoconf-files.patch
Disable-gnulib-s-test-nonplocking-pipe.sh.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment