Skip to content

Commit c1558bc

Browse files
oberparakpm00
authored andcommitted
gcov: add support for GCC 14
Using gcov on kernels compiled with GCC 14 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 14. Tested with GCC versions 14.1.0 and 13.2.0. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Oberparleiter <[email protected]> Reported-by: Allison Henderson <[email protected]> Reported-by: Chuck Lever III <[email protected]> Tested-by: Chuck Lever <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 7fea700 commit c1558bc

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__ >= 10)
21+
#if (__GNUC__ >= 14)
22+
#define GCOV_COUNTERS 9
23+
#elif (__GNUC__ >= 10)
2224
#define GCOV_COUNTERS 8
2325
#elif (__GNUC__ >= 7)
2426
#define GCOV_COUNTERS 9

0 commit comments

Comments
 (0)