Thanks; sounds like it's some difference between target architectures in GCC? I've changed from an old Intel i7 to a modern Ryzen and as part of profile changes recompiled the entire system with -march=znver4 recently which in the bug comments is suspected to cause that (and potentially other) issues through AVX512 instructions.
Is there some way to define a different -mtune GCC flag per ebuild to only (and always) compile kwin/Plasma without those AVX instructions as a workaround? It's unlikely that there will be any bugfix for Plasma 5 as it is EOL (but I have doubts that Plasma 6 is already equal to Plasma 5 in terms of features and usability, having gone through all the previous KDE major releases).
Edit: Found it:
https://wiki.gentoo.org/wiki//etc/porta ... ic_package
1. create a .conf suffixed file in /etc/portage/env/ to hold the override (both CFLAGS and CXXFLAGS, variable substitution works)
2. refer the package to that env file in /etc/portage/package.env (which is a file, not a directory)
In my case:
Code: Select all
# cat /etc/portage/env/znver3.conf
CFLAGS="-O2 -march=znver3"
CXXFLAGS="${CFLAGS}"
# cat /etc/portage/package.env
<kde-plasma/kwin-6 znver3.conf
... and after logging back in I can confirm that it really was due to an incompatibility in the CPU instruction set (and/or a GCC compiler bug?)