tools/Makefile | 8 +++++++-
tools/blktap/drivers/Makefile | 1 +
tools/blktap2/vhd/lib/Makefile | 1 +
tools/debugger/gdbsx/Makefile | 2 +-
tools/libaio/src/Makefile | 2 +-
tools/libfsimage/common/Makefile | 4 ++--
6 files changed, 13 insertions(+), 5 deletions(-)
With this patch a full 32 bit build of the tool set is possible
on a 64 bit host. No errors or warnigns.
Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -74,7 +74,13 @@ distclean: subdirs-distclean
rm -rf ioemu-dir ioemu-remote
ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
-IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
+ifeq ($(XEN_TARGET_ARCH),x86_32)
+# The qemu build uses i386 instead of x86_32.
+IOEMU_CONFIGURE_CPU ?= --cpu=i386
+else
+IOEMU_CONFIGURE_CPU ?= --cpu=$(XEN_TARGET_ARCH)
+endif
+IOEMU_CONFIGURE_CROSS ?= $(IOEMU_CONFIGURE_CPU) \
--cross-prefix=$(CROSS_COMPILE) \
--interp-prefix=$(CROSS_SYS_ROOT)
endif
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile
+++ b/tools/blktap/drivers/Makefile
@@ -14,6 +14,7 @@ CFLAGS += $(CFLAGS_libxenstore)
CFLAGS += -I $(LIBAIO_DIR)
CFLAGS += -I $(MEMSHR_DIR)
CFLAGS += -D_GNU_SOURCE
+CFLAGS += -D_FILE_OFFSET_BITS=64
ifeq ($(shell . ./check_gcrypt $(CC)),yes)
CFLAGS += -DUSE_GCRYPT
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/blktap2/vhd/lib/Makefile
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -18,6 +18,7 @@ CFLAGS += -I../../include
CFLAGS += -D_GNU_SOURCE
CFLAGS += -fPIC
CFLAGS += -g
+CFLAGS += -D_FILE_OFFSET_BITS=64
ifeq ($(CONFIG_Linux),y)
LIBS := -luuid
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/debugger/gdbsx/Makefile
--- a/tools/debugger/gdbsx/Makefile
+++ b/tools/debugger/gdbsx/Makefile
@@ -18,7 +18,7 @@ install: all
$(INSTALL_PROG) gdbsx $(DESTDIR)$(SBINDIR)/gdbsx
gdbsx: gx/gx_all.a xg/xg_all.a
- $(CC) -o $@ $^
+ $(CC) $(LDFLAGS) -o $@ $^
xg/xg_all.a:
$(MAKE) -C xg
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/libaio/src/Makefile
--- a/tools/libaio/src/Makefile
+++ b/tools/libaio/src/Makefile
@@ -6,7 +6,7 @@ includedir=$(prefix)/include
libdir=$(prefix)/lib
ARCH := $(shell uname -m | sed -e s/i.86/i386/)
-CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
+CFLAGS := $(CFLAGS) -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer
-O2 -fPIC
SO_CFLAGS=-shared $(CFLAGS)
L_CFLAGS=$(CFLAGS)
LINK_FLAGS=
diff -r bf47f7aaf669 -r 19a5a2cddad3 tools/libfsimage/common/Makefile
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -4,8 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk
MAJOR = 1.0
MINOR = 0
-LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
-LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
+LDFLAGS-$(CONFIG_SunOS) := $(LDFLAGS) -Wl,-M -Wl,mapfile-SunOS
+LDFLAGS-$(CONFIG_Linux) := $(LDFLAGS) -Wl,mapfile-GNU
LDFLAGS = $(LDFLAGS-y)
LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|