tools/blktap: reorder MEMSHR_DIR to fix CFLAGS
PATCH 1/1 tools/blktap: reorder MEMSHR_DIR to fix CFLAGS
# HG changeset patch
# User Olaf Hering <[email protected]>
# 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 <[email protected]>
tools/blktap/drivers/Makefile +2 -2
@@ -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
tools/blktap2/drivers/Makefile +2 -3
@@ -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
Olaf Hering writes ("[Xen-devel] [PATCH] tools/blktap: reorder MEMSHR_DIR to fix CFLAGS"):
Quoted 1 line
tools/blktap: reorderMEMSHR_DIRto fix CFLAGS
Committed-by Ian Jackson <[email protected]>