public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: joseph@codesourcery.com
Cc: libc-alpha@sourceware.org, Andrew Waterman <andrew@sifive.com>,
	Darius Rad <darius@bluespec.com>,
	dj@redhat.com
Subject: Re: RISC-V glibc port v2
Date: Wed, 20 Dec 2017 20:25:00 -0000	[thread overview]
Message-ID: <mhng-02b41a27-5e72-45f2-8c2b-17968eca5185@palmer-si-x1c4> (raw)
In-Reply-To: <alpine.DEB.2.20.1712201552150.30469@digraph.polyomino.org.uk>

On Wed, 20 Dec 2017 08:04:50 PST (-0800), joseph@codesourcery.com wrote:
> On Tue, 19 Dec 2017, Palmer Dabbelt wrote:
>
>> We're planning on supporting 6 glibc configurations on RISC-V, all of which we
>> internally run regression tests on:
>>
>> * -march=rv64imafdc -mabi=lp64d   -- what we expect to be the most used
>>                                      configuration
>> * -march=rv64imac   -mabi=lp64    -- soft floating point
>> * -march=rv64imafdc -mabi=lp64    -- soft float ABI, but allowed to use
>> 				     hardware floating point instruction.  This
>> 				     is like softfp in ARM land.
>> * -march=rv32imafdc -mabi=ilp32d  -- rv32i is a 32-bit ISA
>> * -march=rv32imac   -mabi=ilp32
>> * -march=rv32imafdc -mabi=ilp32
>
> But you also define dynamic linker names for the "f" ABI variants (lp64f,
> ilp32f), so, as per my previous comments, those should be built by
> build-many-glibcs.py and included in at least some testing.

Oh, sorry -- lp64f and ilp32f aren't going to be supported in glibc/Linux, just 
to reduce the number of ABI combinations.  I'll remove them from the v3.

>> * Our test suite results are very bad, but I believe this is because we're
>>   running on QEMU's user-mode emulation which is known to be both buggy and
>>   incomplete.  I'm bringing up userspace again to produce a more reasonable
>>   test suite run, which will hopefully have a much cleaner run.
>
> Full execution test results - meaning on QEMU system-mode emulation or
> hardware, not user-mode emulation - are definitely needed to judge whether
> a port is ready for inclusion (I've suggested < 20 architecture-specific
> FAILs as indicative of a state comparable to other reasonably
> well-maintained ports).

OK -- the only reason I've been running user-mode emulation is because that's 
how our test scripts are setup.  I'm working getting enough of a userspace 
together to run the test suite natively now.  We've had this before, there's 
just nothing based on the 4.15 RC headers and I want to make sure everything 
absolutely lines up.

> Note that there is no need for the glibc you are testing to be
> ABI-compatible with any glibc in your userspace's root filesystem, so you
> don't need to rebuild userspace (if e.g. it's using older glibc with
> different symbol versions) to test current glibc.  It *does* need to be
> able to find libgcc_s and libstdc++ shared libraries at runtime, but you
> can copy those into the glibc build directory before running tests.
>
>> * I've only added one configuration to build-many-glibcs.py, which I haven't
>>   actually run yet.  I'll rectify this, but I wanted to at least get something
>>   out so everyone was on the same page here -- the commit is more of a TODO
>>   than an actual commit.
>
> There should be at least one per ABI in there.  Additional variants for an
> ABI (e.g. varying whether hard or soft float is used with a soft-float
> ABI) are optional, depending on whether you think they provide useful
> additional coverage of significantly different code in glibc getting
> built.  Such variants should typically only need listing in extra_glibcs
> so they get built in a "glibcs" build but not a "compilers" build.
>
> Depending on the multilib configurations used by GCC you may or may not
> need as many GCC builds as different ABIs (e.g. MIPS has 24 ABIs, so 24
> glibc builds in build-many-glibcs.py, but only 8 separate GCC builds, each
> with multilibs for 3 ABIs).

We currently support all the glibc targets in a single GCC build and we hope to 
keep it that way, so hopefully this says a bit easier for us.  Thanks, though 
-- part of the reason I only put one entry in was because I wasn't sure what to 
do :).

> It's important to make sure that the build is completely clean for the GCC
> / glibc variants you add, including no failures of compilation tests.
> (That is, clean given that you substitute a checkout of Linus's git tree
> for the default release version of Linux - obviously the builds can't be
> clean from the bots until the Linux 4.15 release comes out.)

Makes sense.  I'll be sure this is the case.

>> * I'm not sure what the right the to do with VDSO_NAME_LINUX_4_15 is.  It seems
>>   odd that there's nothing newer than 2.6.29 in there.
>
> That probably indicates that any more recent vDSOs added to the Linux
> kernel used a version number that reflected when people started developing
> them, rather than the version when they actually got into the kernel.
> Once it gets into the kernel, the symbol version used for the vDSO by the
> kernel becomes part of the kernel/userspace ABI, so fixed even if in some
> sense it's the "wrong" version.
>
> If the RISC-V Linux kernel port uses a LINUX_4.15 symbol version for its
> vDSO, adding VDSO_NAME_LINUX_4_15 seems right to me.

OK, that makes sense.  During the Linux submission process it was suggested we 
use 4.15.0, I guess I'm just a bit surprised we're the only ones wo have 
something newer than 2.6.29.

>> * Many copyright cleanups.
>
> Of course, if work on the port goes past 31 December before it's ready to
> go in, you'll need to update all copyrights to use <year>-2018 ranges.

Sounds good.  DJ wrote a copyright checking script, so it should be easy to 
find everything.

Thanks for all the feedback.  I'll go through your messages, and though I 
haven't read them yet I assume we'll be submitting a v3.

  reply	other threads:[~2017-12-20 20:25 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  7:23 Palmer Dabbelt
2017-12-20  7:23 ` [PATCH v2 03/15] RISC-V: Startup and Dynamic Loading Code Palmer Dabbelt
2017-12-20 16:38   ` Joseph Myers
2017-12-23  3:25     ` Palmer Dabbelt
2017-12-23  3:33       ` DJ Delorie
2017-12-23 12:52       ` Joseph Myers
2017-12-20  7:23 ` [PATCH v2 02/15] RISC-V: ABI Implementation Palmer Dabbelt
2017-12-20 16:31   ` Joseph Myers
2017-12-23  3:25     ` Palmer Dabbelt
2017-12-23  3:30       ` DJ Delorie
2017-12-20  7:23 ` [PATCH v2 04/15] RISC-V: Thread-Local Storage Support Palmer Dabbelt
2017-12-20 16:45   ` Joseph Myers
2017-12-23 19:10     ` Palmer Dabbelt
2017-12-20  7:23 ` [PATCH v2 05/15] RISC-V: Generic <string.h> Routines Palmer Dabbelt
2017-12-20 16:48   ` Joseph Myers
2017-12-23 22:01     ` Palmer Dabbelt
2018-01-01  0:52       ` Joseph Myers
2018-01-03 15:46         ` Adhemerval Zanella
2018-01-03 16:03           ` Joseph Myers
2018-01-03 16:08             ` Adhemerval Zanella
2017-12-20  7:23 ` [PATCH v2 01/15] RISC-V: Build Infastructure Palmer Dabbelt
2017-12-20 14:05   ` Dmitry V. Levin
2017-12-20 20:25     ` Palmer Dabbelt
2017-12-20 16:22   ` Joseph Myers
2017-12-20 16:49     ` Adhemerval Zanella
2017-12-23  2:22     ` Palmer Dabbelt
2017-12-23 12:44       ` Joseph Myers
2017-12-25 20:58         ` Palmer Dabbelt
2018-01-01  1:21           ` Joseph Myers
2017-12-20 16:43   ` Joseph Myers
2017-12-23  3:41     ` Palmer Dabbelt
2017-12-23 12:53       ` Joseph Myers
2017-12-20  7:24 ` [PATCH v2 08/15] RISC-V: RV32D, RV64F, and RV64D Support Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 07/15] RISC-V: RV32F Support Palmer Dabbelt
2017-12-20 17:01   ` Joseph Myers
2017-12-20 17:04     ` Joseph Myers
2017-12-24  1:26       ` Palmer Dabbelt
2017-12-24  0:37     ` Palmer Dabbelt
2018-01-01  0:57       ` Joseph Myers
2017-12-20  7:24 ` [PATCH v2 09/15] RISC-V: Atomic and Locking Routines Palmer Dabbelt
2017-12-20 17:08   ` Joseph Myers
2017-12-24  1:26     ` Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 12/15] RISC-V: Linux Startup and Dynamic Loading Code Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 10/15] RISC-V: Linux Syscall Interface Palmer Dabbelt
2017-12-20 16:57   ` Adhemerval Zanella
2017-12-24  0:24     ` Palmer Dabbelt
2018-01-01  0:56       ` Joseph Myers
2018-01-03 13:43         ` Christoph Hellwig
2018-01-03 15:56           ` Adhemerval Zanella
2018-01-09  1:30             ` Palmer Dabbelt
2018-01-09 11:16               ` Adhemerval Zanella
2017-12-20 17:24   ` Joseph Myers
2017-12-25 19:47     ` Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 11/15] RISC-V: Linux ABI Palmer Dabbelt
2017-12-20 17:33   ` Joseph Myers
2017-12-25 19:47     ` Palmer Dabbelt
2018-01-01  1:04       ` Joseph Myers
2018-01-02 20:59         ` Joseph Myers
2017-12-20  7:24 ` [PATCH v2 06/15] RISC-V: Generic <math.h> and soft-fp Routines Palmer Dabbelt
2017-12-20 16:50   ` Joseph Myers
2017-12-24  0:24     ` Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 15/15] Add RISC-V to build-many-glibcs.py Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 14/15] Add linux-4.15 VDSO hash for RISC-V Palmer Dabbelt
2017-12-20  7:24 ` [PATCH v2 13/15] Add RISC-V dynamic relocations to elf.h Palmer Dabbelt
2017-12-20 16:04 ` RISC-V glibc port v2 Joseph Myers
2017-12-20 20:25   ` Palmer Dabbelt [this message]
2017-12-20 20:42     ` Joseph Myers
2017-12-20 17:40 ` Joseph Myers
2017-12-25 20:20   ` Palmer Dabbelt
2018-01-01  1:20     ` Joseph Myers
2018-01-03 13:37       ` Christoph Hellwig
2018-01-03 13:42         ` Joseph Myers
2017-12-20 21:11 ` Joseph Myers
2017-12-20 21:45   ` Palmer Dabbelt
2017-12-25 12:57     ` Adhemerval Zanella
2018-01-01  0:58       ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-02b41a27-5e72-45f2-8c2b-17968eca5185@palmer-si-x1c4 \
    --to=palmer@dabbelt.com \
    --cc=andrew@sifive.com \
    --cc=darius@bluespec.com \
    --cc=dj@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).