Subject: bug#72145: rare Emacs screwups on x86 due to GCC bug 58416

From: Eli Zaretskii <[email-masked]>
Date: Thu, 18 Jul 2024 08:14:27 +0300

> Cc: [email-masked]
> Date: Thu, 18 Jul 2024 10:39:42 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Paul Eggert <[email-masked]> writes:
> 
> > On 2024-07-16 22:01, Paul Eggert wrote:
> >> We could add an AC_RUN_IFELSE test for SSE2, though I doubt whether
> >> it would affect builds significantly in practice.
> >
> > On second thought the rare Arch or Gentoo user could still be building
> > Emacs for the Pentium III, and for such a user a run-time test on the
> > build host would be a win. This can be done via the attached revised
> > patch. It uses AC_LINK_IFELSE to compile and run a single program,
> > instead of AC_RUN_IFELSE which (when combined with AC_COMPILE_IFELSE)
> > would mean compiling two test programs and running one.
> 
> I'm thinking of the computer where I produce binaries for Windows 9X,
> which, being a Windows 98 system, probably does not support SSE2.

Look at the Properties to see what kind of CPU it has.  Then you can
establish whether it supports SSE2.

But I think the problem is not where you produce the binaries, the
problem is where people will run them.  On Windows, it is very
frequently a completely different system, so a test on the build host
is insufficient.  I think builds for Windows 9X should use the
'emacs_cv_SSE2_CFLAGS=no' thing regardless of what the build host
supports, because otherwise the binary will simply refuse to run on
the target.