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] [PATCH 2 of 2] Fixes for cross-compiling 32-bit tools on 64-

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 2] Fixes for cross-compiling 32-bit tools on 64-bit host
From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Date: Mon, 14 Nov 2011 16:53:53 -0500
Cc: andres@xxxxxxxxxxxxxx, adin@xxxxxxxxxxxxxx
Delivery-date: Mon, 14 Nov 2011 14:13:42 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=lagarcavilla.org; h= content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:date:from:to:cc; s= lagarcavilla.org; bh=QgEW/gLaWNQhRUYgvlUfy5kWsDU=; b=a4LMcc5VSLX tuVjE46t5Iz/z/uAQebQbjH2XBG7q365AvKWVdkwQaE7IAS4rnvP6OmZSWGTKrso bPNLJbXGWHvamzRGgSuL2j4QS0jBh4xMyaE0EgSt2g3cof2c3hqzV8YtjLGyHd/0 ff4QRqzQucX+CN3bjpjs1+rgynLoiPTg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=content-type :mime-version:content-transfer-encoding:subject:message-id :in-reply-to:references:date:from:to:cc; q=dns; s= lagarcavilla.org; b=LrpsXmM295dA2b5d7qm91YXHSPnlvPcHaNM3bqRubED8 3dr08NBgdoKoNoLe00VwkqIU0KGogZFX11iUUtBNFTX8vkTfIqHdf3ZvdZ8Leigh 80f/cFsKaLKdM/cBSnzKeywikHHeAWaU5FF/WZBxYN4PzknU9L2geF4rv1vD6Lo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1321307631@xxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1321307631@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.4
 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

<Prev in Thread] Current Thread [Next in Thread>