to 10. jouluk. 2020 klo 21.43 Martin-Éric Racine ([email protected]) kirjoitti: > > to 10. jouluk. 2020 klo 21.21 Simon McVittie ([email protected]) kirjoitti: > > Debian's rustc has a patch to reduce the i386 baseline from upstream's > > pentium4 to pentiumpro > > https://sources.debian.org/src/rustc/1.48.0+dfsg1-1/debian/patches/d-i686-baseline.patch/ > > but apparently that's not sufficient for a Geode LX. i686 is in a weird > > situation where the Pentium Pro was the *first* i686 CPU, but is not a > > *baseline* i686 CPU. > > > > Presumably the root cause of #976374 in librsvg, which also contains > > Rust code, is the same. > > I cannot help but wonder what platform defaults GCC uses on i386. > Given how the baseline kernel for i386 (linux-image-686 i.e. Linux for > older PCs) is configured for Geode LX, I would presume the GCC > defaults are aligned to match. AFAIK that kernel is compiled for Geode > and for Generic 686, which I presume means only using the flags that > intersect both CPU variants. It might be a good starting point for the > Rust compiler too.
I'm no expert on x86 instruction sets, but looking at GCC options suggests that "i686" would be the same as -march=pentiumpro and -mtune=generic, which seems to provide support for a broader range of i686-family chips. It's just a guess (I know nothing of Rust's building environment), but I wouldn't be surprised if the above patch also affected -mtune, which is perhaps too tight of a CPU spec. Again, checking what compiler and linker options are used to build linux-image-686 might provide a clearer view of what instruction set is a safe baseline for the i386 port. Martin-Éric

