Message ID | mhng-0841ade8-3952-4e47-8c27-55c8cd09c819@palmer-si-x1c4 |
---|---|
State | New, archived |
Headers |
Received: (qmail 7287 invoked by alias); 14 Jun 2017 20:15:46 -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 6875 invoked by uid 89); 14 Jun 2017 20:15:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1624, recommend X-HELO: mail-pf0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:cc:cc:cc:subject:in-reply-to :message-id:mime-version; bh=3E3UaxPdVm7Q4eQ6gVvb54oPeprEqVW3iGwn1hqmDrU=; b=iLRpKLyBzmVz+SC82zV6BCdfHqQbZdv2bYA1Y4PkV4mT0LNCCIlBZFMuF8XI1b6U8+ yCbwp1jdsM1DEgmSpAzG7dD+ZjVOhZavV2elXJDUBAdai5PmstYupt0Fr39b091oPpLb LW11rVvj9iVxUgNWCE6lzl7dID7no1hFM4fUo0NoR9QIBJnwWvz8iDIpdpmXDXtjaysx s24zE0Xt1PbgJS1S5bvmuAier0U+eivLiAPmcPGVHtfc9+Qvx+yvo4hNcfOyaGnOyF5f bssf4/esh4Rn1APxg1fbeZcibzndKP+xZcnHUYvEHHn8mNtDP/ma2N+GLLcMSzyGGQ3d oLRg== X-Gm-Message-State: AKS2vOzv+b+OcXr9ZSnXAZDTXlcZ2m8Q4fOPsWxu3hVa5CyIfYRBVvR5 EOQHUnhDiEyEz3Qj3NaWBA== X-Received: by 10.101.88.130 with SMTP id d2mr1753261pgu.58.1497471326909; Wed, 14 Jun 2017 13:15:26 -0700 (PDT) Date: Wed, 14 Jun 2017 13:15:26 -0700 (PDT) X-Google-Original-Date: Wed, 14 Jun 2017 13:14:37 PDT (-0700) From: Palmer Dabbelt <palmer@dabbelt.com> To: fweimer@redhat.com CC: libc-alpha@sourceware.org CC: Andrew Waterman <andrew@sifive.com> CC: patches@groups.riscv.org CC: Darius Rad <darius@bluespec.com> Subject: Re: RISC-V glibc Port v1 In-Reply-To: <87h8zi1gnz.fsf@oldenburg.str.redhat.com> Message-ID: <mhng-0841ade8-3952-4e47-8c27-55c8cd09c819@palmer-si-x1c4> Mime-Version: 1.0 (MHng) |
Commit Message
Palmer Dabbelt
June 14, 2017, 8:15 p.m. UTC
On Wed, 14 Jun 2017 13:02:40 PDT (-0700), fweimer@redhat.com wrote: > Palmer Dabbelt <palmer@dabbelt.com> writes: > >> This port targets Version 2.2 of the RISC-V User ISA, and supports >> both the RV32I and RV64I base ISAs as well as the M, A, F, D, and C >> extensions as well as our Linux port which is based on the 1.10 >> supervisor specification. > > I would recommend to delay the addition of the 32-bit port, so that you > can start with a 64-bit time_t. Do you have an idea of when there will be a 64-bit time_t clean release? I'd be OK holding off on the 32-bit port for a bit, as we don't expect RV32I-based Linux-compatible systems to be popular. One sticking point is that the RV32I and RV64I base ISAs are very similar, and as such share a lot of code. I'd prefer to avoid removing the rv32 code just to add it back in later, as that will be a big headache. Would it be sufficient to just disallow RV32I in our preconfigure with a patch like this, and then turn RV32I back on when we can support a 64-bit time_t clean ABI?
Comments
On 06/14/2017 10:15 PM, Palmer Dabbelt wrote: > Do you have an idea of when there will be a 64-bit time_t clean release? I'd > be OK holding off on the 32-bit port for a bit, as we don't expect RV32I-based > Linux-compatible systems to be popular. Sorry, no idea. I'm Cc:ing Arnd, who believe worked on the kernel side of things. > One sticking point is that the RV32I and RV64I base ISAs are very similar, and > as such share a lot of code. I'd prefer to avoid removing the rv32 code just > to add it back in later, as that will be a big headache. > > Would it be sufficient to just disallow RV32I in our preconfigure with a patch > like this, and then turn RV32I back on when we can support a 64-bit time_t > clean ABI? I think that would be acceptable. aarch64 is basically in the same boat today (but they want to use a 32-bit time_t for their ILP32 port). Thanks, Florian
On Wed, Jun 14, 2017 at 10:35 PM, Florian Weimer <fweimer@redhat.com> wrote: > On 06/14/2017 10:15 PM, Palmer Dabbelt wrote: >> Do you have an idea of when there will be a 64-bit time_t clean release? I'd >> be OK holding off on the 32-bit port for a bit, as we don't expect RV32I-based >> Linux-compatible systems to be popular. > > Sorry, no idea. I'm Cc:ing Arnd, who believe worked on the kernel side > of things. Progress has been slow for a while, but there are still a number of interested parties, so it is continuing. I don't think it's important to wait here, as 64-bit time_t will be available for all architectures in glibc once the kernel support is done, the question is more about rebuilding all 32-bit binaries in a distro after the change. Arnd
Note that if you do include the 32-bit port, you may want a bits/environments.h header, as for other architectures with both 32-bit and 64-bit ABIs.
On Wed, 14 Jun 2017 14:13:45 PDT (-0700), Arnd Bergmann wrote: > On Wed, Jun 14, 2017 at 10:35 PM, Florian Weimer <fweimer@redhat.com> wrote: >> On 06/14/2017 10:15 PM, Palmer Dabbelt wrote: >>> Do you have an idea of when there will be a 64-bit time_t clean release? I'd >>> be OK holding off on the 32-bit port for a bit, as we don't expect RV32I-based >>> Linux-compatible systems to be popular. >> >> Sorry, no idea. I'm Cc:ing Arnd, who believe worked on the kernel side >> of things. > > Progress has been slow for a while, but there are still a number of interested > parties, so it is continuing. I don't think it's important to wait > here, as 64-bit > time_t will be available for all architectures in glibc once the kernel support > is done, the question is more about rebuilding all 32-bit binaries in a distro > after the change. OK, then I vote we don't wait for RV32 support. While I don't think there's going to be a flood of RV32 Linux-compatible hardware it'd be easier to port userspace to both RV32 and RV64 at the same time, rather than doing it twice. Does that sound OK?
diff --git a/sysdeps/riscv/preconfigure b/sysdeps/riscv/preconfigure index 43e2a4fac0..a15e563a31 100644 --- a/sysdeps/riscv/preconfigure +++ b/sysdeps/riscv/preconfigure @@ -3,7 +3,11 @@ flen=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_fl float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __riscv_float_abi_\([^ ]*\) .*/\1/p'` case "$xlen" in -32 | 64) +32) + echo "rv32i is not supported, we're waiting for a 64-bit time_t clean ABI" >&2 + exit 1 + ;; +64) ;; *) echo "Unable to determine XLEN" >&2