Skip to contentSkip to conversation

gcov: Add support for GCC 15

PATCH Applied Peter Oberparleiter 1 participant 1 message Oct 28, 2025

Subsystems (2)
lore
Share & tools
lore

Peter Oberparleiter

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 kernel/gcov/gcc_4_7.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/gcov/gcc_4_7.c +3 -1
index a08cc076f332..ffde93d051a4 100644
@@ -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
Signature · 1 line
2.48.1