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-ia64-devel

[Xen-devel] [PATCH 1 of 2] Make tools/Makefile cross-friendly

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 2] Make tools/Makefile cross-friendly
From: Aron Griffis <aron@xxxxxx>
Date: Mon, 21 Jan 2008 10:29:32 -0500
Cc: Christoph.Egger@xxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Jan 2008 08:14:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1200929371@xxxxxxxxxxxxxx>
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
# 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

<Prev in Thread] Current Thread [Next in Thread>