Skip to contentSkip to conversation

support building for Android target

PATCH In review [email protected] 2 participants 5 messages Aug 20, 2021 – Aug 30, 2021

lore
Share & tools
lore
#0 lore raw

cover support building for Android target

From: "Hsia-Jun(Randy) Li" <[email protected]>

You may check the meta-android-ndk I posted to the -devel list before.

Hsia-Jun Li (2):
cross-canadian: skip it for Android bionic
machine_dict: Add Android OS to it

 meta/classes/cross-canadian.bbclass | 2 +-
 meta/lib/oe/elf.py                  | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 cross-canadian: skip it for Android bionic

---
 meta/classes/cross-canadian.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cross-canadian.bbclass +1 -1
index 447a2bb..ce8751e 100644
@@ -32,7 +32,7 @@ python () {
     if d.getVar("MODIFYTOS") != "1":
         return
 
-    if d.getVar("TCLIBC") in [ 'baremetal', 'newlib' ]:
+    if d.getVar("TCLIBC") in [ 'baremetal', 'newlib', 'bionic' ]:
         return
 
     tos = d.getVar("TARGET_OS")
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 machine_dict: Add Android OS to it

In reply to [email protected]
---
 meta/lib/oe/elf.py | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/lib/oe/elf.py +8 -0
index df0a459..46c884a 100644
@@ -61,6 +61,14 @@ def machine_dict(d):
                         "microblaze":  (189,   0,    0,          False,         32),
                         "microblazeel":(189,   0,    0,          True,          32),
                       },
+            "linux-android" : {
+                        "aarch64" :   (183,    0,    0,          True,          64),
+                        "i686":       ( 3,     0,    0,          True,          32),
+                        "x86_64":     (62,     0,    0,          True,          64),
+                      },
+            "linux-androideabi" : {
+                        "arm" :       (40,    97,    0,          True,          32),
+                      },
             "linux-musl" : { 
                         "aarch64" :   (183,    0,    0,            True,          64),
                         "aarch64_be" :(183,    0,    0,            False,         64),
Signature · 1 line
2.7.4
#3 lore raw
In reply to [email protected]
Quoted 5 lines · Hsia-Jun Li

From: "Hsia-Jun(Randy) Li" <[email protected]>

You may check the meta-android-ndk I posted to the -devel list before.

These patches look ok. Can you explain why we want to ignore canadian sdk for bionic ?

Quoted 12 lines

Hsia-Jun Li (2):
cross-canadian: skip it for Android bionic
machine_dict: Add Android OS to it

  meta/classes/cross-canadian.bbclass | 2 +-
  meta/lib/oe/elf.py                  | 8 ++++++++
  2 files changed, 9 insertions(+), 1 deletion(-)
#4 lore raw
Quoted 4 lines · Khem Raj

CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe.

On 8/19/21 11:11 PM, Hsia-Jun Li wrote:

Quoted 8 lines
Quoted 5 lines

From: "Hsia-Jun(Randy) Li" <[email protected]>

You may check the meta-android-ndk I posted to the -devel list before.

These patches look ok. Can you explain why we want to ignore canadian sdk for bionic ?

Sorry for later reply

Because it is hard to let android ndk toolchain pass the whitelist in that script.

The libc used in Android is bionic but the android ndk toolchain would not take that name in its prefix.

Quoted 17 lines
Quoted 13 lines

Hsia-Jun Li (2):
   cross-canadian: skip it for Android bionic
   machine_dict: Add Android OS to it

  meta/classes/cross-canadian.bbclass | 2 +- meta/lib/oe/elf.py                  | 8 ++++++++

  2 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
Hsia-Jun(Randy) Li