]> git.baikalelectronics.ru Git - kernel.git/commit
gcov: support GCC 12.1 and newer compilers
authorMartin Liska <mliska@suse.cz>
Thu, 13 Oct 2022 07:40:59 +0000 (09:40 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 21 Oct 2022 04:27:22 +0000 (21:27 -0700)
commit5d8d3c9b445a35446f42f9d6c477930ad473ec84
treef0962f42a84a64fda7917344e3b347af74750042
parent21d62ea445cb4f075306fc2d60b76c53f15e8cc0
gcov: support GCC 12.1 and newer compilers

Starting with GCC 12.1, the created .gcda format can't be read by gcov
tool.  There are 2 significant changes to the .gcda file format that
need to be supported:

a) [gcov: Use system IO buffering]
   (23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05) changed that all sizes in
   the format are in bytes and not in words (4B)

b) [gcov: make profile merging smarter]
   (72e0c742bd01f8e7e6dcca64042b9ad7e75979de) add a new checksum to the
   file header.

Tested with GCC 7.5, 10.4, 12.2 and the current master.

Link: https://lkml.kernel.org/r/624bda92-f307-30e9-9aaa-8cc678b2dfb2@suse.cz
Signed-off-by: Martin Liska <mliska@suse.cz>
Tested-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/gcov/gcc_4_7.c