Patchwork [v8,11/12] C-SKY: Add build-many-glibcs.py support

login
register
mail settings
Submitter Han Mao
Date Dec. 20, 2018, 3:02 a.m.
Message ID <3aa372e0d8f017f841c48a6d20e2da7e16c8eddc.1545194586.git.han_mao@c-sky.com>
Download mbox | patch
Permalink /patch/30773/
State New
Headers show

Comments

Han Mao - Dec. 20, 2018, 3:02 a.m.
* scripts/build-many-glibcs.py: Add C-SKY targets
---
 scripts/build-many-glibcs.py | 8 ++++++++
 1 file changed, 8 insertions(+)
Adhemerval Zanella Netto - Dec. 21, 2018, 5:42 p.m.
On 20/12/2018 01:02, Mao Han wrote:
> 	* scripts/build-many-glibcs.py: Add C-SKY targets
> ---
>  scripts/build-many-glibcs.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
> index 9051ff1..e0cdb69 100755
> --- a/scripts/build-many-glibcs.py
> +++ b/scripts/build-many-glibcs.py
> @@ -181,6 +181,13 @@ class Context(object):
>                          variant='be8',
>                          gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
>                                   '--with-fpu=vfpv3'])
> +        self.add_config(arch='csky',
> +                        os_name='linux-gnuabiv2',
> +                        variant='soft',
> +                        gcc_cfg=['--disable-multilib'])
> +        self.add_config(arch='csky',
> +                        os_name='linux-gnuabiv2',
> +                        gcc_cfg=['--with-float=hard', '--disable-multilib'])
>          self.add_config(arch='hppa',
>                          os_name='linux-gnu')
>          self.add_config(arch='i686',
> @@ -1260,6 +1267,7 @@ class Config(object):
>          arch_map = {'aarch64': 'arm64',
>                      'alpha': 'alpha',
>                      'arm': 'arm',
> +                    'csky': 'csky',
>                      'hppa': 'parisc',
>                      'i486': 'x86',
>                      'i586': 'x86',
> 

So we will need to wait for kernel 4.20 or use a linus tree to actually build
a csky toolchain?
Joseph Myers - Dec. 21, 2018, 6:08 p.m.
On Fri, 21 Dec 2018, Adhemerval Zanella wrote:

> So we will need to wait for kernel 4.20 or use a linus tree to actually build
> a csky toolchain?

Yes (and use mainline versions of GCC and binutils, not releases, as 
well).  The rule I documented at 
<https://sourceware.org/glibc/wiki/NewPorts> is that those components need 
to be upstream first, but only in the current development version, without 
needing to be in a release.
H.J. Lu - Dec. 21, 2018, 6:08 p.m.
On Fri, Dec 21, 2018 at 9:43 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 20/12/2018 01:02, Mao Han wrote:
> >       * scripts/build-many-glibcs.py: Add C-SKY targets
> > ---
> >  scripts/build-many-glibcs.py | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
> > index 9051ff1..e0cdb69 100755
> > --- a/scripts/build-many-glibcs.py
> > +++ b/scripts/build-many-glibcs.py
> > @@ -181,6 +181,13 @@ class Context(object):
> >                          variant='be8',
> >                          gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
> >                                   '--with-fpu=vfpv3'])
> > +        self.add_config(arch='csky',
> > +                        os_name='linux-gnuabiv2',
> > +                        variant='soft',
> > +                        gcc_cfg=['--disable-multilib'])
> > +        self.add_config(arch='csky',
> > +                        os_name='linux-gnuabiv2',
> > +                        gcc_cfg=['--with-float=hard', '--disable-multilib'])
> >          self.add_config(arch='hppa',
> >                          os_name='linux-gnu')
> >          self.add_config(arch='i686',
> > @@ -1260,6 +1267,7 @@ class Config(object):
> >          arch_map = {'aarch64': 'arm64',
> >                      'alpha': 'alpha',
> >                      'arm': 'arm',
> > +                    'csky': 'csky',
> >                      'hppa': 'parisc',
> >                      'i486': 'x86',
> >                      'i586': 'x86',
> >
>
> So we will need to wait for kernel 4.20 or use a linus tree to actually build
> a csky toolchain?

Yes.  This is how I ran into

https://sourceware.org/bugzilla/show_bug.cgi?id=24022
Adhemerval Zanella Netto - Dec. 21, 2018, 6:12 p.m.
On 21/12/2018 16:08, Joseph Myers wrote:
> On Fri, 21 Dec 2018, Adhemerval Zanella wrote:
> 
>> So we will need to wait for kernel 4.20 or use a linus tree to actually build
>> a csky toolchain?
> 
> Yes (and use mainline versions of GCC and binutils, not releases, as 
> well).  The rule I documented at 
> <https://sourceware.org/glibc/wiki/NewPorts> is that those components need 
> to be upstream first, but only in the current development version, without 
> needing to be in a release.
> 

Wouldn't be useful to add an option to checkout mainline version
of Linux (using linus tree), binutils, and gcc as we do for 
glibc itself?
Joseph Myers - Dec. 21, 2018, 6:23 p.m.
On Fri, 21 Dec 2018, Adhemerval Zanella wrote:

> Wouldn't be useful to add an option to checkout mainline version
> of Linux (using linus tree), binutils, and gcc as we do for 
> glibc itself?

For binutils and gcc it already exists - specify binutils-vcs-mainline and 
gcc-vcs-mainline as arguments to the checkout command.  Yes, it would be 
reasonable to add support for specifying linux-vcs-mainline.
Adhemerval Zanella Netto - Dec. 21, 2018, 6:44 p.m.
On 21/12/2018 16:23, Joseph Myers wrote:
> On Fri, 21 Dec 2018, Adhemerval Zanella wrote:
> 
>> Wouldn't be useful to add an option to checkout mainline version
>> of Linux (using linus tree), binutils, and gcc as we do for 
>> glibc itself?
> 
> For binutils and gcc it already exists - specify binutils-vcs-mainline and 
> gcc-vcs-mainline as arguments to the checkout command.  Yes, it would be 
> reasonable to add support for specifying linux-vcs-mainline.
> 

I was thinking in an option as 'checkout vcs-mainline' or
'checkout vcs-mainline-all. I will work on the linux-vcs-mainline.

Patch

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 9051ff1..e0cdb69 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -181,6 +181,13 @@  class Context(object):
                         variant='be8',
                         gcc_cfg=['--with-float=hard', '--with-arch=armv7-a',
                                  '--with-fpu=vfpv3'])
+        self.add_config(arch='csky',
+                        os_name='linux-gnuabiv2',
+                        variant='soft',
+                        gcc_cfg=['--disable-multilib'])
+        self.add_config(arch='csky',
+                        os_name='linux-gnuabiv2',
+                        gcc_cfg=['--with-float=hard', '--disable-multilib'])
         self.add_config(arch='hppa',
                         os_name='linux-gnu')
         self.add_config(arch='i686',
@@ -1260,6 +1267,7 @@  class Config(object):
         arch_map = {'aarch64': 'arm64',
                     'alpha': 'alpha',
                     'arm': 'arm',
+                    'csky': 'csky',
                     'hppa': 'parisc',
                     'i486': 'x86',
                     'i586': 'x86',