public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Demi Marie Obenour" <demiobenour@gmail.com>,
	"Eric Blake" <eblake@redhat.com>, "Sam James" <sam@gentoo.org>,
	"Carlos O'Donell via Libc-alpha" <libc-alpha@sourceware.org>,
	autoconf@gnu.org, c-std-porting@lists.linux.dev,
	"Zack Weinberg" <zack@owlfolio.org>,
	"David Seifert" <soap@gentoo.org>,
	"Gentoo Toolchain" <toolchain@gentoo.org>,
	"Arsen Arsenović" <arsen@aarsen.me>,
	dueno@redhat.com
Subject: Re: On time64 and Large File Support
Date: Thu, 2 Mar 2023 11:02:44 +0000	[thread overview]
Message-ID: <20230302110244.GK7636@redhat.com> (raw)
In-Reply-To: <7253e4c5-0f36-e725-f180-624f8887bf08@cs.ucla.edu>

On Thu, Mar 02, 2023 at 02:28:28AM -0800, Paul Eggert wrote:
> On 2023-03-02 01:04, Daniel P. Berrangé wrote:
> >IMHO if distros really want to deal with this, they need to be able to
> >force _TIME_BITS=64 globally / unconditionally, and do a mass rebuild.
> 
> As things stand this is probably the best way to go. Although some
> pain is inevitable, this approach appears to be the least painful.

I think the question remains how to do this.  In Fedora we have a
concept of global C/C++ flags which most C/C++ applications obey:

$ rpm --eval '%{__global_cflags}'
-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

We could stick -D_TIME_BITS=64 in there and then do a mass rebuild.
We didn't historically do this for -D_FILE_OFFSET_BITS, instead
relying on every application to switch for itself.

As Dan says, back then everyone was using 32 bit machines routinely.
Now (in Fedora at least) this breakage in a core package on i686 has
barely been noticed.

Another way to look at this is that it's a bug in gnutls and we should
fix it only in this package (and in future other packages that expose
time_t directly through public ABIs).  Would probably require at least
some symbol version trickery.

Another factor here is that Fedora is in the process of dropping i686,
the last remaining 32 bit platform since we dropped armv7 a few
releases ago.  So maybe this is not a problem for Fedora.

Rich.

> Mainstream developers long ago migrated to 64-bit time_t, and fewer
> and fewer of them have the time to worry about the shrinking subset
> of the embedded system world where legacy 32-bit time_t is still OK
> (at least for the next several months). It's incumbent on system
> builders who still cater to legacy 32-bit time_t (for now) to figure
> out how to wrangle their systems into the 64-bit time_t world; they
> can't really expect Glibc, Gnulib, Autoconf, GnuTLS, etc. to make
> the job much easier than it already is.
> 
> 
> >So while there is a chance of inconsistent usage [with off_t], and thus
> >ABI incompatibility, in practice this is a non-issue since everything
> >of consequence has long ago opted in to _FILE_OFFSET_BITS=64.
> 
> Fifteen years from now we'll be saying the same thing about
> _TIME_BITS. There will be some pain in the meantime, just as there
> was with the _FILE_OFFSET_BITS transition, something I lived through
> and was not too happy about either.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit


  parent reply	other threads:[~2023-03-02 11:02 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  8:38 Sam James
2022-11-11  9:16 ` Paul Eggert
2022-11-11  9:19   ` Sam James
2022-11-11 23:48   ` Joseph Myers
2022-11-11  9:19 ` Florian Weimer
2022-11-11  9:27   ` Sam James
2022-11-11 11:38     ` Florian Weimer
2022-11-11 20:12       ` Paul Eggert
2022-11-12  2:20     ` Zack Weinberg
2022-11-12  3:57       ` Sam James
2022-11-12 14:16         ` Zack Weinberg
2022-11-12 17:41           ` Paul Eggert
2022-11-12 18:50             ` Bruno Haible
2022-11-12 19:15               ` Paul Eggert
2022-11-12 20:23                 ` Wookey
2022-11-12 20:54                   ` Russ Allbery
2022-11-12 21:31                   ` Paul Eggert
2022-11-15  5:09                     ` Sam James
2022-11-12 18:19       ` Paul Eggert
2022-11-11  9:40   ` Andreas K. Huettel
2022-11-11 11:30     ` Florian Weimer
2022-11-11 19:01       ` Andreas K. Huettel
2022-11-11 19:28         ` Palmer Dabbelt
2022-11-11  9:46   ` Paul Eggert
2022-11-11 11:22     ` Florian Weimer
2022-11-11 19:56       ` Paul Eggert
2022-11-12  4:20   ` Wookey
2022-11-12  4:28     ` Sam James
2022-11-12  4:56       ` Wookey
2022-11-12  4:59         ` Sam James
2022-11-12 18:33     ` Paul Eggert
2022-11-14  8:39   ` Adam Sampson
2022-11-14 11:47     ` Florian Weimer
2022-11-14 20:26     ` Arsen Arsenović
2022-11-14 20:52       ` Florian Weimer
2022-11-15  7:39         ` Arsen Arsenović
2022-11-11 10:25 ` Richard Purdie
2023-03-01 22:38 ` Eric Blake
2023-03-02  0:29   ` Demi Marie Obenour
2023-03-02  9:04     ` Daniel P. Berrangé
2023-03-02 10:28       ` Paul Eggert
2023-03-02 10:38         ` Andreas Schwab
2023-03-03  5:46           ` Paul Eggert
2023-03-06  8:58             ` Andreas Schwab
2023-03-06 10:19               ` Florian Weimer
2023-03-02 11:02         ` Richard W.M. Jones [this message]
2023-03-02 12:17           ` Bruno Haible
2023-03-02 13:24             ` Daniel P. Berrangé
2023-03-03  3:30               ` Wookey
2023-03-03  5:50                 ` Paul Eggert
2023-03-03 14:01                   ` Wookey
2023-03-03 14:14                     ` Daniel P. Berrangé
2023-03-03 23:21             ` Arsen Arsenović
2023-03-03 11:49           ` Florian Weimer
2023-03-03 12:39             ` Richard W.M. Jones
2023-03-02  8:30   ` Richard W.M. Jones

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=20230302110244.GK7636@redhat.com \
    --to=rjones@redhat.com \
    --cc=arsen@aarsen.me \
    --cc=autoconf@gnu.org \
    --cc=berrange@redhat.com \
    --cc=c-std-porting@lists.linux.dev \
    --cc=demiobenour@gmail.com \
    --cc=dueno@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=libc-alpha@sourceware.org \
    --cc=sam@gentoo.org \
    --cc=soap@gentoo.org \
    --cc=toolchain@gentoo.org \
    --cc=zack@owlfolio.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).