Bug#1051801: document DEB_BUILD_OPTIONS value nopgo

Bernhard M. Wiedemann bernhardout at lsmod.de
Wed Sep 13 06:24:23 UTC 2023


On 11/09/2023 09.25, Helmut Grohne wrote:
> It also
> is unclear how it affects reproducible builds since such builds depend
> on the performance characteristics of the system performing the build.

It is worth noting that the performance (execution time) of a 
build-system does not matter for profiling, so it is possible to achieve 
reproducible builds with PGO enabled. It is just hard.

See https://build.opensuse.org/request/show/499887
linked in 
https://github.com/bmwiedemann/theunreproduciblepackage/tree/master/pgo

In that gzip patch we even had to hide the name of the temporary file 
from gzip to not get variations from a 'tolower' call that would be 
optimized for different amounts of upper/lower-case letters.

Parallel builds and variations in ordering are also problematic, because 
some of the performance-counter-logic in gcc is not commutative, so 
running A and B calls produces different results from first calling B 
and then A.


With all that said, in openSUSE we also have a %do_profiling value to 
disable PGO for gcc, python and some others, because these profiling 
runs are too large to make deterministic.

Ciao
Bernhard M.


More information about the rb-general mailing list