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

[Xen-devel] [PATCH] tools/blktap: reorder MEMSHR_DIR to fix CFLAGS


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 14 Mar 2012 17:03:03 +0100
  • Delivery-date: Wed, 14 Mar 2012 16:04:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1331740943 -3600
# Node ID 43d9bd95f981259776cb6e3ea7fd7c536fa89135
# Parent  773d0367087212c43faf8cdcc21cf443b1ea0046
tools/blktap: reorder MEMSHR_DIR to fix CFLAGS

In blktap2 MEMSHR_DIR is used before it is set. This removes the
required -D_GNU_SOURCE from CFLAGS, its used as option for -I
Fix this by moving memshr related flags to the place where its actually
used.
The failure is a missing O_DIRECT define.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 773d03670872 -r 43d9bd95f981 tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile
+++ b/tools/blktap/drivers/Makefile
@@ -3,14 +3,12 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 IBIN         = blktapctrl tapdisk
 QCOW_UTIL    = img2qcow qcow2raw qcow-create
-MEMSHR_DIR   = ../../memshr
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
 CFLAGS   += -I../lib
 CFLAGS   += $(CFLAGS_libxenctrl)
 CFLAGS   += $(CFLAGS_libxenstore)
-CFLAGS   += -I $(MEMSHR_DIR)
 CFLAGS   += -D_GNU_SOURCE
 
 ifeq ($CONFIG_GCRYPT,y)
@@ -23,7 +21,9 @@ endif
 
 MEMSHRLIBS :=
 ifeq ($(CONFIG_Linux), y)
+MEMSHR_DIR   = ../../memshr
 CFLAGS += -DMEMSHR
+CFLAGS += -I $(MEMSHR_DIR)
 MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
 endif
 
diff -r 773d03670872 -r 43d9bd95f981 tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile
+++ b/tools/blktap2/drivers/Makefile
@@ -14,7 +14,6 @@ CFLAGS    += -Wno-unused
 CFLAGS    += -fno-strict-aliasing
 CFLAGS    += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
 CFLAGS    += $(CFLAGS_libxenctrl)
-CFLAGS    += -I $(MEMSHR_DIR)
 CFLAGS    += -D_GNU_SOURCE
 CFLAGS    += -DUSE_NFS_LOCKS
 
@@ -38,11 +37,11 @@ else
 tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := -laio
 endif
 
-MEMSHR_DIR = $(XEN_ROOT)/tools/memshr
-
 MEMSHRLIBS :=
 ifeq ($(CONFIG_Linux), __fixme__)
+MEMSHR_DIR = $(XEN_ROOT)/tools/memshr
 CFLAGS += -DMEMSHR
+CFLAGS += -I $(MEMSHR_DIR)
 MEMSHRLIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl $(MEMSHR_DIR)/libmemshr.a
 endif
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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