Message ID | 20180125043621.19972-18-palmer@dabbelt.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 23090 invoked by alias); 25 Jan 2018 04:37:13 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22829 invoked by uid 89); 25 Jan 2018 04:37:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:42a3, HX-Received:sk:h32-v6m X-HELO: mail-pf0-f195.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=gXTv1qYQVt5Uc+VsUtChMsNdCVMg/Qey95Ozwgf+7HU=; b=gA0kMdaEGGOR5QV4U/DWi56QQnRhj2zvY82WIvtSIDo/+uRmsifnnNl0Up6PZa3dqa VAwMwYDwJiFPbcZDbYxGQA6mVXeQA/5jRWhmcihlG293FxmkUvsRAVo/mEg2xIYnJRrZ 6IHr7GZlii6xD3XdJicjYlSs8JZShT3SNXl7TRqPrAy5ncjfrk/00ynjVUNSqklUIxnr Ki1IBOrg7/dY+DY6MC6rGtl6h3LPEh+/a3c1ynjnFvldeu950FH3HBeemwkXj0X6Zk4X TBeOuddSGR64W33BX1DLoCfLf2MbKK5p8e97gnq2oFDOQ1qQmsU/mQkGh4uWwvhsN+C6 Vavw== X-Gm-Message-State: AKwxytc8Un8kjjGabnlGTa82K3ooeNlOBWkv25FBQgDGSjFxHkqBLA8Q KpcozvIf6OdLcpT4B0tUTnHU5Q== X-Google-Smtp-Source: AH8x225pVCeHeMqukYVN3FleuYVo+wkQN4ncPc+pEPth4DiXWcJFqLlQomzpTXnOMWYVSh+r8SQJiA== X-Received: by 2002:a17:902:42a3:: with SMTP id h32-v6mr9886908pld.56.1516855027936; Wed, 24 Jan 2018 20:37:07 -0800 (PST) Subject: [PATCH 17/17] Add RISC-V to build-many-glibcs.py Date: Wed, 24 Jan 2018 20:36:21 -0800 Message-Id: <20180125043621.19972-18-palmer@dabbelt.com> In-Reply-To: <20180125043621.19972-1-palmer@dabbelt.com> References: <20180125043621.19972-1-palmer@dabbelt.com> Cc: Andrew Waterman <andrew@sifive.com>, Darius Rad <darius@bluespec.com>, dj@redhat.com, patches@groups.riscv.org, Palmer Dabbelt <palmer@dabbelt.com> From: Palmer Dabbelt <palmer@dabbelt.com> To: libc-alpha@sourceware.org, joseph@codesourcery.com |
Commit Message
Palmer Dabbelt
Jan. 25, 2018, 4:36 a.m. UTC
For full disclosure, I've only run build-many-glibcs.py with the additional diff below. diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 1c7b85050b57..22cc7b427041 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -706,7 +706,7 @@ class Context(object): 'gcc': 'vcs-7', 'glibc': 'vcs-mainline', 'gmp': '6.1.2', - 'linux': '4.14', + 'linux': '4.15-rc8', 'mpc': '1.0.3', 'mpfr': '3.1.6'} use_versions = {} @@ -841,7 +841,7 @@ class Context(object): url_map = {'binutils': 'https://ftp.gnu.org/gnu/binutils/binutils-%(version)s.tar.bz2', 'gcc': 'https://ftp.gnu.org/gnu/gcc/gcc-%(version)s/gcc-%(version)s.tar.bz2', 'gmp': 'https://ftp.gnu.org/gnu/gmp/gmp-%(version)s.tar.xz', - 'linux': 'https://www.kernel.org/pub/linux/kernel/v4.x/linux-%(version)s.tar.xz', + 'linux': 'https://git.kernel.org/torvalds/t/linux-%(version)s.tar.gz', 'mpc': 'https://ftp.gnu.org/gnu/mpc/mpc-%(version)s.tar.gz', 'mpfr': 'https://ftp.gnu.org/gnu/mpfr/mpfr-%(version)s.tar.xz'} if component not in url_map: 2018-01-13 Palmer Dabbelt <palmer@sifive.com> * scripts/build-many-glibcs.py (Context): Add RISC-V targets. (Config): Likewise. --- scripts/build-many-glibcs.py | 8 ++++++++ 1 file changed, 8 insertions(+)
Comments
On Wed, 24 Jan 2018, Palmer Dabbelt wrote: > diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py > index 28c04e66fd52..e3113599beb1 100755 > --- a/scripts/build-many-glibcs.py > +++ b/scripts/build-many-glibcs.py > @@ -329,6 +329,12 @@ class Context(object): > os_name='linux-gnuspe', > variant='e500v1', > gcc_cfg=['--disable-multilib', '--enable-secureplt']) > + self.add_config(arch='riscv64', > + os_name='linux-gnu', > + glibcs=[{'variant': 'rv64imafdc-lp64d', > + 'ccopts': '-march=rv64imafdc -mabi=lp64d'}, > + {'variant': 'rv64imac-lp64', > + 'ccopts': '-march=rv64imac -mabi=lp64'}]) Are you sure this actually works with this version of the port, and current upstream GCC? In patch 16, in this version of the port, the preconfigure script disallows soft-float, "glibc does not yet support systems without the F extension". Apart from a few other places in the port with soft-float support (again, the port should be consistent about what is or is not supported - either have the soft-float support, or not include the code at all because it can't be tested - of course most places are actually testing for the ABI, but it seems there are a few testing __riscv_flen), as I understand it -march=rv64imac means soft-float so wouldn't build given patch 16. *And* GCC's t-linux-multilib looks like it expects both 32-bit and 64-bit, hard-float and soft-float ABI multilibs: MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \ march=rv32imafdc/mabi=ilp32d \ march=rv64imac/mabi=lp64 \ march=rv64imafdc/mabi=lp64d So I'd expect the second GCC build to run into problems when only RV64 multilibs of glibc but not RV32 ones have been built, because it would try to build the RV32 shared libraries of libgcc, libstdc++ etc., which depend on glibc having been built.
On Thu, 25 Jan 2018 09:42:20 PST (-0800), joseph@codesourcery.com wrote: > On Wed, 24 Jan 2018, Palmer Dabbelt wrote: > >> diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py >> index 28c04e66fd52..e3113599beb1 100755 >> --- a/scripts/build-many-glibcs.py >> +++ b/scripts/build-many-glibcs.py >> @@ -329,6 +329,12 @@ class Context(object): >> os_name='linux-gnuspe', >> variant='e500v1', >> gcc_cfg=['--disable-multilib', '--enable-secureplt']) >> + self.add_config(arch='riscv64', >> + os_name='linux-gnu', >> + glibcs=[{'variant': 'rv64imafdc-lp64d', >> + 'ccopts': '-march=rv64imafdc -mabi=lp64d'}, >> + {'variant': 'rv64imac-lp64', >> + 'ccopts': '-march=rv64imac -mabi=lp64'}]) > > Are you sure this actually works with this version of the port, and > current upstream GCC? > > In patch 16, in this version of the port, the preconfigure script > disallows soft-float, "glibc does not yet support systems without the F > extension". Apart from a few other places in the port with soft-float > support (again, the port should be consistent about what is or is not > supported - either have the soft-float support, or not include the code at > all because it can't be tested - of course most places are actually > testing for the ABI, but it seems there are a few testing __riscv_flen), > as I understand it -march=rv64imac means soft-float so wouldn't build > given patch 16. *And* GCC's t-linux-multilib looks like it expects both > 32-bit and 64-bit, hard-float and soft-float ABI multilibs: > > MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \ > march=rv32imafdc/mabi=ilp32d \ > march=rv64imac/mabi=lp64 \ > march=rv64imafdc/mabi=lp64d > > So I'd expect the second GCC build to run into problems when only RV64 > multilibs of glibc but not RV32 ones have been built, because it would try > to build the RV32 shared libraries of libgcc, libstdc++ etc., which depend > on glibc having been built. Sorry, I think I got my signals crossed and didn't get the patches that dropped the various bits of support onto the machine that was running build-many-glibcs.py. I'm going to add three (or two, if the soft float doesn't make it in time) non-multilib targets that will look something like this: self.add_config(arch='riscv64', os_name='linux-gnu', variant='rv64imac-lp64', gcc_cfg=['--with-arch=rv64imac', '--with-abi=lp64', '--disable-multilib']) self.add_config(arch='riscv64', os_name='linux-gnu', variant='rv64imafdc-lp64', gcc_cfg=['--with-arch=rv64imafdc', '--with-abi=lp64', '--disable-multilib']) self.add_config(arch='riscv64', os_name='linux-gnu', variant='rv64imafdc-lp64d', gcc_cfg=['--with-arch=rv64imafdc', '--with-abi=lp64d', '--disable-multilib'])
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 28c04e66fd52..e3113599beb1 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -329,6 +329,12 @@ class Context(object): os_name='linux-gnuspe', variant='e500v1', gcc_cfg=['--disable-multilib', '--enable-secureplt']) + self.add_config(arch='riscv64', + os_name='linux-gnu', + glibcs=[{'variant': 'rv64imafdc-lp64d', + 'ccopts': '-march=rv64imafdc -mabi=lp64d'}, + {'variant': 'rv64imac-lp64', + 'ccopts': '-march=rv64imac -mabi=lp64'}]) self.add_config(arch='s390x', os_name='linux-gnu', glibcs=[{}, @@ -1227,6 +1233,8 @@ class Config(object): 'nios2': 'nios2', 'powerpc': 'powerpc', 's390': 's390', + 'riscv32': 'riscv', + 'riscv64': 'riscv', 'sh': 'sh', 'sparc': 'sparc', 'tile': 'tile',