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

From: David Laight
Date: Thu Sep 10 2020 - 17:52:04 EST


From: Linus Torvalds
> Sent: 10 September 2020 20:19
>
> 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.
>
> Lovely.
>
> 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?

I was wondering what happens if files compiled with different
versions of gcc get linked together?

Not too far-fetched for someone to release a .a file containing
'gconv' objects.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)