public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Rich Felker <dalias@libc.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: "Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
	"Antonios Salios via Libc-help" <libc-help@sourceware.org>,
	"Antonios Salios" <antonios@mwa.re>,
	"Jan Henrik Weinstock" <jan@mwa.re>,
	"Lukas Jünger" <lukas@mwa.re>
Subject: Re: 64 bit time_t on riscv32
Date: Tue, 16 Jan 2024 15:43:09 -0500	[thread overview]
Message-ID: <20240116204309.GR22081@brightrain.aerifal.cx> (raw)
In-Reply-To: <87r0ih1c4g.fsf@oldenburg.str.redhat.com>

On Tue, Jan 16, 2024 at 05:22:55PM +0100, Florian Weimer wrote:
> * Rich Felker:
> 
> > On Tue, Jan 16, 2024 at 04:46:17PM +0100, Florian Weimer wrote:
> >> * Adhemerval Zanella Netto:
> >> 
> >> > My understanding was __USE_TIME_BITS64 would be required only for ABIs
> >> > that actually would multiple time_t sizes and the glibc 64 bit time_t 
> >> > supported was added on this assumption.  However, the design document 
> >> > does state __USE_TIME_BITS64 would be defined even for architectures 
> >> > where is does not require it.  I it was not really caught in development
> >> > because the design creator was not really much involved at the time.
> >> >
> >> > I think it should be feasible to fix it, although backporting it would
> >> > generate a quite large patch.
> >> 
> >> It will break applications that use __USE_TIME_BITS64 with glibc's
> >> current semantics centered on time64 redirects (incorrectly, of
> >> course—it's an internal macro).  I think the use in the kernel is
> >> probably easier to address, and it has to be changed for compatibility
> >> with other libcs anyway.
> >
> > If there are applications assuming __USE_TIME_BITS64 implies redirects
> > and doing some hack around that, they really need to be fixed not to
> > do that. It will break on musl with (not yet merged) rv32 port as well
> > as any future 32-bit ports, which won't have any redirects because
> > there is no legacy 32-bit time_t ABI to support.
> 
> That's actually not a problem because __USE_TIME_BITS64 is not defined
> on rv32 et al. (hence the complaint about what the UAPI headers are
> doing).

It is a problem for musl users because we *do* define
__USE_TIME_BITS64 and do so unconditionally, on all archs, including
future rv32. Even if we could opt not to define it on rv32, that would
not help with future 32-bit ports like sparc where there will be no
redirection but __USE_TIME_BITS64 is needed to get the kernel headers
to do the right thing. So if any applications are really misusing
__USE_TIME_BITS64 as an indicator of having symbol redirections, they
need to stop/get fixed.

Rich

      parent reply	other threads:[~2024-01-16 20:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 12:52 Antonios Salios
2024-01-15 13:40 ` Florian Weimer
2024-01-15 19:55   ` Adhemerval Zanella Netto
2024-01-15 20:15     ` Adhemerval Zanella Netto
2024-01-15 20:29       ` Arnd Bergmann
2024-01-15 22:26     ` Rich Felker
2024-01-16 11:19       ` Adhemerval Zanella Netto
2024-01-16 15:46         ` Florian Weimer
2024-01-16 15:56           ` Rich Felker
2024-01-16 16:22             ` Florian Weimer
2024-01-16 16:29               ` Adhemerval Zanella Netto
2024-01-16 20:43               ` Rich Felker [this message]

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=20240116204309.GR22081@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=antonios@mwa.re \
    --cc=fweimer@redhat.com \
    --cc=jan@mwa.re \
    --cc=libc-help@sourceware.org \
    --cc=lukas@mwa.re \
    /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).