[2/2] toolchain: Add glibc support for ARCv2
diff mbox series

Message ID 20170914221446.13647-3-abrodkin@synopsys.com
State Superseded
Headers show
Series
  • toolchain: Add glibc support for ARCv2
Related show

Commit Message

Alexey Brodkin Sept. 14, 2017, 10:14 p.m. UTC
Finally there's working ARC port of glibc thanks to Vineet and Cuper!
This port is based on pretty recent glibc's master branch and ARC
changes are being reviewed now in glibc's mailing list.

Thus we again have to use sources from our GitHub but as soon as there's
a glibc release with our patches applied we'll switch to unpstream releases
and will drop our glibc GitHub repo alltogether.

Note now we cut tags in glibc repo simultaneously with tags
in Binutils and GCC repos and so to make sure everything works in the best
way we plan to update glibc tag together with Binutils and GCC.

Also note as of today ARCompact (AKA ARCv1 ISA) is not supported in glibc
but we plan to fix it soonish so for now we make glibc intentionally
dependent on archs38.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Cupertino Miranda <cmiranda@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
---
 package/glibc/glibc.hash                | 2 ++
 package/glibc/glibc.mk                  | 7 +++++++
 toolchain/toolchain-buildroot/Config.in | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

Comments

Alexey Brodkin Sept. 28, 2017, 6:50 p.m. UTC | #1
Hi Thomas, Arnout,

On Fri, 2017-09-15 at 01:14 +0300, Alexey Brodkin wrote:
> Finally there's working ARC port of glibc thanks to Vineet and Cuper!
> This port is based on pretty recent glibc's master branch and ARC
> changes are being reviewed now in glibc's mailing list.
> 
> Thus we again have to use sources from our GitHub but as soon as there's
> a glibc release with our patches applied we'll switch to unpstream releases
> and will drop our glibc GitHub repo alltogether.
> 
> Note now we cut tags in glibc repo simultaneously with tags
> in Binutils and GCC repos and so to make sure everything works in the best
> way we plan to update glibc tag together with Binutils and GCC.
> 
> Also note as of today ARCompact (AKA ARCv1 ISA) is not supported in glibc
> but we plan to fix it soonish so for now we make glibc intentionally
> dependent on archs38.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Cupertino Miranda <cmiranda@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Anton Kolesov <akolesov@synopsys.com>

This patch was sitting in patchwork for 2 weeks now.
If there're any complaints an suggestions why don't we merge it?

I'd like to see how we ramp-up with glibc toolchain for ARC.
That said once the patch is applied would be good to add
a corresponding config for autobuilder.

-Alexey
Arnout Vandecappelle Oct. 4, 2017, 4:41 p.m. UTC | #2
On 28-09-17 20:50, Alexey Brodkin wrote:
> Hi Thomas, Arnout,
> 
> On Fri, 2017-09-15 at 01:14 +0300, Alexey Brodkin wrote:
>> Finally there's working ARC port of glibc thanks to Vineet and Cuper!
>> This port is based on pretty recent glibc's master branch and ARC
>> changes are being reviewed now in glibc's mailing list.
>>
>> Thus we again have to use sources from our GitHub but as soon as there's
>> a glibc release with our patches applied we'll switch to unpstream releases
>> and will drop our glibc GitHub repo alltogether.
>>
>> Note now we cut tags in glibc repo simultaneously with tags
>> in Binutils and GCC repos and so to make sure everything works in the best
>> way we plan to update glibc tag together with Binutils and GCC.
>>
>> Also note as of today ARCompact (AKA ARCv1 ISA) is not supported in glibc
>> but we plan to fix it soonish so for now we make glibc intentionally
>> dependent on archs38.
>>
>> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> Cc: Cupertino Miranda <cmiranda@synopsys.com>
>> Cc: Vineet Gupta <vgupta@synopsys.com>
>> Cc: Anton Kolesov <akolesov@synopsys.com>
> 
> This patch was sitting in patchwork for 2 weeks now.
> If there're any complaints an suggestions why don't we merge it?

 Since I merged the bump to glibc 2.26, patch 1 is not correct anymore.

 Would it be useful to instead add patches to our glibc to add ARC support? Or
are the ARC patches too difficult to backport?


> I'd like to see how we ramp-up with glibc toolchain for ARC.
> That said once the patch is applied would be good to add
> a corresponding config for autobuilder.

 You can actually do that yourself by adding a config to
support/config-fragments/autobuild and updating toolchain-configs.csv
in that directory. Something like br-arc-full-internal.config but then with glibc.


 Regards,
 Arnout
Alexey Brodkin Oct. 5, 2017, 9:30 p.m. UTC | #3
Hi Arnout,

On Wed, 2017-10-04 at 18:41 +0200, Arnout Vandecappelle wrote:
> 

> On 28-09-17 20:50, Alexey Brodkin wrote:

> > 

> > Hi Thomas, Arnout,

> > 

> > On Fri, 2017-09-15 at 01:14 +0300, Alexey Brodkin wrote:

> > > 

> > > Finally there's working ARC port of glibc thanks to Vineet and Cuper!

> > > This port is based on pretty recent glibc's master branch and ARC

> > > changes are being reviewed now in glibc's mailing list.

> > > 

> > > Thus we again have to use sources from our GitHub but as soon as there's

> > > a glibc release with our patches applied we'll switch to unpstream releases

> > > and will drop our glibc GitHub repo alltogether.

> > > 

> > > Note now we cut tags in glibc repo simultaneously with tags

> > > in Binutils and GCC repos and so to make sure everything works in the best

> > > way we plan to update glibc tag together with Binutils and GCC.

> > > 

> > > Also note as of today ARCompact (AKA ARCv1 ISA) is not supported in glibc

> > > but we plan to fix it soonish so for now we make glibc intentionally

> > > dependent on archs38.

> > > 

> > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

> > > Cc: Cupertino Miranda <cmiranda@synopsys.com>

> > > Cc: Vineet Gupta <vgupta@synopsys.com>

> > > Cc: Anton Kolesov <akolesov@synopsys.com>

> > 

> > This patch was sitting in patchwork for 2 weeks now.

> > If there're any complaints an suggestions why don't we merge it?

> 

>  Since I merged the bump to glibc 2.26, patch 1 is not correct anymore.


I'll send a respin shortly, OK?

>  Would it be useful to instead add patches to our glibc to add ARC support? Or

> are the ARC patches too difficult to backport?


Well not now definitely. The point is:
 a) ARC port is not yet merged upstream
 b) Our patches are on top of pretty much up-to-date master branch,
    which means they alone won't apply on top of the most recent release

> 

> 

> > 

> > I'd like to see how we ramp-up with glibc toolchain for ARC.

> > That said once the patch is applied would be good to add

> > a corresponding config for autobuilder.

> 

>  You can actually do that yourself by adding a config to

> support/config-fragments/autobuild and updating toolchain-configs.csv

> in that directory. Something like br-arc-full-internal.config but then with glibc.


Sure, will do once glibc for ARC is supported in BR.

-Alexey

Patch
diff mbox series

diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash
index daaf014a00..06b52eb069 100644
--- a/package/glibc/glibc.hash
+++ b/package/glibc/glibc.hash
@@ -1,2 +1,4 @@ 
 # Locally calculated after checking pgp signature (glibc)
 sha256	067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0	glibc-2.25.tar.xz
+# Locally calculated (fetched from Github)
+sha256	acbc223dea1130e9df2dd839f3311b4d0e3942e9dc833d8a962024cfaceed9c6	glibc-arc-2017.09-eng008.tar.gz
diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index c9a65796b0..e9570b6a5f 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -4,9 +4,16 @@ 
 #
 ################################################################################
 
+ifeq ($(BR2_arc),y)
+GLIBC_VERSION = arc-2017.09-eng008
+GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION))
+GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.gz
+else
 GLIBC_VERSION = 2.25
 GLIBC_SITE = $(BR2_GNU_MIRROR)/libc
 GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz
+endif
+
 GLIBC_SRC_SUBDIR = .
 
 GLIBC_LICENSE = GPL-2.0+ (programs), LGPL-2.1+, BSD-3-Clause, MIT (library)
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index f47001fcf6..6afd139b59 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -47,7 +47,7 @@  config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_mipsel      || BR2_mips64     || BR2_mips64el|| \
 		   BR2_powerpc     || BR2_powerpc64  || BR2_powerpc64le || \
 		   BR2_sh          || BR2_sparc64    || BR2_x86_64 || \
-		   BR2_microblaze || BR2_nios2
+		   BR2_microblaze  || BR2_nios2      || BR2_archs38
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2