From: Stefano Stabellini Date: Tue, 23 Sep 2014 16:29:29 +0000 (+0100) Subject: Fix QEMU cross-compile build X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4338 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7110ab4b66ac3388259fec93be90aa2d900d58b6;p=xen.git Fix QEMU cross-compile build Introduce the per-arch IOEMU_CPU_ARCH variable. Always pass --configure=IOEMU_CPU_ARCH to QEMU's configure script. Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell [ ijc -- dropped redundant comments ] --- diff --git a/config/arm32.mk b/config/arm32.mk index aa79d228c6..4f83a63bf9 100644 --- a/config/arm32.mk +++ b/config/arm32.mk @@ -18,3 +18,5 @@ HAS_NS16550 := y LDFLAGS_DIRECT += -EL CONFIG_LOAD_ADDRESS ?= 0x80000000 + +IOEMU_CPU_ARCH ?= arm diff --git a/config/arm64.mk b/config/arm64.mk index 15b57a457a..4e57b3a3cb 100644 --- a/config/arm64.mk +++ b/config/arm64.mk @@ -13,3 +13,5 @@ HAS_NS16550 := y LDFLAGS_DIRECT += -EL CONFIG_LOAD_ADDRESS ?= 0x80000000 + +IOEMU_CPU_ARCH ?= aarch64 diff --git a/config/x86_32.mk b/config/x86_32.mk index 7f76b256a3..6121fdc4ce 100644 --- a/config/x86_32.mk +++ b/config/x86_32.mk @@ -12,3 +12,5 @@ CFLAGS += -m32 -march=i686 LDFLAGS_DIRECT_OpenBSD = _obsd LDFLAGS_DIRECT_FreeBSD = _fbsd LDFLAGS_DIRECT += -melf_i386$(LDFLAGS_DIRECT_$(XEN_OS)) + +IOEMU_CPU_ARCH ?= i386 diff --git a/config/x86_64.mk b/config/x86_64.mk index 11104bdc05..1b974766c0 100644 --- a/config/x86_64.mk +++ b/config/x86_64.mk @@ -25,3 +25,5 @@ else LDFLAGS_DIRECT += -melf_x86_64 endif endif + +IOEMU_CPU_ARCH ?= x86_64 diff --git a/tools/Makefile b/tools/Makefile index 81ce7afae2..00f539ac2c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -106,8 +106,7 @@ distclean: subdirs-distclean config.cache autom4te.cache ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) -IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \ - --cross-prefix=$(CROSS_COMPILE) \ +IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \ --interp-prefix=$(CROSS_SYS_ROOT) endif @@ -146,7 +145,7 @@ subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find set -e; \ $(buildmakevars2shellvars); \ cd qemu-xen-traditional-dir; \ - $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \ + $(QEMU_ROOT)/xen-setup --cpu=$(IOEMU_CPU_ARCH) $(IOEMU_CONFIGURE_CROSS); \ $(MAKE) all subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find @@ -155,6 +154,7 @@ subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find cd qemu-xen-traditional-dir; \ $(QEMU_ROOT)/xen-setup \ --extra-cflags="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \ + --cpu=$(IOEMU_CPU_ARCH) \ $(IOEMU_CONFIGURE_CROSS); \ $(MAKE) install @@ -207,6 +207,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find --disable-guest-agent \ --python=$(PYTHON) \ $(CONFIG_QEMUU_EXTRA_ARGS) \ + --cpu=$(IOEMU_CPU_ARCH) \ $(IOEMU_CONFIGURE_CROSS); \ $(MAKE) all