diff options
author | Peter Oberparleiter <oberpar@linux.ibm.com> | 2024-06-10 11:27:43 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-06-15 10:43:06 -0700 |
commit | c1558bc57b8e5b4da5d821537cd30e2e660861d8 (patch) | |
tree | 0493ebae5f59a6e83dae6f6fe56e7c36ec342e0d /kernel/gcov | |
parent | 7fea700e04bd3f424c2d836e98425782f97b494e (diff) |
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/20240610092743.1609845-1-oberpar@linux.ibm.com
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reported-by: Allison Henderson <allison.henderson@oracle.com>
Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/gcov')
-rw-r--r-- | kernel/gcov/gcc_4_7.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c index 74a4ef1da9ad..fd75b4a484d7 100644 --- a/kernel/gcov/gcc_4_7.c +++ b/kernel/gcov/gcc_4_7.c @@ -18,7 +18,9 @@ #include <linux/mm.h> #include "gcov.h" -#if (__GNUC__ >= 10) +#if (__GNUC__ >= 14) +#define GCOV_COUNTERS 9 +#elif (__GNUC__ >= 10) #define GCOV_COUNTERS 8 #elif (__GNUC__ >= 7) #define GCOV_COUNTERS 9 |