From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aOO8N2YSY2B1ZwAAWB0awg (envelope-from ) for ; Tue, 30 Mar 2021 07:58:30 -0400 Received: by simark.ca (Postfix, from userid 112) id D57371EE0E; Tue, 30 Mar 2021 07:58:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DC19E1E783 for ; Tue, 30 Mar 2021 07:58:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDF263850419; Tue, 30 Mar 2021 11:58:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDF263850419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617105508; bh=iwN/8qv+XqWmWVEgTWsYuu799v8scBlWsWBxUwwh5Aw=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UfN+m/FQ3rJCo1J+sA/ct5ONL5iu/6srF77whPUnztyHorxctbNou/m/NLfWcM2FY qlFDBdOYK13cSmep6gKYvZANghSEsV9nWzT5fF5CW6ffCxUfC8s68jZJCpds7K3BFI wAF9U4Br/b0xvZgkLHpKi31QSldybsZUUyjSHKkk= Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by sourceware.org (Postfix) with ESMTPS id 2232F3857C61 for ; Tue, 30 Mar 2021 11:58:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2232F3857C61 Received: by mail-qt1-x835.google.com with SMTP id y2so11614150qtw.13 for ; Tue, 30 Mar 2021 04:58:25 -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:from:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iwN/8qv+XqWmWVEgTWsYuu799v8scBlWsWBxUwwh5Aw=; b=WpL0DFwnjYSYx4/V+jd0mB7NIbORwMY5qiPaUdr9jNbnObvCld8Vy587cCRBILpKHd 2M+FIEYJWUFbb5vchs65LqoUVgKv+yITyKQFW9YUPg6N6hFpiQTkdoXF7A7Vskvm+wTt SKzKAqcm6Df0a3kHKvKge7KW/88zfCdW5ha+HrUrVyDDuhAh7Z3Dc8foC6R1muy/d5WZ Y4/X0tliclboKLHBklhCbdRQwhXkTfz8wULNy54VSQ2CslRslpXtGQKXgYDHcdZsn17E xDQouG8p+jaGn8XG61pWxQEbFFpNA8WnCvU6rBE29YDQj7ZGObMdZbQmnTJaQ/GbcMIn hGOQ== X-Gm-Message-State: AOAM531f47lM0gS844GqQP8/0WnqkUpwsVHfVTU6W1ZGc513PukC2oiQ 5J73xhJKMKXOrGK3vDd+7y1SVw== X-Google-Smtp-Source: ABdhPJzjIH49c7R/JyTnkqZoLN3oFxs/GBkdYjI8mgPU2UAPfGLIfUdZf/e7GO+ZZM3kFs/TjDuQZw== X-Received: by 2002:ac8:424e:: with SMTP id r14mr27138934qtm.140.1617105504515; Tue, 30 Mar 2021 04:58:24 -0700 (PDT) Received: from ?IPv6:2804:7f0:4841:2841:8d23:3cfd:f5e6:2e2b? ([2804:7f0:4841:2841:8d23:3cfd:f5e6:2e2b]) by smtp.gmail.com with ESMTPSA id g21sm15282616qkk.72.2021.03.30.04.58.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Mar 2021 04:58:24 -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> Message-ID: Date: Tue, 30 Mar 2021 08:58:21 -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-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi Alan, Tom, On 3/26/21 8:44 AM, Luis Machado wrote: > 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. Given this has been broken for a little while, and given Alan's patch fixes the problem for arm/aarch64 sims (from what I tested), can we push this for now and get it addressed in some other way later, if someone wants it? I think someone's hit this on riscv as well.