[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: use system installed libaio by default.



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1321982691 0
# Node ID 4ecd3615e7267c1b1ff760a9b6714d517e76e6a9
# Parent  53bec838bb083a56211dd2d184be98578be4c37e
tools: use system installed libaio by default.

I could have sworn I did this years ago.

IIRC the need for our own copy was due to the use of io_set_eventfd which is
not present in version 0.3.106. However it is in 0.3.107 the first version of
which was uploaded to Debian in June 2008 (I can't find a better reference for
the release date).

The necessary version is available in Debian Lenny onwards and is in at least
RHEL 6, Fedora 13 and OpenSuSE 11.3. The necessary version appears to not be
available in RHEL 5 or SLES 11 which is why I haven't simply nuked the in tree
version.

This is based on tools-system-libaio.diff from the Debian packaging although I
have made it optional (but default on).

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 53bec838bb08 -r 4ecd3615e726 Config.mk
--- a/Config.mk Tue Nov 22 17:09:12 2011 +0000
+++ b/Config.mk Tue Nov 22 17:24:51 2011 +0000
@@ -232,6 +232,7 @@
 OCAML_TOOLS        ?= y
 CONFIG_MINITERM    ?= n
 CONFIG_LOMOUNT     ?= n
+CONFIG_SYSTEM_LIBAIO ?= y
 
 ifeq ($(OCAML_TOOLS),y)
 OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n")
diff -r 53bec838bb08 -r 4ecd3615e726 README
--- a/README    Tue Nov 22 17:09:12 2011 +0000
+++ b/README    Tue Nov 22 17:24:51 2011 +0000
@@ -48,6 +48,8 @@
     * Development install of x11 (e.g. xorg-x11-dev)
     * Development install of uuid (e.g. uuid-dev)
     * Development install of yajl (e.g. libyajl-dev)
+    * Development install of libaio (e.g. libaio-dev) version 0.3.107 or
+      greater. Set CONFIG_SYSTEM_LIBAIO in .config if this is not available.
     * bridge-utils package (/sbin/brctl)
     * iproute package (/sbin/ip)
     * hotplug or udev
diff -r 53bec838bb08 -r 4ecd3615e726 tools/Makefile
--- a/tools/Makefile    Tue Nov 22 17:09:12 2011 +0000
+++ b/tools/Makefile    Tue Nov 22 17:24:51 2011 +0000
@@ -1,6 +1,10 @@
 XEN_ROOT = $(CURDIR)/..
 include $(XEN_ROOT)/tools/Rules.mk
 
+ifneq ($(CONFIG_SYSTEM_LIBAIO),y)
+SUBDIRS-libaio := libaio
+endif
+
 SUBDIRS-y :=
 SUBDIRS-y += check
 SUBDIRS-y += include
@@ -18,11 +22,11 @@
 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
 SUBDIRS-$(VTPM_TOOLS) += vtpm
 SUBDIRS-y += xenstat
-SUBDIRS-$(CONFIG_Linux) += libaio
+SUBDIRS-$(CONFIG_Linux) += $(SUBDIRS-libaio)
 SUBDIRS-$(CONFIG_Linux) += memshr 
 SUBDIRS-$(CONFIG_Linux) += blktap
 SUBDIRS-$(CONFIG_Linux) += blktap2
-SUBDIRS-$(CONFIG_NetBSD) += libaio
+SUBDIRS-$(CONFIG_NetBSD) += $(SUBDIRS-libaio)
 SUBDIRS-$(CONFIG_NetBSD) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
diff -r 53bec838bb08 -r 4ecd3615e726 tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile    Tue Nov 22 17:09:12 2011 +0000
+++ b/tools/blktap2/drivers/Makefile    Tue Nov 22 17:24:51 2011 +0000
@@ -14,7 +14,6 @@
 CFLAGS    += -fno-strict-aliasing
 CFLAGS    += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
 CFLAGS    += $(CFLAGS_libxenctrl)
-CFLAGS    += -I $(LIBAIO_DIR)
 CFLAGS    += -I $(MEMSHR_DIR)
 CFLAGS    += -D_GNU_SOURCE
 CFLAGS    += -DUSE_NFS_LOCKS
@@ -30,7 +29,15 @@
 REMUS-OBJS  += hashtable_itr.o
 REMUS-OBJS  += hashtable_utility.o
 
+ifneq ($(CONFIG_SYSTEM_LIBAIO),y)
+CFLAGS    += -I $(LIBAIO_DIR)
 LIBAIO_DIR = $(XEN_ROOT)/tools/libaio/src
+tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := 
$(LIBAIO_DIR)/libaio.a 
+tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS  += 
-I$(LIBAIO_DIR)
+else
+tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := -laio
+endif
+
 MEMSHR_DIR = $(XEN_ROOT)/tools/memshr
 
 MEMSHRLIBS :=
@@ -39,9 +46,6 @@
 MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
 endif
 
-tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := 
$(LIBAIO_DIR)/libaio.a 
-tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS  += 
-I$(LIBAIO_DIR)
-
 ifeq ($(VHD_STATIC),y)
 td-util: CFLAGS += -static
 endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.