tools build: add cross-install to find the right "strip"
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Aug 2008 09:49:57 +0000 (10:49 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Aug 2008 09:49:57 +0000 (10:49 +0100)
Signed-off-by: Aron Griffis <aron@hp.com>
tools/Makefile
tools/cross-install [new file with mode: 0755]

index bcc9fb8d0a98f03f1c6e8ac3dcef4b824a353aed..159087eca1fd162b8233755285bbeff4b011da78 100644 (file)
@@ -38,8 +38,10 @@ endif
 
 # For the sake of linking, set the sys-root
 ifneq ($(CROSS_COMPILE),)
+CROSS_BIN_PATH ?= /usr/$(CROSS_COMPILE:-=)/bin
 CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
-export CROSS_SYS_ROOT
+export CROSS_SYS_ROOT # exported for check/funcs.sh
+export CROSS_BIN_PATH # exported for cross-install.sh
 endif
 
 .PHONY: all
@@ -57,7 +59,8 @@ clean distclean: subdirs-clean
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
                         --cross-prefix=$(CROSS_COMPILE) \
-                        --interp-prefix=$(CROSS_SYS_ROOT)
+                        --interp-prefix=$(CROSS_SYS_ROOT) \
+                        --install=$(CURDIR)/cross-install
 endif
 
 ioemu/config-host.mak:
diff --git a/tools/cross-install b/tools/cross-install
new file mode 100755 (executable)
index 0000000..2b67bb3
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# prepend CROSS_BIN_PATH to find the right "strip"
+if [ -n "$CROSS_BIN_PATH" ]; then
+    PATH="$CROSS_BIN_PATH:$PATH"
+fi
+
+exec install "$@"