From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Crosstool-NG unnecessary rebuilds [BUG]
Date: Wed, 13 Mar 2013 08:37:25 +0100 [thread overview]
Message-ID: <20130313083725.4605312e@skate> (raw)
In-Reply-To: <EE5E77B503DE9A478B63A89AAD2585EDB66A60@vpane.excalyptech.com>
Dear Przemyslaw Wrzos,
On Wed, 13 Mar 2013 14:14:17 +1100, Przemyslaw Wrzos wrote:
> I'm finding that when using Crosstool-NG, the toolchain often seems to
> rebuild unnecessarily.
>
> The condition seems to trigger if any change is made to the main
> buildroot configuration file (even though the change is unrelated to the
> toolchain) and a new git commit is made (or uncommitted changes are
> introduced into the build tree). As far as I can tell this is caused by
> one of the CTNG_FIX_BUILDROOT_CONFIG_SED rules used to modify the
> crosstool-NG configuration (found in
> toolchain/toolchain-crosstool-ng/crosstool-ng.mk).
>
> The rule is:
> CTNG_FIX_BUILDROOT_CONFIG_SED +=
> s:^(CT_TOOLCHAIN_PKGVERSION)="(.*)":\1="buildroot $(BR2_VERSION_FULL)":;
>
> The problem is its dependence on BR2_VERSION_FULL which changes every
> time a git commit is made.
>
> I'm not sure what the best way to tackle this is. Perhaps allowing the
> user to specify a fixed TOOLCHAIN_PKGVERSION in the ctng-menuconfig, the
> above rule would then become something like:
> CTNG_FIX_BUILDROOT_CONFIG_SED +=
> s:^(CT_TOOLCHAIN_PKGVERSION)="(\s*)":\1="buildroot
> $(BR2_VERSION_FULL)":;
>
> Otherwise we could use BR2_VERSION instead. This would still trigger an
> unnecessary rebuild every time the buildroot version is bumped but that
> would happen a lot less often.
>
> Any suggestions on the best way to tackle this issue?
Isn't this caused by the following dependency
$(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(BUILDROOT_CONFIG)
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.
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-13 7:37 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 [this message]
2013-03-13 8:12 ` Przemyslaw Wrzos
2013-03-13 18:10 ` Yann E. MORIN
2013-03-14 7:48 ` Thomas Petazzoni
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=20130313083725.4605312e@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