public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Lewis Hyatt <lhyatt@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Makefile.tpl: Avoid race condition in generating site.exp from the top level
Date: Sat, 18 Nov 2023 16:20:51 -0700	[thread overview]
Message-ID: <e24131e2-2d90-4b63-b552-972e487b3d0e@gmail.com> (raw)
In-Reply-To: <20231117221923.2751146-1-lhyatt@gmail.com>



On 11/17/23 15:19, Lewis Hyatt wrote:
> Hello-
> 
> I often find it convenient to run a new c-c++-common test from the
> main build dir like:
> 
> $ make -j 2 RUNTESTFLAGS=dg.exp=new-test.c check-gcc-{c,c++}
> 
> I noticed that sometimes this produces a corrupted site.exp and then no
> tests work until it is remade manually. To avoid the issue, it is necessary
> to do "cd gcc; make site.exp" before running a parallel make from the top
> level directory. The below patch fixes it by just making that dependency on
> site.exp explicit in the top level Makefile. Is it OK please? Thanks...
> 
> -Lewis
> 
> -- >8 --
> 
> A command like "make -j 2 check-gcc-c check-gcc-c++" run in the top level of
> a fresh build directory does not work reliably. That will spawn two
> independent make processes inside the "gcc" directory, and each of those
> will attempt to create site.exp if it doesn't exist and will interfere with
> each other, producing often a corrupted or empty site.exp. Resolve that by
> making these targets depend on a new phony target which makes sure site.exp
> is created first before starting the recursive makes.
> 
> ChangeLog:
> 
> 	* Makefile.in: Regenerate.
> 	* Makefile.tpl: Add dependency on site.exp to check-gcc-* targets
OK
jeff

      reply	other threads:[~2023-11-18 23:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 22:19 Lewis Hyatt
2023-11-18 23:20 ` Jeff Law [this message]

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=e24131e2-2d90-4b63-b552-972e487b3d0e@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=lhyatt@gmail.com \
    /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).