From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by sourceware.org (Postfix) with ESMTPS id C82573858024 for ; Fri, 26 Mar 2021 11:45:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C82573858024 Received: by mail-qt1-x82b.google.com with SMTP id s2so3945011qtx.10 for ; Fri, 26 Mar 2021 04:45:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=U4+2CfbacrgjfrMgLXQc/uxJG55OD9iVhtuy/f+IBFg=; b=cBPCJLQqrsNbYaEg0KJuvrv+OQM7kf3TT2l4wkIn5zMhibH5a83a+5PFtPm/LMyDB1 NOO1zo8LlgPnTnnQwZl17QcMXgfnO38QzH5nnOgN5yTvVvTBcQw1eF5QtHTNqmhDbYKZ Hj5E3nXEBaxFH7o/8AYRadtykcUXPmyx2FRXXEm6Os9l8LUV5G/7WrBZKZ4T+J0jifaD lfj553jOJqpbK81l1UQCNRHtW4zpgMR8aCFV56KlsjTH8h1ee12GyLpLu4cFh/O/3HVw WDgUhbtrj3pue/fbpLV4v0LPcnRki2vt+JcMGxLMWHuh8eI+RytUODu/AkBJ3pzROtv4 OErQ== X-Gm-Message-State: AOAM531xA+G+pkc6QJOA9LKGQhGfmFNwE/VGrXP7MPHFjJu2xkaNiGfY ++n1zw1R8naktTx4VzX3iehrdA== X-Google-Smtp-Source: ABdhPJy0uMhVho7JVqhb+l+s5+/HeV7cVEBp315dVAl7WkdtwH6dRndPjC3sjZWASjhsLGwo2sUB/Q== X-Received: by 2002:ac8:4989:: with SMTP id f9mr11768344qtq.40.1616759101360; Fri, 26 Mar 2021 04:45:01 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:9c7b:60f4:124f:3c69? ([2804:7f0:4841:2841:9c7b:60f4:124f:3c69]) by smtp.gmail.com with ESMTPSA id z11sm6508438qkg.52.2021.03.26.04.44.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Mar 2021 04:45:00 -0700 (PDT) Subject: Re: [PATCH] Add startswith function and use it instead of CONST_STRNEQ. To: Alan Modra , Tom Tromey , Alan Modra via Binutils , gdb-patches@sourceware.org References: <20210320070037.GR6791@bubble.grove.modra.org> <87wnu1k5z1.fsf@tromey.com> <20210321131254.GS6791@bubble.grove.modra.org> <87k0q0j5ql.fsf@tromey.com> <20210322120652.GV6791@bubble.grove.modra.org> <20210322225639.GY6791@bubble.grove.modra.org> <0520bcb8-1945-5f0f-87d1-14785b881c45@linaro.org> <20210325115413.GB5425@bubble.grove.modra.org> <1e7e6f28-c916-f138-63c5-ca27f191f994@linaro.org> From: Luis Machado Message-ID: Date: Fri, 26 Mar 2021 08:44:57 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2021 11:45:03 -0000 On 3/25/21 7:31 PM, Mike Frysinger wrote: > On 25 Mar 2021 16:47, Luis Machado wrote: >> 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. >>>>> >>>>> Yes. >>>>> >>>> >>>> Thanks. Are there plans to address this or should I come up with a patch? >>> >>> I posted a patch here >>> https://sourceware.org/pipermail/binutils/2021-March/115863.html >>> 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, >> from ../../../repos/binutils-gdb/bfd/archive.c:134: >> ../../../repos/binutils-gdb/bfd/../include/str-util.h:23:1: note: >> previous definition of ‘startswith’ was here >> 23 | startswith (const char *str, const char *prefix) >> | ^~~~~~~~~~ > > Alan's patch didn't include the regenerated bfd.h inputs, so you'll > have to do that on your side. > -mike > Oops. Regenerated now. I gave it a try again and it worked OK.