diff options
author | Serhey Popovych <serhe.popovych@gmail.com> | 2018-10-31 16:55:47 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-07 23:08:55 +0000 |
commit | a7bf511703d67af956e8d8152a53ec1a58b31ee1 (patch) | |
tree | 409e9169db87320564482716f0c64c1f538470f2 /meta | |
parent | 8929ffd67c6de431c2561f63c5427df6c354d30f (diff) | |
download | poky-a7bf511703d67af956e8d8152a53ec1a58b31ee1.tar.gz |
v86d: Make cross compilation working on more architectures
Since commit 709c603dec19 ("v86d: Accept aarch64 as build host") we
support cross compilation on aarch64 host in addition to x86 host.
However building on hosts different than two above will fail.
Make cross compilation support more generic by checking for TARGET_ARCH
in v86d configure script with fallback to `uname -m` when not present in
environment and pass TARGET_ARCH explicitly in do_configure().
Cross build for x86 tested on IBM Power 8 machine with RHEL7. Should
work on aarch64 and rest too.
(From OE-Core rev: 69f7579eb36c00b557225377e1a3cc61b103be23)
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch | 34 | ||||
-rw-r--r-- | meta/recipes-bsp/v86d/v86d/aarch64-host.patch | 18 | ||||
-rw-r--r-- | meta/recipes-bsp/v86d/v86d_0.1.10.bb | 4 |
3 files changed, 36 insertions, 20 deletions
diff --git a/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch b/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch new file mode 100644 index 0000000000..15f70a59aa --- /dev/null +++ b/meta/recipes-bsp/v86d/v86d/Support-for-cross-compilation.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 8eda59654fd31416164c78f6068715b01767ed4e Mon Sep 17 00:00:00 2001 | ||
2 | From: Serhey Popovych <serhe.popovych@gmail.com> | ||
3 | Date: Wed, 31 Oct 2018 07:31:47 -0400 | ||
4 | Subject: v86d: Support for cross compilation | ||
5 | |||
6 | It is common to build on one system for another (e.g. on IBM Power | ||
7 | machine for Intel x86) where HOST_ARCH (uname -m) != TARGET_ARCH. | ||
8 | |||
9 | Take TARGET_ARCH from environment if it is given, otherwise fall back | ||
10 | to `uname -m`. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> | ||
14 | --- | ||
15 | configure | 3 ++- | ||
16 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/configure b/configure | ||
19 | index 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 | -- | ||
33 | 1.8.3.1 | ||
34 | |||
diff --git a/meta/recipes-bsp/v86d/v86d/aarch64-host.patch b/meta/recipes-bsp/v86d/v86d/aarch64-host.patch deleted file mode 100644 index 701fed7b5d..0000000000 --- a/meta/recipes-bsp/v86d/v86d/aarch64-host.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Accept aarch64 as valid build host | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | Index: v86d-0.1.10/configure | ||
7 | =================================================================== | ||
8 | --- v86d-0.1.10.orig/configure | ||
9 | +++ v86d-0.1.10/configure | ||
10 | @@ -26,7 +26,7 @@ copt_x86emu_test() | ||
11 | local m=`uname -m` | ||
12 | if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then | ||
13 | echo "n"; | ||
14 | - elif [ "$m" = "x86_64" ]; then | ||
15 | + elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then | ||
16 | echo "y"; | ||
17 | else | ||
18 | echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2 | ||
diff --git a/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/meta/recipes-bsp/v86d/v86d_0.1.10.bb index f97b80d08f..84e27d2007 100644 --- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb +++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb | |||
@@ -12,7 +12,7 @@ PR = "r2" | |||
12 | SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \ | 12 | SRC_URI = "http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/v/${BPN}/${BPN}_${PV}.orig.tar.gz \ |
13 | file://Update-x86emu-from-X.org.patch \ | 13 | file://Update-x86emu-from-X.org.patch \ |
14 | file://ar-from-env.patch \ | 14 | file://ar-from-env.patch \ |
15 | file://aarch64-host.patch \ | 15 | file://Support-for-cross-compilation.patch \ |
16 | " | 16 | " |
17 | 17 | ||
18 | SRC_URI[md5sum] = "889686ec8424468fe0d205742e77a4c2" | 18 | SRC_URI[md5sum] = "889686ec8424468fe0d205742e77a4c2" |
@@ -22,7 +22,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
22 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | 22 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' |
23 | 23 | ||
24 | do_configure () { | 24 | do_configure () { |
25 | ./configure --with-x86emu | 25 | TARGET_ARCH="${TARGET_ARCH}" ./configure --with-x86emu |
26 | } | 26 | } |
27 | 27 | ||
28 | do_compile () { | 28 | do_compile () { |