[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240610092743.1609845-1-oberpar@linux.ibm.com>
Date: Mon, 10 Jun 2024 11:27:43 +0200
From: Peter Oberparleiter <oberpar@...ux.ibm.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, allison.henderson@...cle.com,
chuck.lever@...cle.com, oberpar@...ux.ibm.com
Subject: [PATCH] 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.
Reported-by: Allison Henderson <allison.henderson@...cle.com>
Reported-by: Chuck Lever III <chuck.lever@...cle.com>
Signed-off-by: Peter Oberparleiter <oberpar@...ux.ibm.com>
---
kernel/gcov/gcc_4_7.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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
--
2.40.1
Powered by blists - more mailing lists