aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-10-10 16:19:46 +1100
committerStewart Smith <stewart@linux.ibm.com>2018-10-16 18:26:24 +1100
commit2d68e6fa582213db565e19ad241c2484423a893d (patch)
tree466b90a264bea64b98813a35c2147e4f470b7609
parenta43e9a66aae9812f8790c4a9290989bb0774d2a6 (diff)
downloadskiboot-2d68e6fa582213db565e19ad241c2484423a893d.zip
skiboot-2d68e6fa582213db565e19ad241c2484423a893d.tar.gz
skiboot-2d68e6fa582213db565e19ad241c2484423a893d.tar.bz2
gcov: Fix building with GCC8
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--core/Makefile.inc1
-rw-r--r--core/gcov-profiling.c14
2 files changed, 8 insertions, 7 deletions
diff --git a/core/Makefile.inc b/core/Makefile.inc
index d363505..3bdfd09 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 = -Wsuggest-attribute=const
endif
CORE=core/built-in.a
diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c
index 136f563..3ff7e6e 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)
{