From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Crosstool-NG unnecessary rebuilds [BUG]
Date: Thu, 14 Mar 2013 08:48:16 +0100 [thread overview]
Message-ID: <20130314084816.00d23bd7@skate> (raw)
In-Reply-To: <201303131910.06613.yann.morin.1998@free.fr>
Dear Yann E. MORIN,
On Wed, 13 Mar 2013 19:10:06 +0100, Yann E. MORIN wrote:
> > Isn't this caused by the following dependency
> > $(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(BUILDROOT_CONFIG)
>
> Yes, and this dependency is here on purpose: we can't configure the
> crosstool-NG backend until we first have the Buildroot config.
Hum there are many other places in Buildroot that can't be done until
we have the Buildroot config and still we don't have this Buildroot
configuration dependency. I think this dependency is useless because of
the big:
ifeq ($(BR2_HAVE_DOT_CONFIG),y)
[... do all the normal build stuff... ]
endif
that we have in the main Makefile.
> > I don't think we should depend on the Buildroot configuration here. It
> > tries to be too smart by triggering the rebuild of the toolchain
> > whenever the Buildroot configuration has changed, but this isn't
> > normally done in Buildroot, so I'd say this dependency on
> > $(BUILDROOT_CONFIG) shouldn't be there. Cc'ing Yann on this one.
>
> Well, the .config file should not change if the toolchain options in
> Buildroot have not changed.
Which .config, crosstool-ng one, or Buildroot one?
> That's the purpose of the .timestamp trick: if the .config did change,
> then we leave the new .config, and that will kick in the rebuild of the
> toolchain. OTOH, if the .config did not change, then we restore the
> previous .config, and as the date of the .config has not changed, the
> dependency is fulfilled, and the toolchain would not be re-built.
>
> This *is* needed to catch tolchain changes. Admitedly, the internal backend
> does not do that, but I think it is better to do it rather than not.
I'm not sure to agree here. The Buildroot policy is: we don't even try
to rebuild whatever would be needed when there are configuration
changes. For example, when there is a change of toolchain
configuration, you will with your code maybe rebuild the toolchain, but
not the entire userspace.
So either we do it completely, and correctly, or we don't do it. And as
far I as remember, the Buildroot project position on this has always
been: it is too complex to achieve entirely correctly, so we just don't
do it.
> Maybe we can switch to using the short Buildroot version string, which
> does not include the git cset in it. I'll propose a patch to this effect
> shortly.
I think the real fix is to just comply with the Buildroot principle of
not trying to magically adapt to configuration changes.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2013-03-14 7:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 3:14 [Buildroot] Crosstool-NG unnecessary rebuilds [BUG] Przemyslaw Wrzos
2013-03-13 7:37 ` Thomas Petazzoni
2013-03-13 8:12 ` Przemyslaw Wrzos
2013-03-13 18:10 ` Yann E. MORIN
2013-03-14 7:48 ` Thomas Petazzoni [this message]
2013-03-14 18:21 ` Yann E. MORIN
2013-03-15 0:18 ` Przemyslaw Wrzos
2013-03-15 8:25 ` Thomas Petazzoni
2013-03-18 2:38 ` Przemyslaw Wrzos
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=20130314084816.00d23bd7@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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