|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 1 of 2] Make tools/Makefile cross-friendly
# HG changeset patch
# User Aron Griffis <aron@xxxxxx>
# Date 1200715193 18000
# Node ID 79cf8ffbc6678f201d35724bf083ea9749818597
# Parent ff90abf572f2d5aa7d4a7f764b3c343b66a06210
Make tools/Makefile cross-friendly
Pass Xen cross-compilation options through to ioemu.
Export CROSS_SYS_ROOT for use by scripts. Unexport
IOEMU_DIR since it isn't used outside of the Makefile.
Signed-off-by: Aron Griffis <aron@xxxxxx>
diff -r ff90abf572f2 -r 79cf8ffbc667 tools/Makefile
--- a/tools/Makefile Fri Jan 18 14:11:20 2008 -0700
+++ b/tools/Makefile Fri Jan 18 22:59:53 2008 -0500
@@ -26,6 +26,12 @@ ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_A
ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
SUBDIRS-$(PYTHON_TOOLS) += python
SUBDIRS-$(PYTHON_TOOLS) += pygrub
+endif
+
+# For the sake of linking, set the sys-root
+ifneq ($(CROSS_COMPILE),)
+CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
+export CROSS_SYS_ROOT
endif
.PHONY: all
@@ -65,10 +71,15 @@ check_clean:
.PHONY: ioemu ioemuinstall ioemuclean
ifeq ($(CONFIG_IOEMU),y)
-export IOEMU_DIR ?= ioemu
+IOEMU_DIR ?= ioemu
+ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
+IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \
+ --interp-prefix=$(CROSS_SYS_ROOT)
+endif
ioemu ioemuinstall:
[ -f $(IOEMU_DIR)/config-host.mak ] || \
- (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
+ ( cd $(IOEMU_DIR) && sh configure --prefix=/usr \
+ $(IOEMU_CONFIGURE_CROSS) )
$(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@)
ioemuclean:
$(MAKE) -C $(IOEMU_DIR) distclean
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|