https://sourceware.org/bugzilla/show_bug.cgi?id=34125

            Bug ID: 34125
           Summary: Binutils 2.46 won't build under glibc 2.43
           Product: binutils
           Version: 2.46
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

<features.h> from glibc 2.43 has

/* If _GNU_SOURCE was defined by the user, turn on all the other features.  */
#ifdef _GNU_SOURCE
# undef  _ISOC95_SOURCE
# define _ISOC95_SOURCE 1
# undef  _ISOC99_SOURCE
# define _ISOC99_SOURCE 1
# undef  _ISOC11_SOURCE
# define _ISOC11_SOURCE 1
# undef  _ISOC23_SOURCE
# define _ISOC23_SOURCE 1

which triggers

/export/gnu/import/git/gitlab/x86-binutils-release/gprof/source.c: In function
‘annotate_source’:
/export/gnu/import/git/gitlab/x86-binutils-release/gprof/source.c:126:21:
error: assignment discards ‘const’ qualifier from pointer target type
[-Werror=discarded-qualifiers]
  126 |           name_only = strrchr (sf->name, '/');
      |                     ^
cc1: all warnings being treated as errors

since <string.h> has

# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC
#  define strrchr(S, C)                                         \
  __glibc_const_generic (S, const char *, strrchr (S, C))
# endif
#endif

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to