[PATCH] Add startswith function and use it instead of CONST_STRNEQ.
Thu Mar 25 19:47:59 GMT 2021
On 3/25/21 8:54 AM, Alan Modra wrote:
> On Thu, Mar 25, 2021 at 07:53:04AM -0300, Luis Machado wrote:
>> On 3/22/21 7:56 PM, Alan Modra wrote:
>>> On Mon, Mar 22, 2021 at 01:13:00PM -0300, Luis Machado wrote:
>>>> Just FTR, I'm seeing breakage in sim/aarch64 and sim/arm. Both are
>>>> complaining about "-Werror=implicit-function-declaration" regarding strncmp
>>>> and strlen.
>>>> Is this the breakage you're talking about? Just so I know what to expect
>>>> when it gets fixed.
>> Thanks. Are there plans to address this or should I come up with a patch?
> I posted a patch here
> It's been tested with gdb, sim and binutils builds.
> Tom offered to solve the problem himself, so I'm waiting on that or
> for someone in the gdb camp to review my patch. Since I messed this
> up in the first place by taking a comment by Tom as a go-ahead rather
> than first posting a patch for proper review by gdb maintainers, I'm
> being a little cautious in committing the above patch.
I applied the above patch to today's master binutils-gdb and gave
configure's --enable-targets=all a try, but I ran into the following:
In file included from ../../../repos/binutils-gdb/bfd/archive.c:135:
./bfd.h:568:1: error: redefinition of ‘startswith’
568 | startswith (const char *str, const char *prefix)
In file included from ../../../repos/binutils-gdb/bfd/sysdep.h:122,
previous definition of ‘startswith’ was here
23 | startswith (const char *str, const char *prefix)
More information about the Binutils