From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 394AD3858C52 for ; Sat, 12 Nov 2022 04:28:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 394AD3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/signed; boundary="Apple-Mail=_2DA070AA-5562-4E39-A1DA-3343C69A4C7D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: On time64 and Large File Support From: Sam James In-Reply-To: <20221112042052.GL27919@mail.wookware.org> Date: Sat, 12 Nov 2022 04:28:18 +0000 Cc: Florian Weimer , Carlos O'Donell via Libc-alpha , Autoconf Development , c-std-porting@lists.linux.dev, Zack Weinberg , David Seifert , Gentoo Toolchain , =?utf-8?Q?Arsen_Arsenovi=C4=87?= , Paul Eggert , Frederic Berat , Arnd Bergmann , Helmut Grohne Message-Id: <6CB9AA26-B9E2-46F3-99FA-A0C038963495@gentoo.org> References: <87wn81q254.fsf@oldenburg.str.redhat.com> <20221112042052.GL27919@mail.wookware.org> To: Wookey X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_2DA070AA-5562-4E39-A1DA-3343C69A4C7D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 12 Nov 2022, at 04:20, Wookey wrote: >=20 > On 2022-11-11 10:19 +0100, Florian Weimer wrote: >=20 > Hi. I've started looking into the 64-bit time_t transition for 32-bit = armhf > in Debian. We are currently doing a preliminary bootstrap to see what > breaks. We strongly suspect that only a wholesale rebuild for the new > ABI (i.e a new Debian architecture) is practical, but have not yet > entirely ruled out attempting a migration within the existing armhf > arch. >=20 > [snip] >=20 >> * Sam James >>=20 >>> In Gentoo, we've been planning out what we should do for time64 on >>> glibc [0] and concluded that we need some support in glibc for a = newer >>> option. I'll outline why below. >>>=20 >>> Proposal: glibc gains two new build-time configure options: >>> * --enable-hard-time64 >>> * --enable-hard-lfs >=20 > I don't quite follow the logic of this. glibc already has build-time = macros to set these two things: > _TIME_BITS=3D64 > _FILE_OFFSET_BITS=3D64 >=20 > why do we need configure options too? How do you make sure that every program built uses it? Not every program respects CPPFLAGS and even in CFLAGS, it's a bit of a nuisance. If you patch GCC, you don't cover Clang. If you patch system compilers, that's messy but also doesn't help with custom-built = programs. Of course, we could just patch glibc and cheerily jam it in the headers, but we run into the kind of problems that Joseph Myers mentions then, I think (basically I'd want to make sure we do it right.) >=20 >>> We're now (possibly) on the eve of an autoconf 2.72 release which = contains two changes >>> of note [2][3] >>> 1. addition of a new AC_SYS_YEAR2038 macro; >>> 2. making AC_SYS_LARGEFILE change behaviour to imply = AC_SYS_YEAR2038. >=20 > Which is the opposite way round to glibc, where _TIME_BITS=3D64 = requires > _FILE_OFFSET_BITS=3D64, but not the other way round > (_FILE_OFFSET_BITS=3D64, can be set on its own). Am I misunderstanding = something here? >=20 I wonder the same. I don't think it's obvious, and it may not be obvious to people writing software using autoconf either... > It doesn't seem right to me that AC_SYS_LARGEFILE should imply > AC_SYS_YEAR2038. What is the reasoning behind that? >=20 >> I really wish the rest of GNU would talk to glibc maintainers before >> overriding glibc maintainer decisions. If we cannot revert this in >> autoconf (and gnulib), this will very much endanger the Fedora i386 >> port. Debian will probably be impacted in the same way. >=20 > I need to read around all this as I have only just become aware that > the LFS thing is entangled with the timet_64 thing. Is there a good > place to read _why_ one implies the other? It definitely complicates > matters. time64 has to imply LFS because of some structures like stat including both off_t (LFS) and st_atim (time64), I think. Some of it is internal = too. Or do you mean LFS =3D> time64? I have no idea for why that's entangled in autoconf and gnulib. >=20 >>> On reflection and after extensive discussion within Gentoo (although >>> I don't seek to speak for everybody there) - with special thanks to >>> David Seifert and Arsen Arsenovi=C4=87 for tolerating my bikesheds = on this, >>> we don't think it's feasible to handle this in a piecemeal fashion - >>> at the very least not without spending a significant & for some, >>> undesirable amount of time on supporting "obsolete" 32-bit = platforms. >=20 > Distros need to co-ordinate on this. If there are going to be new > triplets for the 'LFS and 64_bit timet' ABI(s) then we should agree on > them and use them. If distros are happy to migrate to these ABIs > within the existing arm-linux-gnueabihf and i386-linux-gnu (or > i686-linux-gnu) then we should do that. >=20 > If half the distros migrate within the existing triplet and the rest = use > a new one, that sounds like a recipie for much confusion. >=20 100%. And also on sharing patches and known problems and experience with the migration. All of it! > I could write more, but I'll swot up a bit first :-) It's not easy to find much about all of this! I almost felt like I was missing something at first. :) Best, sam --Apple-Mail=_2DA070AA-5562-4E39-A1DA-3343C69A4C7D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY28g4l8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kOMsAQC+mRPigSEI2Ek7zSHm3LoERIBcFQS0dtdyJGAHW2ctcwEAxw3W+ZlYOl5Y fNuul/DBJBr7tQ+z7wMlH/K7rklGzwQ= =Yz1L -----END PGP SIGNATURE----- --Apple-Mail=_2DA070AA-5562-4E39-A1DA-3343C69A4C7D--