summaryrefslogtreecommitdiff
path: root/kernel/gcov
diff options
context:
space:
mode:
authorPeter Oberparleiter <oberpar@linux.ibm.com>2025-10-28 12:51:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-24 10:35:59 +0100
commit592b3b203a3e1de0ac9b257a34a265fd8e51937b (patch)
treece0de126cdf8a95a7184a5bb069b2c64b79de082 /kernel/gcov
parentd7be15a634aa3874827d0d3ea47452ee878b8df7 (diff)
downloadlinux-592b3b203a3e1de0ac9b257a34a265fd8e51937b.tar.gz
linux-592b3b203a3e1de0ac9b257a34a265fd8e51937b.tar.bz2
linux-592b3b203a3e1de0ac9b257a34a265fd8e51937b.zip
gcov: add support for GCC 15
commit ec4d11fc4b2dd4a2fa8c9d801ee9753b74623554 upstream. 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: https://github.com/linux-test-project/lcov/issues/445 Tested-by: Matthieu Baerts <matttbe@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/gcov')
-rw-r--r--kernel/gcov/gcc_4_7.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index fd75b4a484d7..bbccbae331d7 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__ >= 14)
+#if (__GNUC__ >= 15)
+#define GCOV_COUNTERS 10
+#elif (__GNUC__ >= 14)
#define GCOV_COUNTERS 9
#elif (__GNUC__ >= 10)
#define GCOV_COUNTERS 8