On Tue, 06 Jun 2023 at 09:33:22 +0200, Helmut Grohne wrote:
> Judging from the conversation, killing i386 quite obviously is desired
> by some participants, but evidently not by all. How quickly we want to
> kill it is not obvious to me.

When considering the future of i386, a factor that we need to bear in
mind is that there are two major use-cases for i386, with requirements
that sometimes conflict:

1. i386 as a fully-featured architecture that you can run independently
   on 32-bit x86 systems from roughly the 2000-2010 era

2. i386 as a multiarch foreign architecture to run legacy binaries on
   modern x86_64 systems
   2a. legacy native Linux i386 binaries
   2b. legacy Windows i386 binaries via Wine (which requires a somewhat
       complete i386 Linux library stack)

For example, Ubuntu has ceased to support i386 for the first use-case,
and only supports the second use-case. I personally think that Ubuntu
has made a good pragmatic decision here, which Debian should seriously
consider adopting.

Most non-Debian-derived distributions like Fedora and Arch seem to be in
approximately the same position as Ubuntu for their i386 support, although
they tend to use multilib (lib64+lib or lib+lib32) instead of multiarch.

Which of these use-cases is more interesting to us has an impact on how
we (should) want to do the time32 transition. For users who do not have
any legacy i386 binaries and only use open source software that can be
recompiled, the need to recompile everything is a one-time cost for the
distribution or for users of locally-compiled software, but does not make
anything impossible.

However, if the ABI of commonly-used libraries like libX11 undergoes an
incompatible change for the time32 transition, in a way that breaks the
ability to run legacy i386 binaries, then the second use-case is going
to become essentially impossible for native Linux binaries.

Conversely, the ability to tell the time correctly is probably less
important for games and similar legacy i386 binaries than it would be for
a full, bootable OS, because timestamps that can be subtracted to get a
relative time interval are probably sufficient for many legacy uses of
time_t. Even in cases where a time_t is used for an absolute date/time,
displaying the wrong date/time after 2038 seems like a less bad failure
mode than a segmentation fault caused by disagreeing on the size of a
struct in memory.

The i386-legacy-binaries use-case is particularly visible to game players,
because older proprietary native Linux games, including a number of
older games available on Steam, are a high-visibility source of legacy
i386 binaries that we cannot recompile. At the moment, the Steam client
is also an example of a legacy i386 binary: this was originally for
portability to 32-bit hardware, which it no longer supports, but the
bootstrap executable that launches the rest of Steam has continued to be
32-bit, partly for historical reasons and partly as a canary to detect and
diagnose non-32-bit-capable OSs before the user tries to run any actual
games. Steam does have the ability to run legacy games in a container
(which I've spent a lot of time working on over the last few years),
but that still requires the host system to contribute at least glibc
and Mesa, together with their dependencies.

Whether we care about the 32-bit-system use case or only the
i386-legacy-binaries use case is also a key input into other decisions
that need to be made around x86, like whether we raise the baseline
to include SSE2: if we want to be able to run i386 on older 32-bit
CPUs indefinitely, then that's a reason to keep the current baseline,
but if we are no longer interested in supporting 32-bit x86 hardware,
then we can (and arguably should) raise the baseline to require all the
features that are mandatory for x86_64, notably SSE2 (which would allow
compiling everything with -mfpmath=sse and therefore avoiding weird
i386-specific bugs caused by excess precision in the legacy i387 FPU).

    smcv

Reply via email to