[v3,12/13] build-many-glibcs.py: add OpenRISC support

Message ID 20211210233456.4146479-13-shorne@gmail.com
State Superseded
Headers
Series Glibc OpenRISC port |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Stafford Horne Dec. 10, 2021, 11:34 p.m. UTC
  ---
 scripts/build-many-glibcs.py | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Adhemerval Zanella Netto Dec. 22, 2021, 9:04 p.m. UTC | #1
On 10/12/2021 20:34, Stafford Horne via Libc-alpha wrote:
> ---
>  scripts/build-many-glibcs.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
> index 6ae2172956..47b2cabc9c 100755
> --- a/scripts/build-many-glibcs.py
> +++ b/scripts/build-many-glibcs.py
> @@ -334,6 +334,10 @@ class Context(object):
>                                   'ccopts': '-mabi=64'}])
>          self.add_config(arch='nios2',
>                          os_name='linux-gnu')
> +        self.add_config(arch='or1k',
> +                        os_name='linux-gnu',
> +                        variant='soft',
> +                        gcc_cfg=['--with-multilib-list=mcmov'])

Why is this option required?

>          self.add_config(arch='powerpc',
>                          os_name='linux-gnu',
>                          gcc_cfg=['--disable-multilib', '--enable-secureplt'],
> @@ -1270,6 +1274,7 @@ def install_linux_headers(policy, cmdlist):
>                  'microblaze': 'microblaze',
>                  'mips': 'mips',
>                  'nios2': 'nios2',
> +                'or1k': 'openrisc',
>                  'powerpc': 'powerpc',
>                  's390': 's390',
>                  'riscv32': 'riscv',
  
Stafford Horne Dec. 23, 2021, 7:15 a.m. UTC | #2
On Wed, Dec 22, 2021 at 06:04:07PM -0300, Adhemerval Zanella wrote:
> 
> 
> On 10/12/2021 20:34, Stafford Horne via Libc-alpha wrote:
> > ---
> >  scripts/build-many-glibcs.py | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
> > index 6ae2172956..47b2cabc9c 100755
> > --- a/scripts/build-many-glibcs.py
> > +++ b/scripts/build-many-glibcs.py
> > @@ -334,6 +334,10 @@ class Context(object):
> >                                   'ccopts': '-mabi=64'}])
> >          self.add_config(arch='nios2',
> >                          os_name='linux-gnu')
> > +        self.add_config(arch='or1k',
> > +                        os_name='linux-gnu',
> > +                        variant='soft',
> > +                        gcc_cfg=['--with-multilib-list=mcmov'])
> 
> Why is this option required?

The default is to build with multilib-list mcmov,msoft-mul,msoft-div.  Which
would generate 3 toolchains.
To make the build faster I reduced it to the mcmov (support conditional move
instructions).

I could change to run with --disable-multilib, but enabling cmov is usually
always wanted.

> >          self.add_config(arch='powerpc',
> >                          os_name='linux-gnu',
> >                          gcc_cfg=['--disable-multilib', '--enable-secureplt'],
> > @@ -1270,6 +1274,7 @@ def install_linux_headers(policy, cmdlist):
> >                  'microblaze': 'microblaze',
> >                  'mips': 'mips',
> >                  'nios2': 'nios2',
> > +                'or1k': 'openrisc',
> >                  'powerpc': 'powerpc',
> >                  's390': 's390',
> >                  'riscv32': 'riscv',
  

Patch

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 6ae2172956..47b2cabc9c 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -334,6 +334,10 @@  class Context(object):
                                  'ccopts': '-mabi=64'}])
         self.add_config(arch='nios2',
                         os_name='linux-gnu')
+        self.add_config(arch='or1k',
+                        os_name='linux-gnu',
+                        variant='soft',
+                        gcc_cfg=['--with-multilib-list=mcmov'])
         self.add_config(arch='powerpc',
                         os_name='linux-gnu',
                         gcc_cfg=['--disable-multilib', '--enable-secureplt'],
@@ -1270,6 +1274,7 @@  def install_linux_headers(policy, cmdlist):
                 'microblaze': 'microblaze',
                 'mips': 'mips',
                 'nios2': 'nios2',
+                'or1k': 'openrisc',
                 'powerpc': 'powerpc',
                 's390': 's390',
                 'riscv32': 'riscv',