public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@gnu.org>
To: Eric Gallager via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Andreas Schwab <schwab@suse.de>,
	Eric Gallager <egall@gwmail.gwu.edu>,
	Paolo Bonzini <bonzini@gnu.org>,
	neroden@gcc.gnu.org
Subject: Re: [PATCH] configure: respect --with-build-time-tools [PR43301]
Date: Tue, 02 Aug 2022 02:24:39 -0300	[thread overview]
Message-ID: <or4jyvjjzc.fsf@lxoliva.fsfla.org> (raw)
In-Reply-To: <CAMfHzOvcZ3ciqcqZgd0VQQCL11UTxGvUYfma+MLLR0rC0AYR+Q@mail.gmail.com> (Eric Gallager via Gcc-patches's message of "Mon, 1 Aug 2022 11:40:35 -0400")

Hello, Eric,

Thanks for looking into this.

On Aug  1, 2022, Eric Gallager via Gcc-patches <gcc-patches@gcc.gnu.org> 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?

-- 
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 <https://stallmansupport.org>

  reply	other threads:[~2022-08-02  5:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-31 20:55 Eric Gallager
2022-08-01  7:54 ` Andreas Schwab
2022-08-01 15:40   ` Eric Gallager
2022-08-02  5:24     ` Alexandre Oliva [this message]
2022-08-02 12:19       ` Eric Gallager
2022-08-03  3:33         ` Alexandre Oliva
2022-08-03 11:51           ` Eric Gallager
2022-08-05  3:18             ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=or4jyvjjzc.fsf@lxoliva.fsfla.org \
    --to=oliva@gnu.org \
    --cc=bonzini@gnu.org \
    --cc=egall@gwmail.gwu.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=neroden@gcc.gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).