gcov: support GCC 7.1
PATCH 4/15 gcov: support GCC 7.1
From: Martin Liska <[email protected]>
Subject: gcov: support GCC 7.1
Starting from GCC 7.1, __gcov_exit is a new symbol expected to be implemented in a profiling runtime.
[[email protected]: coding-style fixes]
[[email protected]: v2]
Signed-off-by Martin Liska <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/gcov/base.c | 6 ++++++ kernel/gcov/gcc_4_7.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-)
kernel/gcov/base.c renamed from kernel/gcov/base.c~gcov-support-gcc-71 +6 -0
@@ -98,6 +98,12 @@ void __gcov_merge_icall_topn(gcov_type * }EXPORT_SYMBOL (__gcov_merge_icall_topn); +void __gcov_exit (void ) +{ +/* Unused. */ +} +EXPORT_SYMBOL (__gcov_exit); +/** * gcov_enable_events - enable event reporting through gcov_event() *
kernel/gcov/gcc_4_7.c renamed from kernel/gcov/gcc_4_7.c~gcov-support-gcc-71 +3 -1
@@ -18,7 +18,9 @@#include <linux/vmalloc.h> #include "gcov.h" -#if (__GNUC__ >5 ) || (__GNUC__ ==5 && __GNUC_MINOR__ >=1 ) +#if (__GNUC__ >=7 ) +#define GCOV_COUNTERS 9 +#elif (__GNUC__ >5 ) || (__GNUC__ ==5 && __GNUC_MINOR__ >=1 )#define GCOV_COUNTERS 10#elif __GNUC__ ==4 && __GNUC_MINOR__ >=9 #define GCOV_COUNTERS 9
_