This seems to be what is needed to get i686-linux-gnu Guix builds working.
Since we don’t officially provide i686-linux-gnu release binaries, I’m not sure if this is wanted for Core. Considering the need to reintroduce --enable-glibc-back-compat
, I would guess we don’t want it. But at the same time, our Guix stuff presently has incomplete/broken i686 support, so maybe others might disagree and think it’s worth keeping. (I’m keeping it in Knots for now, so might as well offer it for Core here too.)
Note that for __divmoddi4
, I have reintroduced it with a very simple (copyright-immune?) replacement similar to the one used by LLVM. Prior versions (0.17-0.21) using it had copied GPL 3 code from GCC.
Previous versions had also used this __divmoddi4
substitution concept for ARM. As far as I can tell, it was never needed for ARM. While ARM uses a similar method, the equivalent libgcc functions it calls appear to be older than on x86-32.
Also note we cannot use the “build with an older library” trick for __divmoddi4
because it is part of GCC, not glibc, and we require a fairly new GCC to build at all, at this point.