Skip to content

Commit ec4d11f

Browse files
oberparakpm00
authored andcommitted
gcov: add support for GCC 15
Using gcov on kernels compiled with GCC 15 results in truncated 16-byte long .gcda files with no usable data. To fix this, update GCOV_COUNTERS to match the value defined by GCC 15. Tested with GCC 14.3.0 and GCC 15.2.0. Link: https://lkml.kernel.org/r/20251028115125.1319410-1-oberpar@linux.ibm.com Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Reported-by: Matthieu Baerts <matttbe@kernel.org> Closes: linux-test-project/lcov#445 Tested-by: Matthieu Baerts <matttbe@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 0d6c356 commit ec4d11f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/gcov/gcc_4_7.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
#include <linux/mm.h>
1919
#include "gcov.h"
2020

21-
#if (__GNUC__ >= 14)
21+
#if (__GNUC__ >= 15)
22+
#define GCOV_COUNTERS 10
23+
#elif (__GNUC__ >= 14)
2224
#define GCOV_COUNTERS 9
2325
#elif (__GNUC__ >= 10)
2426
#define GCOV_COUNTERS 8

0 commit comments

Comments
 (0)