In a x86_64-linux-gnu build, this drops:
x86_64-linux-gnu/bin/x86_64-linux-gnu-gcov x86_64-linux-gnu/bin/x86_64-linux-gnu-gcov-dump x86_64-linux-gnu/bin/x86_64-linux-gnu-gcov-tool x86_64-linux-gnu/lib/gcc/x86_64-linux-gnu/12.4.0: libgcov.a
For mingw-w64-gcc, --disable-gcov is currently passed for this
target in Guix, due to issues with mingw-w64, see
https://github.com/fanquake/guix/blob/8bed031e58c9cf895d243790e7c80808b0075de7/gnu/packages/gcc.scm#L99-L102.
However we'll add it in any case, in case it's re-enabled in future,
when the underlying issues are fixed.
This is a backport of core#31450
Depends on D20555