kexec-tools/kexec-tools-xen-static.diff

49 lines
1.6 KiB
Diff
Raw Normal View History

From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Link xenctrl statically
This patch just links the xenctrl library statically. That allows
to use Xen support without a runtime dependency to the Xen package.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
================================================================================
--- kexec-tools-2.0.1/configure
+++ kexec-tools-2.0.1/configure
@@ -5023,8 +5023,7 @@
fi
if test "x$ac_cv_header_xenctrl_h" = x""yes; then
-
-{ $as_echo "$as_me:$LINENO: checking for xc_version in -lxenctrl" >&5
+ { $as_echo "$as_me:$LINENO: checking for xc_version in -lxenctrl" >&5
$as_echo_n "checking for xc_version in -lxenctrl... " >&6; }
if test "${ac_cv_lib_xenctrl_xc_version+set}" = set; then
$as_echo_n "(cached) " >&6
@@ -5090,12 +5089,7 @@
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xenctrl_xc_version" >&5
$as_echo "$ac_cv_lib_xenctrl_xc_version" >&6; }
if test "x$ac_cv_lib_xenctrl_xc_version" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBXENCTRL 1
-_ACEOF
-
- LIBS="-lxenctrl $LIBS"
-
+ LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"
else
{ $as_echo "$as_me:$LINENO: Xen support disabled" >&5
$as_echo "$as_me: Xen support disabled" >&6;}
--- kexec-tools-2.0.1/configure.ac
+++ kexec-tools-2.0.1/configure.ac
@@ -145,7 +145,8 @@
dnl find Xen control stack libraries
if test "$with_xen" = yes ; then
AC_CHECK_HEADER(xenctrl.h,
- AC_CHECK_LIB(xenctrl, xc_version, ,
+ AC_CHECK_LIB(xenctrl, xc_version,
+ [[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]],
AC_MSG_NOTICE([Xen support disabled])))
fi