From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) by sourceware.org (Postfix) with ESMTPS id EB7FD3856DF3 for ; Tue, 2 Aug 2022 12:19:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB7FD3856DF3 Received: by mail-ua1-x929.google.com with SMTP id f10so5704874uap.2 for ; Tue, 02 Aug 2022 05:19:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ON6+uURbNLyde2H+MeODSeywNM4q7uUdmJzeq5PbI58=; b=sXobT0QiP6j3/U50gtAc04D09xYiRINlh+H7jz401liITYCkwgjGbAPwLcLlRewW1Z MKRRiXZuniUiJnMXacaqebtuBn5YG6s1N2Up3zRKRnTsIfEFoHdrNRG6jqyBnoKa38sd 0f0EzZRlelTbvVn+x9F2hE1hC0dUBGubhFqb6SokFf19v1PhR1wxyMOH46PUv/t2ZHy2 35IpWplrZB+enGlTLgwwOmgQyFI8k0NTu5Kl1MnzZpmphou60nAUOSfSmFNSIiN/DdfL NHv5TH/5FcML4deSJhone3I0b4tmrAmv4UkARIRRNzD63J/U/voYhbRJCpeYbxxX+ks3 OtTw== X-Gm-Message-State: ACgBeo1ac88LM/DjLHPsnqyrpf9a3919npDRjufmTIZmEK4LBIDKzmU5 PjPPYK8Ab04ExcTSpj9fUYUOT6vL/2dy4wKhqfcrbw== X-Google-Smtp-Source: AA6agR4DPXJwWjUSvjA7X/Sllye94tf/3DPH3AelDJpJaQm9ZbZrSF3eAzmL1IMMlKXQHN77Aj0fdZ795brarv26McA= X-Received: by 2002:ab0:6454:0:b0:384:e39b:8850 with SMTP id j20-20020ab06454000000b00384e39b8850mr7903294uap.89.1659442758864; Tue, 02 Aug 2022 05:19:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Gallager Date: Tue, 2 Aug 2022 08:19:07 -0400 Message-ID: Subject: Re: [PATCH] configure: respect --with-build-time-tools [PR43301] To: Alexandre Oliva Cc: Eric Gallager via Gcc-patches , Andreas Schwab , Paolo Bonzini , neroden@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 12:19:21 -0000 On Tue, Aug 2, 2022 at 1:24 AM Alexandre Oliva wrote: > > Hello, Eric, > > Thanks for looking into this. > > On Aug 1, 2022, Eric Gallager via Gcc-patches wrote: > > >> This just reassigns the value that was retrieved a couple of lines > >> above from the very same variable. > > > Oh, ok, so I guess this isn't necessary after all? > > Yeah, I don't see how this patch could make any difference as to the > reported problem. > > > In which case we can just close 43301 as INVALID then? > > AFAICT, with_build_time_tools is dealt with in the top level configure, > setting up *_FOR_TARGET after searching for the tool names in the > specified location. > > However, there's a potentially confusing consequence of the current > code: gcc/configure looks for ./as$build_exeext in the build tree, and > uses that without overwriting it if found, so if an earlier configure > run created an 'as' script, a reconfigure will just use it, without > creating the file again, even if it would have changed > ORIGINAL_AS_FOR_TARGET in it. > > I suppose if the patch was tested by the original submitter on a clean > build tree, so it would *appear* to have made a difference in fixing the > problem, while it was actually just a no-op, and the apparent fix was a > consequence of the clean build tree. > > So, the patch is not useful, but we may want to avoid the confusing > scenario somehow. > > I suppose the point of not creating such a tiny script again is not to > avoid unnecessary rebuilding of dependencies (I don't even see how > dependencies on the script would come into play), so creating it again > wouldn't hurt. However, we wish to avoid overwriting an assembler > copied into the build tree for use by gcc during the build. Perhaps: > > -elif test -x as$build_exeext; then > +elif test -x as$build_exeext \ > + && { test "x$build_exeext" != "x" \ > + || test "x`grep '^# Invoke as, ld or nm from the build tree' \ > + as`" = "x"; }; then > > WDYT? Hi, thanks for the feedback; I'm a bit confused, though: where exactly would this proposed change go? > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Disinformation flourishes because many people care deeply about injustice > but very few check the facts. Ask me about