[meta-arm,v3,3/5] external-arm-toolchain: check for TCLIBC being glibc

Submitted by Denys Dmytriyenko on June 19, 2020, 12:35 a.m. | Patch ID: 173700

Details

Message ID 1592526937-38479-4-git-send-email-denis@denix.org
State New
Headers show

Commit Message

Denys Dmytriyenko June 19, 2020, 12:35 a.m.
From: Denys Dmytriyenko <denys@ti.com>

The old TARGET_OS check doesn't work, as it only checks for uclibc and musl at
the end, while TARGET_OS is usually "linux-musleabi", uclibc has been deprecated
and new options like "newlib" and "baremetal" were added. Plus it only works for
the target, but not SDK. Switch to simply checking for TCLIBC = glibc.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../external-arm-toolchain/external-arm-toolchain.bb              | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
index 73a2cf6..14a585f 100644
--- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
+++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -668,13 +668,9 @@  SUMMARY_libitm-staticdev = "GNU transactional memory support library - static de
 
 EAT_VER_MAIN ??= ""
 
-
 python () {
     if not d.getVar("EAT_VER_MAIN", False):
         raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
-    import re
-    notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None)
-    if notglibc:
-        raise bb.parse.SkipPackage("incompatible with target %s" %
-                                   d.getVar('TARGET_OS', True))
+    if d.getVar('TCLIBC', True) != "glibc":
+        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
 }

Comments

Sumit Garg June 23, 2020, 11:42 a.m.
On Fri, 19 Jun 2020 at 06:05, Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> The old TARGET_OS check doesn't work, as it only checks for uclibc and musl at
> the end, while TARGET_OS is usually "linux-musleabi", uclibc has been deprecated
> and new options like "newlib" and "baremetal" were added. Plus it only works for
> the target, but not SDK. Switch to simply checking for TCLIBC = glibc.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../external-arm-toolchain/external-arm-toolchain.bb              | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>

> diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
> index 73a2cf6..14a585f 100644
> --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
> +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
> @@ -668,13 +668,9 @@ SUMMARY_libitm-staticdev = "GNU transactional memory support library - static de
>
>  EAT_VER_MAIN ??= ""
>
> -
>  python () {
>      if not d.getVar("EAT_VER_MAIN", False):
>          raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
> -    import re
> -    notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None)
> -    if notglibc:
> -        raise bb.parse.SkipPackage("incompatible with target %s" %
> -                                   d.getVar('TARGET_OS', True))
> +    if d.getVar('TCLIBC', True) != "glibc":
> +        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
>  }
> --
> 2.7.4
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#751): https://lists.yoctoproject.org/g/meta-arm/message/751
Mute This Topic: https://lists.yoctoproject.org/mt/74971119/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-