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] Fix 32bit xen-tools build.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] Fix 32bit xen-tools build.
From: kraxel@xxxxxxx
Date: Thu, 05 Oct 2006 10:48:22 +0200
Delivery-date: Thu, 05 Oct 2006 01:49:29 -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
User-agent: quilt/0.44-15
This fixes building 32bit xen-tools on a amd64 machine, i.e.
"XEN_TARGET_ARCH=x86_32 make".

For ioemu I've taken the lazy path and just disabled them for
cross-builds, I'll leave that to fix to someone who knows the
qemu makefiles better than I do ;)

Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx>
---
 config/x86_32.mk              |    6 ++++--
 tools/Makefile                |    2 +-
 tools/misc/mbootpack/Makefile |    4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)

Index: build-32-unstable-11624/config/x86_32.mk
===================================================================
--- build-32-unstable-11624.orig/config/x86_32.mk
+++ build-32-unstable-11624/config/x86_32.mk
@@ -5,5 +5,7 @@ CONFIG_XCUTILS := y
 CONFIG_IOEMU := y
 CONFIG_MBOOTPACK := y
 
-CFLAGS += -m32 -march=i686
-LIBDIR := lib
+CFLAGS  += -m32 -march=i686
+LDFLAGS += -m32
+ASFLAGS += -m32
+LIBDIR  := lib
Index: build-32-unstable-11624/tools/misc/mbootpack/Makefile
===================================================================
--- build-32-unstable-11624.orig/tools/misc/mbootpack/Makefile
+++ build-32-unstable-11624/tools/misc/mbootpack/Makefile
@@ -35,7 +35,7 @@ DEPFLAGS = -Wp,-MD,.$(@F).d
 DEPS     = .*.d
 
 mbootpack: $(OBJS)
-       $(HOSTCC) -o $@ $(filter-out %.a, $^)
+       $(HOSTCC) $(CFLAGS) -o $@ $(filter-out %.a, $^)
 
 .PHONY: clean
 clean:
@@ -50,7 +50,7 @@ setup: setup.S
        $(LD) -m elf_i386 -Ttext 0x0 -s --oformat binary setup.o -o $@
 
 bin2c: bin2c.o 
-       $(HOSTCC) -o $@ $^ 
+       $(HOSTCC) $(CFLAGS) -o $@ $^
 
 bzimage_header.c: bootsect setup bin2c
        ./bin2c -n 8 -b1 -a bzimage_bootsect bootsect > bzimage_header.c
Index: build-32-unstable-11624/tools/Makefile
===================================================================
--- build-32-unstable-11624.orig/tools/Makefile
+++ build-32-unstable-11624/tools/Makefile
@@ -60,7 +60,7 @@ check_clean:
        $(MAKE) -C check clean
 
 .PHONY: ioemu ioemuinstall ioemuclean
-ifdef CONFIG_IOEMU
+ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y)
 export IOEMU_DIR ?= ioemu
 ioemu ioemuinstall:
        [ -f $(IOEMU_DIR)/config-host.mak ] || \

--


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