WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [RFC][PATCH][TOOLS] CONFIG to build and link to local libaio

To: xen-devel@xxxxxxxxxxxxxxxxxxx, julian.chesterfield@xxxxxxxxxxxxx
Subject: [Xen-devel] [RFC][PATCH][TOOLS] CONFIG to build and link to local libaio
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2006 15:35:36 -0400
Delivery-date: Thu, 10 Aug 2006 12:36:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
LOCAL_LIBAIO is prolly a crappy name, but this patch will enable a
tool build to select either the local or the system provided libaio.

Note, it only builds the local libaio.a so the linker get the right
one automatically, so you'll want to "make -C tools/libaio clean".

-JX

---

diff -r 1f611b58729f tools/Makefile
--- a/tools/Makefile    Wed Aug 09 18:53:00 2006 -0400
+++ b/tools/Makefile    Thu Aug 10 15:16:17 2006 -0400
@@ -16,7 +16,7 @@ SUBDIRS-y += guest-headers
 SUBDIRS-y += guest-headers
 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager vtpm
 SUBDIRS-y += xenstat
-SUBDIRS-y += libaio
+SUBDIRS-$(LOCAL_LIBAIO) += libaio
 SUBDIRS-y += blktap
 
 # These don't cross-compile
diff -r 1f611b58729f tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile     Wed Aug 09 18:53:00 2006 -0400
+++ b/tools/blktap/drivers/Makefile     Thu Aug 10 15:16:17 2006 -0400
@@ -9,6 +9,9 @@ QCOW_UTIL    = img2qcow qcow2raw qcow-cr
 QCOW_UTIL    = img2qcow qcow2raw qcow-create
 INSTALL_DIR  = /usr/sbin
 LIBAIO_DIR   = ../../libaio/src
+LIBAIO_INCLUDE_DIR-y = -I $(LIBAIO_DIR)
+LIBAIO_LIB_DIR-y = -L$(LIBAIO_DIR)
+
 
 CFLAGS   += -fPIC
 CFLAGS   += -Wall
@@ -16,7 +19,8 @@ CFLAGS   += -Wno-unused
 CFLAGS   += -Wno-unused
 CFLAGS   += -g3
 CFLAGS   += -fno-strict-aliasing
-CFLAGS   += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
+CFLAGS   += -I $(XEN_LIBXC)
+CFLAGS   +=  $(LIBAIO_INCLUDE_DIR-$(LOCAL_LIBAIO))
 CFLAGS   += $(INCLUDES) -I. -I../../xenstore 
 CFLAGS   += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 CFLAGS   += -D_GNU_SOURCE
@@ -26,14 +30,15 @@ DEPS     = .*.d
 DEPS     = .*.d
 
 THREADLIB := -lpthread -lz
-LIBS      := -L. -L.. -L../lib
+LIBS      := $(LIBAIO_INCLUDE_DIR-$(LOCAL_LIBAIO))
+LIBS      += -L. -L.. -L../lib
 LIBS      += -L$(XEN_LIBXC)
 LIBS      += -lblktap
 LIBS      += -lcrypto
 LIBS      += -lz
 LIBS      += -L$(XEN_XENSTORE) -lxenstore
 
-AIOLIBS   := $(LIBAIO_DIR)/libaio.a
+AIOLIBS   := -laio
 
 BLK-OBJS  := block-aio.o 
 BLK-OBJS  += block-sync.o 
diff -r 1f611b58729f tools/libaio/Makefile
--- a/tools/libaio/Makefile     Wed Aug 09 18:53:00 2006 -0400
+++ b/tools/libaio/Makefile     Thu Aug 10 15:16:17 2006 -0400
@@ -12,7 +12,7 @@ default: all
 default: all
 
 all:
-       @$(MAKE) -C src
+       @$(MAKE) -C src libaio.a
 
 install: all
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [RFC][PATCH][TOOLS] CONFIG to build and link to local libaio, Jimi Xenidis <=