Both GCC and Clang documentation states that instrumentation flags
must be used both when compiling and linking with instrumentation.
Previously some packages failed to build with PGO with errors similar
to this;
undefined reference to `__gcov_time_profiler_counter'
A poor workaround was to add -lgcov to LDFLAGS, however, this was much
slower and gave poorer optimization than by simply passing instrumentation
flags to the linker.
It is not neccessary pass PGO use flags to the linker.
This fixes PGO'ing: R, chromium, notepadqq and a bunch of other packages.
Both GCC and Clang documentation states that instrumentation flags must be used both when compiling and linking with instrumentation. Previously some packages failed to build with PGO with errors similar to this;
undefined reference to `__gcov_time_profiler_counter'
A poor workaround was to add
-lgcov
to LDFLAGS, however, this was much slower and gave poorer optimization than by simply passing instrumentation flags to the linker.It is not neccessary pass PGO use flags to the linker.
This fixes PGO'ing: R, chromium, notepadqq and a bunch of other packages.
Signed-off-by: Joey Riches josephriches@gmail.com