public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Olivier Hainque <hainque@adacore.com>
To: Alexandre Oliva <oliva@gnu.org>
Cc: Olivier Hainque <hainque@adacore.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Nicolas Roche <roche@adacore.com>
Subject: Re: fix libcc1 dependencies in toplevel Makefile
Date: Tue, 12 Jun 2018 08:57:00 -0000	[thread overview]
Message-ID: <1370CE5D-6541-4A6A-8912-B63767D2014C@adacore.com> (raw)
In-Reply-To: <ory3fku3a1.fsf@lxoliva.fsfla.org>

Hi Alex,

Thanks for your feedback and help looking into this.

> On 12 Jun 2018, at 04:50, Alexandre Oliva <oliva@gnu.org> wrote:
> 
> I was missing one possibility: that the problem occurred during the
> post-bootstrap all-host all-target build.  As far as I can tell from
> Nicolas' analysis, this was indeed the case.

Yes, indeed. I intended to convey this in the
opening message of this thread by referring to concurrency
between libcc1 and libquadmath. That was admittedly
too implicit :)


> I still don't see how any
> staging or unstaging might have taken place, but I can now see that we
> do reenter the gcc dir before building all-libcc1.  If that reentering
> rebuilds anything, particularly headers, that may be enough to explain
> the reported symptoms.

Right.

> Now, I do vaguely recall build output within the gcc subdir that
> possibly recreated the gcc/include subtree, which might explain the
> observed errors.

That's consistent at least, as the problem we had was the compilation
of a libquadmath source not finding limits.h.
 
> The good news is that the patch I posted the other day actually
> addresses this problem: the dep on stage_last is not enough to trigger a
> rebuild of gcc, so a post-bootstrap all-host all-target build will not
> reenter the bootstrapped dirs,

Nice :-)

> but that dep does trigger an initial
> build of gcc if one has not gone through bootstrapping yet.
> 
> So I see two possible ways to go from now:
> 
> 1. address the previously-mentioned fragility in the patch I posted, to
> catch all cases of postbootstrap targets and their deps on
> non-postbootstrap targets.
> 
> 2. revamp the bootstrap/non-bootstrap dependencies, using GNU make
> conditionals rather than configure-time enable/disable-bootstrap, so
> that we can have a different set of dependencies while running the
> bootstrap proper, having non-stage dependencies activated by default
> when any of the all-* targets are named in the command line, and also
> when building post-bootstrap all-host all-target.  This might seem to
> bring the problem back, but rather by having the full dependency set,
> we'd avoid the race not by refraining from reentering dirs, but rather
> by having them entered or reentered according to the full dependencies,
> without mixing stage and non-stage dependencies.  I'm not yet sure this
> is actually doable, but it seems to me that if it is, it would be more
> robust than what we have now.

I'm really not familiar enough with the dependencies organization
to provide informed input here.

Maybe a reasonable effort on 1 would be good enough in practice and
we can get to 2 only as a second step if we still observe failures.

Or start with a reasonable effort on 2 to evaluate feasibility and 
get a rough guesstimate of the effort it would take to get there, then
reassess.

For sure, I'm happy to try any patch in our development (!production)
builds and see where this leads.

Thanks again for your help on this!

With Kind Regards,

Olivier



  reply	other threads:[~2018-06-12  8:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 12:58 Olivier Hainque
2017-06-14 11:39 ` Nathan Sidwell
2017-06-14 21:11   ` Olivier Hainque
2017-06-15 12:03     ` Nathan Sidwell
2017-06-15 12:29       ` Olivier Hainque
2017-06-22 12:13 ` Alexandre Oliva
2017-06-26  7:41   ` Olivier Hainque
2017-06-27 16:32     ` Olivier Hainque
2017-06-27 19:53     ` Alexandre Oliva
2017-07-03 21:05       ` Olivier Hainque
2018-06-03 19:13       ` Alexandre Oliva
2018-06-12  2:50         ` Alexandre Oliva
2018-06-12  8:57           ` Olivier Hainque [this message]
2018-06-12 15:31           ` Jeff Law
2018-06-26  5:39           ` Alexandre Oliva
2018-06-27 19:53             ` Olivier Hainque

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=1370CE5D-6541-4A6A-8912-B63767D2014C@adacore.com \
    --to=hainque@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=oliva@gnu.org \
    --cc=roche@adacore.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).