[meta-arm,v3,1/5] external-arm-toolchain-versions: also collect binutils/bfd version

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

Details

Message ID 1592526937-38479-2-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>

To be used by SDK packaging for binutils cross.

This code is upstreamed from meta-arago layer.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../conf/distro/include/external-arm-toolchain-versions.inc    | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
index 5c40af2..a89f2f0 100644
--- a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
+++ b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
@@ -117,6 +117,15 @@  def eat_get_gdb_version(d):
         first_line = stdout.splitlines()[0]
         return first_line.split()[-1]
 
+def eat_get_bfd_version(d):
+    try:
+        stdout, stderr = eat_run(d, 'as', '--version')
+    except bb.process.CmdError:
+        return 'UNKNOWN'
+    else:
+        first_line = stdout.splitlines()[0]
+        return first_line.split()[-1]
+
 python external_arm_toolchain_version_handler () {
     if not isinstance(e, bb.event.ConfigParsed):
         return
@@ -129,5 +138,6 @@  python external_arm_toolchain_version_handler () {
     d.setVar('EAT_VER_LIBC', eat_get_libc_version(ld))
     d.setVar('EAT_VER_KERNEL', eat_get_kernel_version(ld))
     d.setVar('EAT_VER_GDB', eat_get_gdb_version(ld))
+    d.setVar('EAT_VER_BFD', eat_get_bfd_version(ld))
 }
 addhandler external_arm_toolchain_version_handler

Comments

Sumit Garg June 23, 2020, 11:38 a.m.
On Fri, 19 Jun 2020 at 06:05, Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> To be used by SDK packaging for binutils cross.
>
> This code is upstreamed from meta-arago layer.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../conf/distro/include/external-arm-toolchain-versions.inc    | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>

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

> diff --git a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
> index 5c40af2..a89f2f0 100644
> --- a/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
> +++ b/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
> @@ -117,6 +117,15 @@ def eat_get_gdb_version(d):
>          first_line = stdout.splitlines()[0]
>          return first_line.split()[-1]
>
> +def eat_get_bfd_version(d):
> +    try:
> +        stdout, stderr = eat_run(d, 'as', '--version')
> +    except bb.process.CmdError:
> +        return 'UNKNOWN'
> +    else:
> +        first_line = stdout.splitlines()[0]
> +        return first_line.split()[-1]
> +
>  python external_arm_toolchain_version_handler () {
>      if not isinstance(e, bb.event.ConfigParsed):
>          return
> @@ -129,5 +138,6 @@ python external_arm_toolchain_version_handler () {
>      d.setVar('EAT_VER_LIBC', eat_get_libc_version(ld))
>      d.setVar('EAT_VER_KERNEL', eat_get_kernel_version(ld))
>      d.setVar('EAT_VER_GDB', eat_get_gdb_version(ld))
> +    d.setVar('EAT_VER_BFD', eat_get_bfd_version(ld))
>  }
>  addhandler external_arm_toolchain_version_handler
> --
> 2.7.4
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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