All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] external-arm-toolchain-versions: also collect binutils/bfd version
@ 2020-06-15  8:07 Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version Denys Dmytriyenko
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15  8:07 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

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(+)

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version
  2020-06-15  8:07 [PATCH 1/4] external-arm-toolchain-versions: also collect binutils/bfd version Denys Dmytriyenko
@ 2020-06-15  8:07 ` Denys Dmytriyenko
  2020-06-15 10:55   ` [meta-arm] " Sumit Garg
  2020-06-15  8:07 ` [PATCH 3/4] external-arm-toolchain: check for TCLIBC being glibc Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries Denys Dmytriyenko
  2 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15  8:07 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

This code is upstreamed from meta-arago layer.

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

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 a89f2f0..6121adf 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
@@ -126,6 +126,20 @@ def eat_get_bfd_version(d):
         first_line = stdout.splitlines()[0]
         return first_line.split()[-1]
 
+# Licenses set for main components of the toolchain:
+# (g)libc is always LGPL version 2 (or later)
+# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1,
+#    see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html
+# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but
+#    it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception
+#    was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html
+#    and http://www.gnu.org/licenses/gcc-exception.html, which was several days after
+#    gcc 4.3.3 was released - http://gcc.gnu.org/releases.html
+# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according
+#    to the release schedule - http://www.gnu.org/software/gdb/schedule/
+# binutils version 2.17 was the last one under GPL version 2 (or later), according
+#    to the published releases - http://ftp.gnu.org/gnu/binutils/
+
 python external_arm_toolchain_version_handler () {
     if not isinstance(e, bb.event.ConfigParsed):
         return
@@ -139,5 +153,19 @@ python external_arm_toolchain_version_handler () {
     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))
+
+    lc_libc = "LGPL-2.1"
+    lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"]
+    lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"]
+    lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"]
+    lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"]
+
+    d.setVar('EAT_LIBC_LICENSE', lc_libc)
+    d.setVar('EAT_GCC_LICENSE', lc_gcc)
+    d.setVar('EAT_RLE_LICENSE', lc_rle)
+    d.setVar('EAT_GDB_LICENSE', lc_gdb)
+    d.setVar('EAT_BFD_LICENSE', lc_bfd)
+
+    d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))
 }
 addhandler external_arm_toolchain_version_handler
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] external-arm-toolchain: check for TCLIBC being glibc
  2020-06-15  8:07 [PATCH 1/4] external-arm-toolchain-versions: also collect binutils/bfd version Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version Denys Dmytriyenko
@ 2020-06-15  8:07 ` Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries Denys Dmytriyenko
  2 siblings, 0 replies; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15  8:07 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

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(-)

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 8cfc208..cfceb56 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
@@ -655,13 +655,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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
  2020-06-15  8:07 [PATCH 1/4] external-arm-toolchain-versions: also collect binutils/bfd version Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version Denys Dmytriyenko
  2020-06-15  8:07 ` [PATCH 3/4] external-arm-toolchain: check for TCLIBC being glibc Denys Dmytriyenko
@ 2020-06-15  8:07 ` Denys Dmytriyenko
  2020-06-15 12:45   ` [meta-arm] " Sumit Garg
  2 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15  8:07 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Allows re-use of prebuilt ARM toolchain binaries for SDK generation.

This code is upstreamed from meta-arago layer.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 .../conf/distro/include/tcmode-external-arm.inc    |   4 +
 .../external-arm-sdk-toolchain.bb                  | 136 +++++++++++++++++++++
 2 files changed, 140 insertions(+)
 create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb

diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
index 9171380..08b87ef 100644
--- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
+++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
@@ -45,6 +45,10 @@ PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain"
 PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain"
 PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain"
 
+PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
+PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
+PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
+
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
 
 DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \
diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
new file mode 100644
index 0000000..88fd20e
--- /dev/null
+++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
@@ -0,0 +1,136 @@
+inherit cross-canadian
+
+PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
+BPN = "external-arm-sdk-toolchain"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_SHLIBS = "1"
+
+EAT_LICENSE ??= ""
+
+LICENSE = "${EAT_LICENSE}"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+INSANE_SKIP_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
+INSANE_SKIP_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
+INSANE_SKIP_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
+
+PROVIDES = "\
+	gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+	gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+	binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+"
+
+PACKAGES = "\
+	gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+	gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+	binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+"
+
+# Adjust defaults in line with external toolchain
+bindir = "${exec_prefix}/bin"
+libdir = "${exec_prefix}/lib"
+libexecdir = "${exec_prefix}/libexec"
+datadir = "${exec_prefix}/share"
+gcclibdir = "${libdir}/gcc"
+
+FILES_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+	${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
+	${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
+	${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
+	${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
+	${bindir}/${TARGET_PREFIX}gcov \
+	${bindir}/${TARGET_PREFIX}gcc* \
+	${bindir}/${TARGET_PREFIX}g++ \
+	${bindir}/${TARGET_PREFIX}cpp \
+	${libexecdir}/* \
+"
+
+FILES_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+	${bindir}/${TARGET_PREFIX}gdb* \
+	${datadir}/gdb/* \
+"
+
+FILES_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+	${prefix}/${EAT_TARGET_SYS}/bin/ld* \
+	${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
+	${prefix}/${EAT_TARGET_SYS}/bin/strip \
+	${prefix}/${EAT_TARGET_SYS}/bin/nm \
+	${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
+	${prefix}/${EAT_TARGET_SYS}/bin/as \
+	${prefix}/${EAT_TARGET_SYS}/bin/ar \
+	${prefix}/${EAT_TARGET_SYS}/bin/objdump \
+	${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
+	${bindir}/${TARGET_PREFIX}ld* \
+	${bindir}/${TARGET_PREFIX}addr2line \
+	${bindir}/${TARGET_PREFIX}objcopy \
+	${bindir}/${TARGET_PREFIX}readelf \
+	${bindir}/${TARGET_PREFIX}strip \
+	${bindir}/${TARGET_PREFIX}nm \
+	${bindir}/${TARGET_PREFIX}ranlib \
+	${bindir}/${TARGET_PREFIX}gprof \
+	${bindir}/${TARGET_PREFIX}as \
+	${bindir}/${TARGET_PREFIX}c++filt \
+	${bindir}/${TARGET_PREFIX}ar \
+	${bindir}/${TARGET_PREFIX}strings \
+	${bindir}/${TARGET_PREFIX}objdump \
+	${bindir}/${TARGET_PREFIX}size \
+"
+
+DESCRIPTION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
+DESCRIPTION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
+DESCRIPTION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
+
+LICENSE_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
+LICENSE_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
+LICENSE_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
+
+PKGV_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
+PKGV_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
+PKGV_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
+
+do_install() {
+	install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
+	install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
+	install -d ${D}${bindir}
+	install -d ${D}${libdir}
+	install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
+	install -d ${D}${libexecdir}
+	install -d ${D}${datadir}/gdb
+	install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
+
+	CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
+
+	# gcc
+	for i in libstdc++.* libgcc_s.* libsupc++.*; do
+		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
+	done
+	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
+	for i in gcov gcc* g++ cpp; do
+		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
+	done
+	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
+
+	# gdb
+	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
+	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
+
+	# binutils
+	for i in ld* objcopy strip nm ranlib as ar objdump; do
+		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
+	done
+	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
+	for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
+		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
+	done
+}
+
+python () {
+    if not d.getVar("EAT_VER_MAIN", False):
+        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
+    if d.getVar('TCLIBC', True) != "glibc":
+        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
+}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version
  2020-06-15  8:07 ` [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version Denys Dmytriyenko
@ 2020-06-15 10:55   ` Sumit Garg
  2020-06-15 18:14     ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Sumit Garg @ 2020-06-15 10:55 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arm, Denys Dmytriyenko

On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> This code is upstreamed from meta-arago layer.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../include/external-arm-toolchain-versions.inc    | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> 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 a89f2f0..6121adf 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
> @@ -126,6 +126,20 @@ def eat_get_bfd_version(d):
>          first_line = stdout.splitlines()[0]
>          return first_line.split()[-1]
>
> +# Licenses set for main components of the toolchain:
> +# (g)libc is always LGPL version 2 (or later)
> +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1,
> +#    see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html
> +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but
> +#    it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception
> +#    was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html
> +#    and http://www.gnu.org/licenses/gcc-exception.html, which was several days after
> +#    gcc 4.3.3 was released - http://gcc.gnu.org/releases.html
> +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according
> +#    to the release schedule - http://www.gnu.org/software/gdb/schedule/
> +# binutils version 2.17 was the last one under GPL version 2 (or later), according
> +#    to the published releases - http://ftp.gnu.org/gnu/binutils/
> +
>  python external_arm_toolchain_version_handler () {
>      if not isinstance(e, bb.event.ConfigParsed):
>          return
> @@ -139,5 +153,19 @@ python external_arm_toolchain_version_handler () {
>      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))
> +
> +    lc_libc = "LGPL-2.1"
> +    lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"]
> +    lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"]
> +    lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"]
> +    lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"]
> +
> +    d.setVar('EAT_LIBC_LICENSE', lc_libc)
> +    d.setVar('EAT_GCC_LICENSE', lc_gcc)
> +    d.setVar('EAT_RLE_LICENSE', lc_rle)
> +    d.setVar('EAT_GDB_LICENSE', lc_gdb)
> +    d.setVar('EAT_BFD_LICENSE', lc_bfd)
> +
> +    d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))

Do we really need this dynamic computation of license based on
toolchain versions? As pre-built GNU Arm toolchains [1] only support
versions > 8.

[1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

-Sumit

>  }
>  addhandler external_arm_toolchain_version_handler
> --
> 2.7.4
>
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
  2020-06-15  8:07 ` [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries Denys Dmytriyenko
@ 2020-06-15 12:45   ` Sumit Garg
  2020-06-15 18:20     ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Sumit Garg @ 2020-06-15 12:45 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arm, Denys Dmytriyenko

On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> Allows re-use of prebuilt ARM toolchain binaries for SDK generation.
>
> This code is upstreamed from meta-arago layer.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  .../conf/distro/include/tcmode-external-arm.inc    |   4 +
>  .../external-arm-sdk-toolchain.bb                  | 136 +++++++++++++++++++++
>  2 files changed, 140 insertions(+)
>  create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
>

Thanks for pushing this recipe upstream. It's good to have the tools
binaries packaged in SDK from pre-built toolchain rather than building
from source.

So I just gave it a try using poky distro which fails with following error:

$ bitbake -c populate_sdk core-image-base
<snip>
Error:
 Problem: package
packagegroup-cross-canadian-qemuarm64-1.0-r0.x86_64_nativesdk requires
gdb-cross-canadian-aarch64, but none of the providers can be installed
  - conflicting requests
  - nothing provides libpython2.7.so.1.0()(64bit) needed by
gdb-cross-canadian-aarch64-8.3.0.20190709+git-r0.x86_64_nativesdk
(try to add '--skip-broken' to skip uninstallable packages)
<snip>

Is there something that I missed while testing?

-Sumit

> diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> index 9171380..08b87ef 100644
> --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> @@ -45,6 +45,10 @@ PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain"
>  PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain"
>  PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain"
>
> +PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> +PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> +PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> +
>  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
>
>  DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \
> diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> new file mode 100644
> index 0000000..88fd20e
> --- /dev/null
> +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> @@ -0,0 +1,136 @@
> +inherit cross-canadian
> +
> +PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
> +BPN = "external-arm-sdk-toolchain"
> +
> +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> +INHIBIT_PACKAGE_STRIP = "1"
> +INHIBIT_SYSROOT_STRIP = "1"
> +INHIBIT_DEFAULT_DEPS = "1"
> +EXCLUDE_FROM_SHLIBS = "1"
> +
> +EAT_LICENSE ??= ""
> +
> +LICENSE = "${EAT_LICENSE}"
> +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> +
> +INSANE_SKIP_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
> +INSANE_SKIP_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> +INSANE_SKIP_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> +
> +PROVIDES = "\
> +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +"
> +
> +PACKAGES = "\
> +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> +"
> +
> +# Adjust defaults in line with external toolchain
> +bindir = "${exec_prefix}/bin"
> +libdir = "${exec_prefix}/lib"
> +libexecdir = "${exec_prefix}/libexec"
> +datadir = "${exec_prefix}/share"
> +gcclibdir = "${libdir}/gcc"
> +
> +FILES_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> +       ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
> +       ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
> +       ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
> +       ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
> +       ${bindir}/${TARGET_PREFIX}gcov \
> +       ${bindir}/${TARGET_PREFIX}gcc* \
> +       ${bindir}/${TARGET_PREFIX}g++ \
> +       ${bindir}/${TARGET_PREFIX}cpp \
> +       ${libexecdir}/* \
> +"
> +
> +FILES_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> +       ${bindir}/${TARGET_PREFIX}gdb* \
> +       ${datadir}/gdb/* \
> +"
> +
> +FILES_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> +       ${prefix}/${EAT_TARGET_SYS}/bin/ld* \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/strip \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/nm \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/as \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/ar \
> +       ${prefix}/${EAT_TARGET_SYS}/bin/objdump \
> +       ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
> +       ${bindir}/${TARGET_PREFIX}ld* \
> +       ${bindir}/${TARGET_PREFIX}addr2line \
> +       ${bindir}/${TARGET_PREFIX}objcopy \
> +       ${bindir}/${TARGET_PREFIX}readelf \
> +       ${bindir}/${TARGET_PREFIX}strip \
> +       ${bindir}/${TARGET_PREFIX}nm \
> +       ${bindir}/${TARGET_PREFIX}ranlib \
> +       ${bindir}/${TARGET_PREFIX}gprof \
> +       ${bindir}/${TARGET_PREFIX}as \
> +       ${bindir}/${TARGET_PREFIX}c++filt \
> +       ${bindir}/${TARGET_PREFIX}ar \
> +       ${bindir}/${TARGET_PREFIX}strings \
> +       ${bindir}/${TARGET_PREFIX}objdump \
> +       ${bindir}/${TARGET_PREFIX}size \
> +"
> +
> +DESCRIPTION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
> +DESCRIPTION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
> +DESCRIPTION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
> +
> +LICENSE_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
> +LICENSE_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
> +LICENSE_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
> +
> +PKGV_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
> +PKGV_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
> +PKGV_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
> +
> +do_install() {
> +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
> +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
> +       install -d ${D}${bindir}
> +       install -d ${D}${libdir}
> +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> +       install -d ${D}${libexecdir}
> +       install -d ${D}${datadir}/gdb
> +       install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
> +
> +       CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> +
> +       # gcc
> +       for i in libstdc++.* libgcc_s.* libsupc++.*; do
> +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
> +       done
> +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
> +       for i in gcov gcc* g++ cpp; do
> +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> +       done
> +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
> +
> +       # gdb
> +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
> +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
> +
> +       # binutils
> +       for i in ld* objcopy strip nm ranlib as ar objdump; do
> +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
> +       done
> +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> +       for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
> +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> +       done
> +}
> +
> +python () {
> +    if not d.getVar("EAT_VER_MAIN", False):
> +        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
> +    if d.getVar('TCLIBC', True) != "glibc":
> +        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
> +}
> --
> 2.7.4
>
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version
  2020-06-15 10:55   ` [meta-arm] " Sumit Garg
@ 2020-06-15 18:14     ` Denys Dmytriyenko
  2020-06-16  5:51       ` Sumit Garg
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15 18:14 UTC (permalink / raw)
  To: Sumit Garg; +Cc: meta-arm, Denys Dmytriyenko

On Mon, Jun 15, 2020 at 04:25:13PM +0530, Sumit Garg wrote:
> On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> >
> > From: Denys Dmytriyenko <denys@ti.com>
> >
> > This code is upstreamed from meta-arago layer.
> >
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> >  .../include/external-arm-toolchain-versions.inc    | 28 ++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
> > 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 a89f2f0..6121adf 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
> > @@ -126,6 +126,20 @@ def eat_get_bfd_version(d):
> >          first_line = stdout.splitlines()[0]
> >          return first_line.split()[-1]
> >
> > +# Licenses set for main components of the toolchain:
> > +# (g)libc is always LGPL version 2 (or later)
> > +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1,
> > +#    see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html
> > +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but
> > +#    it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception
> > +#    was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html
> > +#    and http://www.gnu.org/licenses/gcc-exception.html, which was several days after
> > +#    gcc 4.3.3 was released - http://gcc.gnu.org/releases.html
> > +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according
> > +#    to the release schedule - http://www.gnu.org/software/gdb/schedule/
> > +# binutils version 2.17 was the last one under GPL version 2 (or later), according
> > +#    to the published releases - http://ftp.gnu.org/gnu/binutils/
> > +
> >  python external_arm_toolchain_version_handler () {
> >      if not isinstance(e, bb.event.ConfigParsed):
> >          return
> > @@ -139,5 +153,19 @@ python external_arm_toolchain_version_handler () {
> >      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))
> > +
> > +    lc_libc = "LGPL-2.1"
> > +    lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"]
> > +    lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"]
> > +    lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"]
> > +    lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"]
> > +
> > +    d.setVar('EAT_LIBC_LICENSE', lc_libc)
> > +    d.setVar('EAT_GCC_LICENSE', lc_gcc)
> > +    d.setVar('EAT_RLE_LICENSE', lc_rle)
> > +    d.setVar('EAT_GDB_LICENSE', lc_gdb)
> > +    d.setVar('EAT_BFD_LICENSE', lc_bfd)
> > +
> > +    d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))
> 
> Do we really need this dynamic computation of license based on
> toolchain versions? As pre-built GNU Arm toolchains [1] only support
> versions > 8.

I needed gcc, gdb and binutils licenses set in central location for the new 
recipe and I already had this code handy, so I just copied it over.

I guess we can drop the conditional part of it and set the vars statically. 
But setting them here is better than in the recipe, as they can be re-used 
in multiple recipes.

-- 
Denys


> [1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
> 
> -Sumit
> 
> >  }
> >  addhandler external_arm_toolchain_version_handler
> > --
> > 2.7.4
> >
> > 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
  2020-06-15 12:45   ` [meta-arm] " Sumit Garg
@ 2020-06-15 18:20     ` Denys Dmytriyenko
  2020-06-16  5:56       ` Sumit Garg
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-15 18:20 UTC (permalink / raw)
  To: Sumit Garg; +Cc: meta-arm, Denys Dmytriyenko

On Mon, Jun 15, 2020 at 06:15:17PM +0530, Sumit Garg wrote:
> On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> >
> > From: Denys Dmytriyenko <denys@ti.com>
> >
> > Allows re-use of prebuilt ARM toolchain binaries for SDK generation.
> >
> > This code is upstreamed from meta-arago layer.
> >
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> >  .../conf/distro/include/tcmode-external-arm.inc    |   4 +
> >  .../external-arm-sdk-toolchain.bb                  | 136 +++++++++++++++++++++
> >  2 files changed, 140 insertions(+)
> >  create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> >
> 
> Thanks for pushing this recipe upstream. It's good to have the tools
> binaries packaged in SDK from pre-built toolchain rather than building
> from source.
> 
> So I just gave it a try using poky distro which fails with following error:
> 
> $ bitbake -c populate_sdk core-image-base
> <snip>
> Error:
>  Problem: package
> packagegroup-cross-canadian-qemuarm64-1.0-r0.x86_64_nativesdk requires
> gdb-cross-canadian-aarch64, but none of the providers can be installed
>   - conflicting requests
>   - nothing provides libpython2.7.so.1.0()(64bit) needed by
> gdb-cross-canadian-aarch64-8.3.0.20190709+git-r0.x86_64_nativesdk

^^^ looks like 8.3 toolchain has some python2-linked binaries, which would 
require dependency on meta-python2. Let me check which binary is that, maybe 
we can just drop it. Or we can just skip this check with INSANE_SKIP...

BTW, I don't see this issue with 9.2 toolchain.

-- 
Denys


> (try to add '--skip-broken' to skip uninstallable packages)
> <snip>
> 
> Is there something that I missed while testing?
> 
> -Sumit
> 
> > diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > index 9171380..08b87ef 100644
> > --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > @@ -45,6 +45,10 @@ PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain"
> >  PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain"
> >  PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain"
> >
> > +PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > +PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > +PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > +
> >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
> >
> >  DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \
> > diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > new file mode 100644
> > index 0000000..88fd20e
> > --- /dev/null
> > +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > @@ -0,0 +1,136 @@
> > +inherit cross-canadian
> > +
> > +PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
> > +BPN = "external-arm-sdk-toolchain"
> > +
> > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> > +INHIBIT_PACKAGE_STRIP = "1"
> > +INHIBIT_SYSROOT_STRIP = "1"
> > +INHIBIT_DEFAULT_DEPS = "1"
> > +EXCLUDE_FROM_SHLIBS = "1"
> > +
> > +EAT_LICENSE ??= ""
> > +
> > +LICENSE = "${EAT_LICENSE}"
> > +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> > +
> > +INSANE_SKIP_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
> > +INSANE_SKIP_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > +INSANE_SKIP_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > +
> > +PROVIDES = "\
> > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +"
> > +
> > +PACKAGES = "\
> > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > +"
> > +
> > +# Adjust defaults in line with external toolchain
> > +bindir = "${exec_prefix}/bin"
> > +libdir = "${exec_prefix}/lib"
> > +libexecdir = "${exec_prefix}/libexec"
> > +datadir = "${exec_prefix}/share"
> > +gcclibdir = "${libdir}/gcc"
> > +
> > +FILES_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > +       ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
> > +       ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
> > +       ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
> > +       ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
> > +       ${bindir}/${TARGET_PREFIX}gcov \
> > +       ${bindir}/${TARGET_PREFIX}gcc* \
> > +       ${bindir}/${TARGET_PREFIX}g++ \
> > +       ${bindir}/${TARGET_PREFIX}cpp \
> > +       ${libexecdir}/* \
> > +"
> > +
> > +FILES_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > +       ${bindir}/${TARGET_PREFIX}gdb* \
> > +       ${datadir}/gdb/* \
> > +"
> > +
> > +FILES_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/ld* \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/strip \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/nm \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/as \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/ar \
> > +       ${prefix}/${EAT_TARGET_SYS}/bin/objdump \
> > +       ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
> > +       ${bindir}/${TARGET_PREFIX}ld* \
> > +       ${bindir}/${TARGET_PREFIX}addr2line \
> > +       ${bindir}/${TARGET_PREFIX}objcopy \
> > +       ${bindir}/${TARGET_PREFIX}readelf \
> > +       ${bindir}/${TARGET_PREFIX}strip \
> > +       ${bindir}/${TARGET_PREFIX}nm \
> > +       ${bindir}/${TARGET_PREFIX}ranlib \
> > +       ${bindir}/${TARGET_PREFIX}gprof \
> > +       ${bindir}/${TARGET_PREFIX}as \
> > +       ${bindir}/${TARGET_PREFIX}c++filt \
> > +       ${bindir}/${TARGET_PREFIX}ar \
> > +       ${bindir}/${TARGET_PREFIX}strings \
> > +       ${bindir}/${TARGET_PREFIX}objdump \
> > +       ${bindir}/${TARGET_PREFIX}size \
> > +"
> > +
> > +DESCRIPTION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
> > +DESCRIPTION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
> > +DESCRIPTION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
> > +
> > +LICENSE_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
> > +LICENSE_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
> > +LICENSE_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
> > +
> > +PKGV_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
> > +PKGV_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
> > +PKGV_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
> > +
> > +do_install() {
> > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > +       install -d ${D}${bindir}
> > +       install -d ${D}${libdir}
> > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > +       install -d ${D}${libexecdir}
> > +       install -d ${D}${datadir}/gdb
> > +       install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
> > +
> > +       CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> > +
> > +       # gcc
> > +       for i in libstdc++.* libgcc_s.* libsupc++.*; do
> > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > +       done
> > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
> > +       for i in gcov gcc* g++ cpp; do
> > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > +       done
> > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
> > +
> > +       # gdb
> > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
> > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
> > +
> > +       # binutils
> > +       for i in ld* objcopy strip nm ranlib as ar objdump; do
> > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > +       done
> > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > +       for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
> > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > +       done
> > +}
> > +
> > +python () {
> > +    if not d.getVar("EAT_VER_MAIN", False):
> > +        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
> > +    if d.getVar('TCLIBC', True) != "glibc":
> > +        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
> > +}
> > --
> > 2.7.4
> >
> > 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version
  2020-06-15 18:14     ` Denys Dmytriyenko
@ 2020-06-16  5:51       ` Sumit Garg
  2020-06-17 19:23         ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Sumit Garg @ 2020-06-16  5:51 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arm, Denys Dmytriyenko

On Mon, 15 Jun 2020 at 23:44, Denys Dmytriyenko <denis@denix.org> wrote:
>
> On Mon, Jun 15, 2020 at 04:25:13PM +0530, Sumit Garg wrote:
> > On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> > >
> > > From: Denys Dmytriyenko <denys@ti.com>
> > >
> > > This code is upstreamed from meta-arago layer.
> > >
> > > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > > ---
> > >  .../include/external-arm-toolchain-versions.inc    | 28 ++++++++++++++++++++++
> > >  1 file changed, 28 insertions(+)
> > >
> > > 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 a89f2f0..6121adf 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
> > > @@ -126,6 +126,20 @@ def eat_get_bfd_version(d):
> > >          first_line = stdout.splitlines()[0]
> > >          return first_line.split()[-1]
> > >
> > > +# Licenses set for main components of the toolchain:
> > > +# (g)libc is always LGPL version 2 (or later)
> > > +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1,
> > > +#    see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html
> > > +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but
> > > +#    it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception
> > > +#    was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html
> > > +#    and http://www.gnu.org/licenses/gcc-exception.html, which was several days after
> > > +#    gcc 4.3.3 was released - http://gcc.gnu.org/releases.html
> > > +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according
> > > +#    to the release schedule - http://www.gnu.org/software/gdb/schedule/
> > > +# binutils version 2.17 was the last one under GPL version 2 (or later), according
> > > +#    to the published releases - http://ftp.gnu.org/gnu/binutils/
> > > +
> > >  python external_arm_toolchain_version_handler () {
> > >      if not isinstance(e, bb.event.ConfigParsed):
> > >          return
> > > @@ -139,5 +153,19 @@ python external_arm_toolchain_version_handler () {
> > >      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))
> > > +
> > > +    lc_libc = "LGPL-2.1"
> > > +    lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"]
> > > +    lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"]
> > > +    lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"]
> > > +    lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"]
> > > +
> > > +    d.setVar('EAT_LIBC_LICENSE', lc_libc)
> > > +    d.setVar('EAT_GCC_LICENSE', lc_gcc)
> > > +    d.setVar('EAT_RLE_LICENSE', lc_rle)
> > > +    d.setVar('EAT_GDB_LICENSE', lc_gdb)
> > > +    d.setVar('EAT_BFD_LICENSE', lc_bfd)
> > > +
> > > +    d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))
> >
> > Do we really need this dynamic computation of license based on
> > toolchain versions? As pre-built GNU Arm toolchains [1] only support
> > versions > 8.
>
> I needed gcc, gdb and binutils licenses set in central location for the new
> recipe and I already had this code handy, so I just copied it over.
>
> I guess we can drop the conditional part of it and set the vars statically.
> But setting them here is better than in the recipe, as they can be re-used
> in multiple recipes.
>

Sounds reasonable. Could you rebase it on top of mine patch-set and
let license.inc [1] reuse these static defines?

[1] https://lists.yoctoproject.org/g/meta-arm/message/647

-Sumit

> --
> Denys
>
>
> > [1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
> >
> > -Sumit
> >
> > >  }
> > >  addhandler external_arm_toolchain_version_handler
> > > --
> > > 2.7.4
> > >
> > > 
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
  2020-06-15 18:20     ` Denys Dmytriyenko
@ 2020-06-16  5:56       ` Sumit Garg
  2020-06-18  3:29         ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Sumit Garg @ 2020-06-16  5:56 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arm, Denys Dmytriyenko

On Mon, 15 Jun 2020 at 23:50, Denys Dmytriyenko <denis@denix.org> wrote:
>
> On Mon, Jun 15, 2020 at 06:15:17PM +0530, Sumit Garg wrote:
> > On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> > >
> > > From: Denys Dmytriyenko <denys@ti.com>
> > >
> > > Allows re-use of prebuilt ARM toolchain binaries for SDK generation.
> > >
> > > This code is upstreamed from meta-arago layer.
> > >
> > > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > > ---
> > >  .../conf/distro/include/tcmode-external-arm.inc    |   4 +
> > >  .../external-arm-sdk-toolchain.bb                  | 136 +++++++++++++++++++++
> > >  2 files changed, 140 insertions(+)
> > >  create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > >
> >
> > Thanks for pushing this recipe upstream. It's good to have the tools
> > binaries packaged in SDK from pre-built toolchain rather than building
> > from source.
> >
> > So I just gave it a try using poky distro which fails with following error:
> >
> > $ bitbake -c populate_sdk core-image-base
> > <snip>
> > Error:
> >  Problem: package
> > packagegroup-cross-canadian-qemuarm64-1.0-r0.x86_64_nativesdk requires
> > gdb-cross-canadian-aarch64, but none of the providers can be installed
> >   - conflicting requests
> >   - nothing provides libpython2.7.so.1.0()(64bit) needed by
> > gdb-cross-canadian-aarch64-8.3.0.20190709+git-r0.x86_64_nativesdk
>
> ^^^ looks like 8.3 toolchain has some python2-linked binaries, which would
> require dependency on meta-python2.

Here 8.3.0 is gdb version rather than toolchain version. See below:

$ ~/tc_install/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gdb
--version
GNU gdb (GNU Toolchain for the A-profile Architecture 9.2-2019.12
(arm-9.10)) 8.3.0.20190709-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

> Let me check which binary is that, maybe
> we can just drop it. Or we can just skip this check with INSANE_SKIP...
>
> BTW, I don't see this issue with 9.2 toolchain.
>

Strangely, I see this issue with 9.2 toolchain for aarch64.

-Sumit

> --
> Denys
>
>
> > (try to add '--skip-broken' to skip uninstallable packages)
> > <snip>
> >
> > Is there something that I missed while testing?
> >
> > -Sumit
> >
> > > diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > index 9171380..08b87ef 100644
> > > --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > @@ -45,6 +45,10 @@ PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain"
> > >  PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain"
> > >  PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain"
> > >
> > > +PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > +PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > +PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > +
> > >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
> > >
> > >  DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \
> > > diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > > new file mode 100644
> > > index 0000000..88fd20e
> > > --- /dev/null
> > > +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > > @@ -0,0 +1,136 @@
> > > +inherit cross-canadian
> > > +
> > > +PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
> > > +BPN = "external-arm-sdk-toolchain"
> > > +
> > > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> > > +INHIBIT_PACKAGE_STRIP = "1"
> > > +INHIBIT_SYSROOT_STRIP = "1"
> > > +INHIBIT_DEFAULT_DEPS = "1"
> > > +EXCLUDE_FROM_SHLIBS = "1"
> > > +
> > > +EAT_LICENSE ??= ""
> > > +
> > > +LICENSE = "${EAT_LICENSE}"
> > > +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> > > +
> > > +INSANE_SKIP_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
> > > +INSANE_SKIP_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > > +INSANE_SKIP_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > > +
> > > +PROVIDES = "\
> > > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +"
> > > +
> > > +PACKAGES = "\
> > > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > +"
> > > +
> > > +# Adjust defaults in line with external toolchain
> > > +bindir = "${exec_prefix}/bin"
> > > +libdir = "${exec_prefix}/lib"
> > > +libexecdir = "${exec_prefix}/libexec"
> > > +datadir = "${exec_prefix}/share"
> > > +gcclibdir = "${libdir}/gcc"
> > > +
> > > +FILES_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
> > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
> > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
> > > +       ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
> > > +       ${bindir}/${TARGET_PREFIX}gcov \
> > > +       ${bindir}/${TARGET_PREFIX}gcc* \
> > > +       ${bindir}/${TARGET_PREFIX}g++ \
> > > +       ${bindir}/${TARGET_PREFIX}cpp \
> > > +       ${libexecdir}/* \
> > > +"
> > > +
> > > +FILES_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > +       ${bindir}/${TARGET_PREFIX}gdb* \
> > > +       ${datadir}/gdb/* \
> > > +"
> > > +
> > > +FILES_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ld* \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/strip \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/nm \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/as \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ar \
> > > +       ${prefix}/${EAT_TARGET_SYS}/bin/objdump \
> > > +       ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
> > > +       ${bindir}/${TARGET_PREFIX}ld* \
> > > +       ${bindir}/${TARGET_PREFIX}addr2line \
> > > +       ${bindir}/${TARGET_PREFIX}objcopy \
> > > +       ${bindir}/${TARGET_PREFIX}readelf \
> > > +       ${bindir}/${TARGET_PREFIX}strip \
> > > +       ${bindir}/${TARGET_PREFIX}nm \
> > > +       ${bindir}/${TARGET_PREFIX}ranlib \
> > > +       ${bindir}/${TARGET_PREFIX}gprof \
> > > +       ${bindir}/${TARGET_PREFIX}as \
> > > +       ${bindir}/${TARGET_PREFIX}c++filt \
> > > +       ${bindir}/${TARGET_PREFIX}ar \
> > > +       ${bindir}/${TARGET_PREFIX}strings \
> > > +       ${bindir}/${TARGET_PREFIX}objdump \
> > > +       ${bindir}/${TARGET_PREFIX}size \
> > > +"
> > > +
> > > +DESCRIPTION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
> > > +DESCRIPTION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
> > > +DESCRIPTION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
> > > +
> > > +LICENSE_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
> > > +LICENSE_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
> > > +LICENSE_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
> > > +
> > > +PKGV_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
> > > +PKGV_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
> > > +PKGV_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
> > > +
> > > +do_install() {
> > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > > +       install -d ${D}${bindir}
> > > +       install -d ${D}${libdir}
> > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > > +       install -d ${D}${libexecdir}
> > > +       install -d ${D}${datadir}/gdb
> > > +       install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
> > > +
> > > +       CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> > > +
> > > +       # gcc
> > > +       for i in libstdc++.* libgcc_s.* libsupc++.*; do
> > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > > +       done
> > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
> > > +       for i in gcov gcc* g++ cpp; do
> > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > > +       done
> > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
> > > +
> > > +       # gdb
> > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
> > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
> > > +
> > > +       # binutils
> > > +       for i in ld* objcopy strip nm ranlib as ar objdump; do
> > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > > +       done
> > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > > +       for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
> > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > > +       done
> > > +}
> > > +
> > > +python () {
> > > +    if not d.getVar("EAT_VER_MAIN", False):
> > > +        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
> > > +    if d.getVar('TCLIBC', True) != "glibc":
> > > +        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
> > > +}
> > > --
> > > 2.7.4
> > >
> > > 
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version
  2020-06-16  5:51       ` Sumit Garg
@ 2020-06-17 19:23         ` Denys Dmytriyenko
  0 siblings, 0 replies; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-17 19:23 UTC (permalink / raw)
  To: Sumit Garg; +Cc: meta-arm, Denys Dmytriyenko

On Tue, Jun 16, 2020 at 11:21:08AM +0530, Sumit Garg wrote:
> On Mon, 15 Jun 2020 at 23:44, Denys Dmytriyenko <denis@denix.org> wrote:
> >
> > On Mon, Jun 15, 2020 at 04:25:13PM +0530, Sumit Garg wrote:
> > > On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> > > >
> > > > From: Denys Dmytriyenko <denys@ti.com>
> > > >
> > > > This code is upstreamed from meta-arago layer.
> > > >
> > > > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > > > ---
> > > >  .../include/external-arm-toolchain-versions.inc    | 28 ++++++++++++++++++++++
> > > >  1 file changed, 28 insertions(+)
> > > >
> > > > 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 a89f2f0..6121adf 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
> > > > @@ -126,6 +126,20 @@ def eat_get_bfd_version(d):
> > > >          first_line = stdout.splitlines()[0]
> > > >          return first_line.split()[-1]
> > > >
> > > > +# Licenses set for main components of the toolchain:
> > > > +# (g)libc is always LGPL version 2 (or later)
> > > > +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1,
> > > > +#    see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html
> > > > +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but
> > > > +#    it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception
> > > > +#    was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html
> > > > +#    and http://www.gnu.org/licenses/gcc-exception.html, which was several days after
> > > > +#    gcc 4.3.3 was released - http://gcc.gnu.org/releases.html
> > > > +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according
> > > > +#    to the release schedule - http://www.gnu.org/software/gdb/schedule/
> > > > +# binutils version 2.17 was the last one under GPL version 2 (or later), according
> > > > +#    to the published releases - http://ftp.gnu.org/gnu/binutils/
> > > > +
> > > >  python external_arm_toolchain_version_handler () {
> > > >      if not isinstance(e, bb.event.ConfigParsed):
> > > >          return
> > > > @@ -139,5 +153,19 @@ python external_arm_toolchain_version_handler () {
> > > >      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))
> > > > +
> > > > +    lc_libc = "LGPL-2.1"
> > > > +    lc_gcc = ["GPL-3.0", "GPL-2.0"][eat_get_gcc_version(ld) <= "4.2.1"]
> > > > +    lc_rle = ["GPL-3.0-with-GCC-exception", "GPL-2.0-with-GCC-exception"][eat_get_gcc_version(ld) <= "4.3.3"]
> > > > +    lc_gdb = ["GPL-3.0", "GPL-2.0"][eat_get_gdb_version(ld) <= "6.6"]
> > > > +    lc_bfd = ["GPL-3.0", "GPL-2.0"][eat_get_bfd_version(ld) <= "2.17"]
> > > > +
> > > > +    d.setVar('EAT_LIBC_LICENSE', lc_libc)
> > > > +    d.setVar('EAT_GCC_LICENSE', lc_gcc)
> > > > +    d.setVar('EAT_RLE_LICENSE', lc_rle)
> > > > +    d.setVar('EAT_GDB_LICENSE', lc_gdb)
> > > > +    d.setVar('EAT_BFD_LICENSE', lc_bfd)
> > > > +
> > > > +    d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))
> > >
> > > Do we really need this dynamic computation of license based on
> > > toolchain versions? As pre-built GNU Arm toolchains [1] only support
> > > versions > 8.
> >
> > I needed gcc, gdb and binutils licenses set in central location for the new
> > recipe and I already had this code handy, so I just copied it over.
> >
> > I guess we can drop the conditional part of it and set the vars statically.
> > But setting them here is better than in the recipe, as they can be re-used
> > in multiple recipes.
> >
> 
> Sounds reasonable. Could you rebase it on top of mine patch-set and
> let license.inc [1] reuse these static defines?

Sure, will do.


> [1] https://lists.yoctoproject.org/g/meta-arm/message/647
> 
> -Sumit
> 
> > --
> > Denys
> >
> >
> > > [1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
> > >
> > > -Sumit
> > >
> > > >  }
> > > >  addhandler external_arm_toolchain_version_handler
> > > > --
> > > > 2.7.4
> > > >
> > > > 
> > >
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
  2020-06-16  5:56       ` Sumit Garg
@ 2020-06-18  3:29         ` Denys Dmytriyenko
  0 siblings, 0 replies; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-06-18  3:29 UTC (permalink / raw)
  To: Sumit Garg; +Cc: meta-arm, Denys Dmytriyenko

On Tue, Jun 16, 2020 at 11:26:17AM +0530, Sumit Garg wrote:
> On Mon, 15 Jun 2020 at 23:50, Denys Dmytriyenko <denis@denix.org> wrote:
> >
> > On Mon, Jun 15, 2020 at 06:15:17PM +0530, Sumit Garg wrote:
> > > On Mon, 15 Jun 2020 at 13:37, Denys Dmytriyenko <denis@denix.org> wrote:
> > > >
> > > > From: Denys Dmytriyenko <denys@ti.com>
> > > >
> > > > Allows re-use of prebuilt ARM toolchain binaries for SDK generation.
> > > >
> > > > This code is upstreamed from meta-arago layer.
> > > >
> > > > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > > > ---
> > > >  .../conf/distro/include/tcmode-external-arm.inc    |   4 +
> > > >  .../external-arm-sdk-toolchain.bb                  | 136 +++++++++++++++++++++
> > > >  2 files changed, 140 insertions(+)
> > > >  create mode 100644 meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > > >
> > >
> > > Thanks for pushing this recipe upstream. It's good to have the tools
> > > binaries packaged in SDK from pre-built toolchain rather than building
> > > from source.
> > >
> > > So I just gave it a try using poky distro which fails with following error:
> > >
> > > $ bitbake -c populate_sdk core-image-base
> > > <snip>
> > > Error:
> > >  Problem: package
> > > packagegroup-cross-canadian-qemuarm64-1.0-r0.x86_64_nativesdk requires
> > > gdb-cross-canadian-aarch64, but none of the providers can be installed
> > >   - conflicting requests
> > >   - nothing provides libpython2.7.so.1.0()(64bit) needed by
> > > gdb-cross-canadian-aarch64-8.3.0.20190709+git-r0.x86_64_nativesdk
> >
> > ^^^ looks like 8.3 toolchain has some python2-linked binaries, which would
> > require dependency on meta-python2.
> 
> Here 8.3.0 is gdb version rather than toolchain version. See below:

Ah, yes, I see - it's gdb binary itself is linked against libpython2.7.so.1.0

The thing is that the recipe already sets "file-rdeps" INSAKE_SKIP flag for 
gdb-cross-canadian.

In order to reproduce this I had to switch from nodistro/ipk to poky/rpm. The 
original error was cut a bit short, so I wasn't sure where it was coming from. 
Now I see that it is coming from DNF when SDK is being assembled from rpms. 
Looks like DNF has its own check and doesn't honor INSANE_SKIP, obviously. And 
opkg is more forgiving in this regard.

BTW, switching nodistro from ipk to rpm also results in this error. I wonder 
if there's a way to tell DNF to skip this check...

-- 
Denys


> $ ~/tc_install/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gdb
> --version
> GNU gdb (GNU Toolchain for the A-profile Architecture 9.2-2019.12
> (arm-9.10)) 8.3.0.20190709-git
> Copyright (C) 2019 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> > Let me check which binary is that, maybe
> > we can just drop it. Or we can just skip this check with INSANE_SKIP...
> >
> > BTW, I don't see this issue with 9.2 toolchain.
> >
> 
> Strangely, I see this issue with 9.2 toolchain for aarch64.
> 
> -Sumit
> 
> > --
> > Denys
> >
> >
> > > (try to add '--skip-broken' to skip uninstallable packages)
> > > <snip>
> > >
> > > Is there something that I missed while testing?
> > >
> > > -Sumit
> > >
> > > > diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > > index 9171380..08b87ef 100644
> > > > --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > > +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc
> > > > @@ -45,6 +45,10 @@ PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain"
> > > >  PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain"
> > > >  PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain"
> > > >
> > > > +PREFERRED_PROVIDER_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > > +PREFERRED_PROVIDER_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > > +PREFERRED_PROVIDER_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "external-arm-sdk-toolchain-${TRANSLATED_TARGET_ARCH}"
> > > > +
> > > >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
> > > >
> > > >  DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \
> > > > diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > > > new file mode 100644
> > > > index 0000000..88fd20e
> > > > --- /dev/null
> > > > +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
> > > > @@ -0,0 +1,136 @@
> > > > +inherit cross-canadian
> > > > +
> > > > +PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
> > > > +BPN = "external-arm-sdk-toolchain"
> > > > +
> > > > +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
> > > > +INHIBIT_PACKAGE_STRIP = "1"
> > > > +INHIBIT_SYSROOT_STRIP = "1"
> > > > +INHIBIT_DEFAULT_DEPS = "1"
> > > > +EXCLUDE_FROM_SHLIBS = "1"
> > > > +
> > > > +EAT_LICENSE ??= ""
> > > > +
> > > > +LICENSE = "${EAT_LICENSE}"
> > > > +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> > > > +
> > > > +INSANE_SKIP_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
> > > > +INSANE_SKIP_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > > > +INSANE_SKIP_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
> > > > +
> > > > +PROVIDES = "\
> > > > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +"
> > > > +
> > > > +PACKAGES = "\
> > > > +       gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +       gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +       binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
> > > > +"
> > > > +
> > > > +# Adjust defaults in line with external toolchain
> > > > +bindir = "${exec_prefix}/bin"
> > > > +libdir = "${exec_prefix}/lib"
> > > > +libexecdir = "${exec_prefix}/libexec"
> > > > +datadir = "${exec_prefix}/share"
> > > > +gcclibdir = "${libdir}/gcc"
> > > > +
> > > > +FILES_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
> > > > +       ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
> > > > +       ${bindir}/${TARGET_PREFIX}gcov \
> > > > +       ${bindir}/${TARGET_PREFIX}gcc* \
> > > > +       ${bindir}/${TARGET_PREFIX}g++ \
> > > > +       ${bindir}/${TARGET_PREFIX}cpp \
> > > > +       ${libexecdir}/* \
> > > > +"
> > > > +
> > > > +FILES_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > > +       ${bindir}/${TARGET_PREFIX}gdb* \
> > > > +       ${datadir}/gdb/* \
> > > > +"
> > > > +
> > > > +FILES_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ld* \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/strip \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/nm \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/as \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/ar \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/bin/objdump \
> > > > +       ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
> > > > +       ${bindir}/${TARGET_PREFIX}ld* \
> > > > +       ${bindir}/${TARGET_PREFIX}addr2line \
> > > > +       ${bindir}/${TARGET_PREFIX}objcopy \
> > > > +       ${bindir}/${TARGET_PREFIX}readelf \
> > > > +       ${bindir}/${TARGET_PREFIX}strip \
> > > > +       ${bindir}/${TARGET_PREFIX}nm \
> > > > +       ${bindir}/${TARGET_PREFIX}ranlib \
> > > > +       ${bindir}/${TARGET_PREFIX}gprof \
> > > > +       ${bindir}/${TARGET_PREFIX}as \
> > > > +       ${bindir}/${TARGET_PREFIX}c++filt \
> > > > +       ${bindir}/${TARGET_PREFIX}ar \
> > > > +       ${bindir}/${TARGET_PREFIX}strings \
> > > > +       ${bindir}/${TARGET_PREFIX}objdump \
> > > > +       ${bindir}/${TARGET_PREFIX}size \
> > > > +"
> > > > +
> > > > +DESCRIPTION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
> > > > +DESCRIPTION_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
> > > > +DESCRIPTION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
> > > > +
> > > > +LICENSE_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
> > > > +LICENSE_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
> > > > +LICENSE_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
> > > > +
> > > > +PKGV_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
> > > > +PKGV_gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
> > > > +PKGV_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
> > > > +
> > > > +do_install() {
> > > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > > > +       install -d ${D}${bindir}
> > > > +       install -d ${D}${libdir}
> > > > +       install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > > > +       install -d ${D}${libexecdir}
> > > > +       install -d ${D}${datadir}/gdb
> > > > +       install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
> > > > +
> > > > +       CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> > > > +
> > > > +       # gcc
> > > > +       for i in libstdc++.* libgcc_s.* libsupc++.*; do
> > > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
> > > > +       done
> > > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
> > > > +       for i in gcov gcc* g++ cpp; do
> > > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > > > +       done
> > > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
> > > > +
> > > > +       # gdb
> > > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
> > > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
> > > > +
> > > > +       # binutils
> > > > +       for i in ld* objcopy strip nm ranlib as ar objdump; do
> > > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
> > > > +       done
> > > > +       cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
> > > > +       for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
> > > > +               cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
> > > > +       done
> > > > +}
> > > > +
> > > > +python () {
> > > > +    if not d.getVar("EAT_VER_MAIN", False):
> > > > +        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
> > > > +    if d.getVar('TCLIBC', True) != "glibc":
> > > > +        raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
> > > > +}
> > > > --
> > > > 2.7.4
> > > >
> > > > 
> > >
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-06-18  3:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15  8:07 [PATCH 1/4] external-arm-toolchain-versions: also collect binutils/bfd version Denys Dmytriyenko
2020-06-15  8:07 ` [PATCH 2/4] external-arm-toolchain-versions: set per-components license based on version Denys Dmytriyenko
2020-06-15 10:55   ` [meta-arm] " Sumit Garg
2020-06-15 18:14     ` Denys Dmytriyenko
2020-06-16  5:51       ` Sumit Garg
2020-06-17 19:23         ` Denys Dmytriyenko
2020-06-15  8:07 ` [PATCH 3/4] external-arm-toolchain: check for TCLIBC being glibc Denys Dmytriyenko
2020-06-15  8:07 ` [PATCH 4/4] external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries Denys Dmytriyenko
2020-06-15 12:45   ` [meta-arm] " Sumit Garg
2020-06-15 18:20     ` Denys Dmytriyenko
2020-06-16  5:56       ` Sumit Garg
2020-06-18  3:29         ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.