v86d: Accept aarch64 as build host

Message ID 20160709232717.22380-1-raj.khem@gmail.com
State Accepted
Commit 709c603dec19690bcf21034867b815b5679b921a
Headers show

Commit Message

Khem Raj July 9, 2016, 11:27 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-bsp/v86d/v86d/aarch64-host.patch | 18 ++++++++++++++++++
 meta/recipes-bsp/v86d/v86d_0.1.10.bb          |  4 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/v86d/v86d/aarch64-host.patch

-- 
2.9.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Ross Burton July 10, 2016, 9:53 a.m. | #1
On 10 July 2016 at 00:27, Khem Raj <raj.khem@gmail.com> wrote:

> +       local m=`uname -m`

> +       if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" =

> "i386" ]; then

> +               echo "n";

> +-      elif [ "$m" = "x86_64" ]; then

> ++      elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then

> +               echo "y";

> +       else

>


Surely this entire block is wrong for cross-compilation - looking at uname
to determine what to build for the target?

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj July 10, 2016, 5:59 p.m. | #2
On Jul 10, 2016 2:53 AM, "Burton, Ross" <ross.burton@intel.com> wrote:
>

>

> On 10 July 2016 at 00:27, Khem Raj <raj.khem@gmail.com> wrote:

>>

>> +       local m=`uname -m`

>> +       if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" =

"i386" ]; then
>> +               echo "n";

>> +-      elif [ "$m" = "x86_64" ]; then

>> ++      elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then

>> +               echo "y";

>> +       else

>

>

> Surely this entire block is wrong for cross-compilation - looking at

uname to determine what to build for the target?

Yes it is however the recipe is limited to x86 and now that we add a non
x86 build host this is a compromise I came up with. Hopefully we wont have
folks adding host architectures to Build oe on so regularly. Otherwise we
wont need cross compiling ;)
>

> Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton July 10, 2016, 11:05 p.m. | #3
On 10 July 2016 at 18:59, Khem Raj <raj.khem@gmail.com> wrote:

> Yes it is however the recipe is limited to x86 and now that we add a non

> x86 build host this is a compromise I came up with. Hopefully we wont have

> folks adding host architectures to Build oe on so regularly. Otherwise we

> wont need cross compiling ;)

>

Actually looked at the recipe and I see we override this value anyway, so
ignore me. :)

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-bsp/v86d/v86d/aarch64-host.patch b/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
new file mode 100644
index 0000000..701fed7
--- /dev/null
+++ b/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
@@ -0,0 +1,18 @@ 
+Accept aarch64 as valid build host
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: v86d-0.1.10/configure
+===================================================================
+--- v86d-0.1.10.orig/configure
++++ v86d-0.1.10/configure
+@@ -26,7 +26,7 @@ copt_x86emu_test()
+ 	local m=`uname -m`
+ 	if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
+ 		echo "n";
+-	elif [ "$m" = "x86_64" ]; then
++	elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then
+ 		echo "y";
+ 	else
+ 		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 f502072..1046d63 100644
--- a/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -13,7 +13,9 @@  SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
            file://Update-x86emu-from-X.org.patch \
            file://fbsetup \
            file://uvesafb.conf \
-           file://ar-from-env.patch"
+           file://ar-from-env.patch \
+           file://aarch64-host.patch \
+"
 
 SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
 SRC_URI[sha256sum] = "634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c"