blob: 15f70a59aa921e2a23bbd68a61e27d96c4cefa67 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 8eda59654fd31416164c78f6068715b01767ed4e Mon Sep 17 00:00:00 2001
2From: Serhey Popovych <serhe.popovych@gmail.com>
3Date: Wed, 31 Oct 2018 07:31:47 -0400
4Subject: v86d: Support for cross compilation
5
6It is common to build on one system for another (e.g. on IBM Power
7machine for Intel x86) where HOST_ARCH (uname -m) != TARGET_ARCH.
8
9Take TARGET_ARCH from environment if it is given, otherwise fall back
10to `uname -m`.
11
12Upstream-Status: Pending
13Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
14---
15 configure | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/configure b/configure
19index cbbd6b3..046aa99 100755
20--- a/configure
21+++ b/configure
22@@ -23,7 +23,8 @@ copt_x86emu_type="bool"
23 copt_x86emu_def=auto
24 copt_x86emu_test()
25 {
26- local m=`uname -m`
27+ local m="${TARGET_ARCH:-$(uname -m)}"
28+
29 if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
30 echo "n";
31 elif [ "$m" = "x86_64" ]; then
32--
331.8.3.1
34