xen/cross-build-fix.diff

45 lines
1.3 KiB
Diff

Fix 32bit xen-tools build.
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@suse.de>
---
config/x86_32.mk | 6 ++++--
tools/Makefile | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
Index: xen-3.3.0-testing/config/x86_32.mk
===================================================================
--- xen-3.3.0-testing.orig/config/x86_32.mk
+++ xen-3.3.0-testing/config/x86_32.mk
@@ -7,7 +7,10 @@ CONFIG_MIGRATE := y
CONFIG_XCUTILS := y
CONFIG_IOEMU := y
-CFLAGS += -m32 -march=i686
+CFLAGS += -m32 -march=i686
+LDFLAGS += -m32
+ASFLAGS += -m32
+LIBDIR := lib
# Use only if calling $(LD) directly.
LDFLAGS_DIRECT_OpenBSD = _obsd
Index: xen-3.3.0-testing/tools/Makefile
===================================================================
--- xen-3.3.0-testing.orig/tools/Makefile
+++ xen-3.3.0-testing/tools/Makefile
@@ -24,7 +24,7 @@ SUBDIRS-y += libfsimage
SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
SUBDIRS-y += fs-back
-ifeq (ioemu,$(CONFIG_QEMU))
+ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y)
SUBDIRS-$(CONFIG_IOEMU) += ioemu
else
SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir