Message ID | 1592208433-28086-2-git-send-email-denis@denix.org |
---|---|
State | New |
Headers | show |
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
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 > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#660): https://lists.yoctoproject.org/g/meta-arm/message/660 Mute This Topic: https://lists.yoctoproject.org/mt/74890209/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-
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.
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 > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#669): https://lists.yoctoproject.org/g/meta-arm/message/669 Mute This Topic: https://lists.yoctoproject.org/mt/74890209/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-
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 > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#695): https://lists.yoctoproject.org/g/meta-arm/message/695 Mute This Topic: https://lists.yoctoproject.org/mt/74890209/3617530 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [oe-patchwork@oe-patch.openembedded.org] -=-=-=-=-=-=-=-=-=-=-=-