On Fri, Jun 07, 2019 at 11:10:59AM +0200, Martin Liška wrote:
> libgcc/ChangeLog:
> 
> 2019-06-04  Martin Liska  <mli...@suse.cz>
> 
>       * Makefile.in: Add __gcov_one_value_profiler_v2,
>       __gcov_one_value_profiler_v2_atomic and
>       __gcov_indirect_call_profiler_v4.
>       * libgcov-merge.c (__gcov_merge_single): Change
>       function signature.

> diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c
> index 702a69f8349..42416341b4d 100644
> --- a/libgcc/libgcov-merge.c
> +++ b/libgcc/libgcov-merge.c
> @@ -34,8 +34,9 @@ void __gcov_merge_add (gcov_type *counters  __attribute__ 
> ((unused)),
>  #endif
>  
>  #ifdef L_gcov_merge_single
> -void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)),
> -                          unsigned n_counters __attribute__ ((unused))) {}
> +void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)))
> +{
> +}
>  #endif
>  
>  #else

This change broke build without target libc.

../../../../libgcc/libgcov-merge.c:37:6: error: conflicting types for 
‘__gcov_merge_single’
   37 | void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)))
      |      ^~~~~~~~~~~~~~~~~~~
In file included from ../../../../libgcc/libgcov-merge.c:26:
../../../../libgcc/libgcov.h:263:13: note: previous declaration of 
‘__gcov_merge_single’ was here
  263 | extern void __gcov_merge_single (gcov_type *, unsigned) 
ATTRIBUTE_HIDDEN;
      |             ^~~~~~~~~~~~~~~~~~~

It is unclear why it has been changed, when the callers haven't been
adjusted, nor the prototype.

So, I'd like to revert this hunk.  Tested with x86_64-linux -> nvptx-none
cross build, ok for trunk?

2019-06-10  Jakub Jelinek  <ja...@redhat.com>

        * libgcov-merge.c (__gcov_merge_single): Revert previous change.

--- libgcc/libgcov-merge.c.jj   2019-06-10 19:39:29.291363550 +0200
+++ libgcc/libgcov-merge.c      2019-06-10 19:58:36.731524778 +0200
@@ -34,9 +34,8 @@ void __gcov_merge_add (gcov_type *counte
 #endif
 
 #ifdef L_gcov_merge_single
-void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)))
-{
-}
+void __gcov_merge_single (gcov_type *counters  __attribute__ ((unused)),
+                         unsigned n_counters __attribute__ ((unused))) {}
 #endif
 
 #else


        Jakub

Reply via email to