Re: [PATCH -rc v1] gcov: Disable gcov build with GCC 10

From: Linus Torvalds
Date: Thu Sep 10 2020 - 15:19:25 EST

On Thu, Sep 10, 2020 at 5:52 AM Peter Oberparleiter
<oberpar@xxxxxxxxxxxxx> wrote:
> Fix this by updating the in-kernel GCOV_COUNTERS value. Also re-enable
> config GCOV_KERNEL for use with GCC 10.


Is there some way we could see this value automatically, or at least
have a check for it? Right now it's that _very_ magical number that
depends on a gcc version in odd and undocumented ways..

IOW - I'm assuming user space gcov infrastructure finds this number
some way, and wondering if we couldn't do the same?

Or is the gcov tool itself just doing the same kind of thing, and
having magic numbers?

I get the feeling that somebody who knows gcov would go "You are just
doing this all completely incorrectly, you should do XYZ" when they
see that GCOV_COUNTERS thing.

Maybe just a script that finds the right header file in the gcc
installation and extracts it from there, if only to verify the magic
number that we have?