Patchwork [v4,11/11] Add nds32 port to build-many-glibcs.py

login
register
mail settings
Submitter Vincent Chen
Date June 5, 2019, 11:56 a.m.
Message ID <1559735815-20093-12-git-send-email-vincentc@andestech.com>
Download mbox | patch
Permalink /patch/33024/
State New
Headers show

Comments

Vincent Chen - June 5, 2019, 11:56 a.m.
From: CheWei Chunang <cnoize@andestech.com>

The nds32 toochain cannot be generated successfully by this patch because
the nds32 port of Binutils and GCC on upstream is too old. This patch is
used to help reviewer to review the glibc port for Andes nds32 ISA.

2019-06-03  Vincent Chen  <vincentc@andestech.com>
2019-06-03  CheWei Chuang  <cnoize@andestech.com>

        * scripts/build-many-glibcs.py (Context): Add nds32 targets.
---
 scripts/build-many-glibcs.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Joseph Myers - June 6, 2019, 10:47 p.m.
On Wed, 5 Jun 2019, Vincent Chen wrote:

> From: CheWei Chunang <cnoize@andestech.com>
> 
> The nds32 toochain cannot be generated successfully by this patch because
> the nds32 port of Binutils and GCC on upstream is too old. This patch is
> used to help reviewer to review the glibc port for Andes nds32 ISA.

For a new port to go into glibc, the upstream mainline versions of 
binutils / GCC / Linux kernel need to have all the features required to 
build the port and run tests with good results (even if release branches 
are too old to work well - though if it's just a matter of bug fixes, 
backporting those to release branches may be a good idea).  Ports 
depending on non-upstream changes to those components can't be accepted 
(we had trouble in the past with MicroBlaze and NaCl depending on things 
that weren't upstream, fixed by getting some MicroBlaze GCC patches 
upstream and removing the NaCl port; we don't want to go there again).
Vincent Chen - June 10, 2019, 3:11 a.m.
On Fri, Jun 07, 2019 at 06:47:49AM +0800, Joseph Myers wrote:
> On Wed, 5 Jun 2019, Vincent Chen wrote:
> 
> > From: CheWei Chunang <cnoize@andestech.com>
> > 
> > The nds32 toochain cannot be generated successfully by this patch because
> > the nds32 port of Binutils and GCC on upstream is too old. This patch is
> > used to help reviewer to review the glibc port for Andes nds32 ISA.
> 
> For a new port to go into glibc, the upstream mainline versions of 
> binutils / GCC / Linux kernel need to have all the features required to 
> build the port and run tests with good results (even if release branches 
> are too old to work well - though if it's just a matter of bug fixes, 
> backporting those to release branches may be a good idea).  Ports 
> depending on non-upstream changes to those components can't be accepted 
> (we had trouble in the past with MicroBlaze and NaCl depending on things 
> that weren't upstream, fixed by getting some MicroBlaze GCC patches 
> upstream and removing the NaCl port; we don't want to go there again).
>

Sorry, I did not find the commit log is out-of-day. Now, build-many-glibcs.py
can use upstream Binutils-2.32, GCC-9.0.1 and this patchset to generate nds32
toolchain and pass the test. I will correct this commit log and append the
test log in the next submission.

Thanks,
Vincent

Patch

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index c5821df..4bde3fa 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -299,6 +299,18 @@  class Context(object):
                                  'ccopts': '-mabi=32'},
                                 {'variant': 'n64-nan2008-soft',
                                  'ccopts': '-mabi=64'}])
+        self.add_config(arch='nds32le',
+                        os_name='linux-gnu',
+			variant='v3',
+                        gcc_cfg=['--with-arch=v3', '--with-cpu=n13',
+                                 '--enable-default-relax=no',
+                                 '--disable-multilib'])
+        self.add_config(arch='nds32le',
+                        os_name='linux-gnu',
+			variant='v3f',
+                        gcc_cfg=['--with-arch=v3f', '--with-cpu=n13',
+                                 '--enable-default-relax=no',
+                                 '--disable-multilib'])
         self.add_config(arch='nios2',
                         os_name='linux-gnu')
         self.add_config(arch='powerpc',
@@ -1269,6 +1281,7 @@  class Config(object):
                     'm68k': 'm68k',
                     'microblaze': 'microblaze',
                     'mips': 'mips',
+                    'nds32': 'nds32',
                     'nios2': 'nios2',
                     'powerpc': 'powerpc',
                     's390': 's390',