It’s known that mksh’s testsuite exhibits problems in the infrastructure (kernel, libraries, toolchain, compiler).
In this case, GCC’s LTO (and before that, -fwhole-program --combine) is a repeat offender of breaking code.
If your builds exhibit this problem, you should *disable LTO for your _entire_ operating system*. (I’ve seen this GCC version produce LTO bugs on other distros as well, it’s wrong code generation, but LTO bugs are not interesting to GCC developers.)
It’s known that mksh’s testsuite exhibits problems in the infrastructure (kernel, libraries, toolchain, compiler).
In this case, GCC’s LTO (and before that, -fwhole-program --combine) is a repeat offender of breaking code.
If your builds exhibit this problem, you should *disable LTO for your _entire_ operating system*. (I’ve seen this GCC version produce LTO bugs on other distros as well, it’s wrong code generation, but LTO bugs are not interesting to GCC developers.)