LTO: ensure you have that gcc patch https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91307
There might be few other related patches that our (SUSE's) Martin Liska probably knows, but if you already have the -flto=auto, you probably got the others, too. PGO: > The only thing it would do is to provide a common interface to enable/disable > it, not an implementation. In openSUSE, we have a boolean %do_profiling RPM define that can be used in individual .spec files, for example https://github.com/bmwiedemann/openSUSE/blob/ca729bd0021b6ed6793807158bb3aabadbde4a4b/packages/b/bash/bash.spec#L418 Overall, it is still very hard to get reproducible builds with PGO enabled, but you can see gzip and libsamplerate examples in https://github.com/bmwiedemann/theunreproduciblepackage/tree/master/pgo for places where it was possible. Sometimes it might make sense to have a 2nd pgo value that answers the question if performance is more important than reproducible build results.