Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
398a4ddb
Commit
398a4ddb
authored
13 years ago
by
Guido Günther
Browse files
Options
Downloads
Patches
Plain Diff
New patch Split-out-dlopen-detection.patch
Explicitly pass -ldl since the lock manager needs it.
parent
9a74cf1b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/Split-out-dlopen-detection.patch
+111
-0
111 additions, 0 deletions
debian/patches/Split-out-dlopen-detection.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
112 additions
and
0 deletions
debian/patches/Split-out-dlopen-detection.patch
0 → 100644
+
111
−
0
View file @
398a4ddb
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
--
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
398a4ddb
...
...
@@ -9,3 +9,4 @@ 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment