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 --- config/x86_32.mk | 6 ++++-- tools/Makefile | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) Index: build-32-unstable-12621/config/x86_32.mk =================================================================== --- build-32-unstable-12621.orig/config/x86_32.mk +++ build-32-unstable-12621/config/x86_32.mk @@ -6,8 +6,10 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y CONFIG_IOEMU := y -CFLAGS += -m32 -march=i686 -LIBDIR := lib +CFLAGS += -m32 -march=i686 +LDFLAGS += -m32 +ASFLAGS += -m32 +LIBDIR := lib # Use only if calling $(LD) directly. ifeq ($(XEN_OS),OpenBSD) Index: build-32-unstable-12621/tools/Makefile =================================================================== --- build-32-unstable-12621.orig/tools/Makefile +++ build-32-unstable-12621/tools/Makefile @@ -62,7 +62,7 @@ check_clean: $(MAKE) -C check clean .PHONY: ioemu ioemuinstall ioemuclean -ifeq ($(CONFIG_IOEMU),y) +ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y) export IOEMU_DIR ?= ioemu ioemu ioemuinstall: [ -f $(IOEMU_DIR)/config-host.mak ] || \