[1/5] gcov: Fix building with GCC8

Message ID 20181010051950.13202-2-stewart@linux.ibm.com
State Accepted
Headers show
Series
  • Small code coverage improvements
Related show

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied

Commit Message

Stewart Smith Oct. 10, 2018, 5:19 a.m.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/Makefile.inc     |  1 +
 core/gcov-profiling.c | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

Patch

diff --git a/core/Makefile.inc b/core/Makefile.inc
index d36350590edb..779dd635ec93 100644
--- a/core/Makefile.inc
+++ b/core/Makefile.inc
@@ -13,6 +13,7 @@  CORE_OBJS += pci-dt-slot.o direct-controls.o cpufeatures.o
 
 ifeq ($(SKIBOOT_GCOV),1)
 CORE_OBJS += gcov-profiling.o
+CFLAGS_SKIP_core/gcov-profiling.o = -Wno-suggest-attribute=const
 endif
 
 CORE=core/built-in.a
diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c
index 136f563f689b..3ff7e6ee1a2c 100644
--- a/core/gcov-profiling.c
+++ b/core/gcov-profiling.c
@@ -51,13 +51,13 @@  struct gcov_info *gcov_info_list;
 
 void __gcov_init(struct gcov_info* f);
 void skiboot_gcov_done(void);
-void __gcov_flush(void) __attrconst;
-void __gcov_merge_add(gcov_type *counters, unsigned int n_counters) __attrconst;
-void __gcov_merge_single(gcov_type *counters, unsigned int n_counters) __attrconst;
-void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters) __attrconst;
-void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters) __attrconst;
-void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters) __attrconst;
-void __gcov_exit(void) __attrconst;
+void __gcov_flush(void);
+void __gcov_merge_add(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_single(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters);
+void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters);
+void __gcov_exit(void);
 
 void __gcov_init(struct gcov_info* f)
 {