Skip to content

Commit 7e6305d

Browse files
committed
mraa: Fix build on x86 32bit
Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent d62b225 commit 7e6305d

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 5de183dc436bb647361ab641d891c113e6a7dadd Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <raj.khem@gmail.com>
3+
Date: Sun, 8 Mar 2020 16:30:48 -0700
4+
Subject: [PATCH] cmake: Use a regular expression to match x86 architectures
5+
6+
in OE we use i686 for qemux86 and this results in
7+
8+
-- INFO - Target arch is i686
9+
CMake Error at CMakeLists.txt:191 (message):
10+
Only x86, arm, mips, PERIPHERALMAN and mock platforms currently supported
11+
12+
So using a wildcard helps in using any x86 arch
13+
14+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
15+
---
16+
CMakeLists.txt | 3 +--
17+
1 file changed, 1 insertion(+), 2 deletions(-)
18+
19+
diff --git a/CMakeLists.txt b/CMakeLists.txt
20+
index 250d9106..fb642722 100644
21+
--- a/CMakeLists.txt
22+
+++ b/CMakeLists.txt
23+
@@ -176,8 +176,7 @@ else ()
24+
message (STATUS "INFO - Override arch is ${DETECTED_ARCH}")
25+
endif()
26+
27+
-if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
28+
- OR DETECTED_ARCH STREQUAL "i386")
29+
+if (DETECTED_ARCH MATCHES "i?86" OR DETECTED_ARCH STREQUAL "x86_64")
30+
set (X86PLAT ON)
31+
elseif (DETECTED_ARCH MATCHES "arm.*" OR DETECTED_ARCH MATCHES "aarch64")
32+
set (ARMPLAT ON)
33+
--
34+
2.25.1
35+

meta-oe/recipes-extended/mraa/mraa_git.bb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SRCREV = "e15ce6fbc76148ba8835adc92196b0d0a3f245e7"
99
PV = "2.1.0+git${SRCPV}"
1010

1111
SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \
12+
file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \
1213
"
1314

1415
S = "${WORKDIR}/git"
@@ -60,3 +61,5 @@ RDEPENDS_node-${PN} += "nodejs"
6061
### Include desired language bindings ###
6162
PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
6263
PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"
64+
65+
TOOLCHAIN = "gcc"

0 commit comments

Comments
 (0)