[Skiboot] [PATCH 1/5] gcov: Fix building with GCC8

Stewart Smith stewart at linux.ibm.com
Wed Oct 10 16:19:46 AEDT 2018


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/Makefile.inc     |  1 +
 core/gcov-profiling.c | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

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)
 {
-- 
2.17.1



More information about the Skiboot mailing list