From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] ccache problem when compiling with different toolchains in different projects
Date: Sat, 20 Apr 2013 01:41:49 +0200 [thread overview]
Message-ID: <5171D63D.7050705@mind.be> (raw)
In-Reply-To: <CANxTyt7N+cKyvksZLSgUADMmgmhdfLBqYd=oRSxCVpKaWYEH1w@mail.gmail.com>
On 20/04/13 01:00, Danomi Manchego wrote:
[snip]
> Regarding the settings hidden by the ext-toolchan wrapper and the built
> toolchain configuration options - what if we took a hash of the
> ext-toolchain wrapper or built compiler itself, and the -v info, and used
> that directly in the ccache check. We could do a one-time hash when the
> toolchain is set up:
>
> $(TARGET_CC_NOCCACHE) -v > $(STAMP_DIR)/toolchain-config-info
> md5sum -b $(TARGET_CC_NOCCACHE) >> $(STAMP_DIR)/toolchain-config-info
> md5sum $(STAMP_DIR)/toolchain-config-info >
> $(STAMP_DIR)/toolchain-config-info.md5sum
Not bad! I'd still sed the absolute path out of the 'gcc -v' output,
though. Then at least with external toolchains you can share the ccache
between different developers (and an external toolchain is anyway the way
to go if you want to speed up build time).
> and then set the CCACHE_COMPILERCHECK to "echo
> $(STAMP_DIR)/toolchain-config-info.md5sum".
The name of the compiler should also be included. gcc compiles 'void
main () {}' differently than g++.
BTW it could be optimized a little more by putting the hash in a make
variable and echo'ing that directly.
> Then, the effects of all the
> hidden variables are in some way accounted for without grepping for them
> in the .config.
Not entirely. Many toolchain options affect the C library, not the
compiler. A change in these options may not affect the gcc binary itself.
Even a gcc configuration option may not change the gcc binary, because
most of gcc is in cc1 and libgcc.a. But it's still an improvement over
previous proposals.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2013-04-19 23:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 1:50 [Buildroot] ccache problem when compiling with different toolchains in different projects Danomi Manchego
2013-04-19 11:41 ` Mathias De Maré
2013-04-19 20:54 ` Arnout Vandecappelle
2013-04-19 23:00 ` Danomi Manchego
2013-04-19 23:05 ` Danomi Manchego
2013-04-19 23:41 ` Arnout Vandecappelle [this message]
2013-04-20 16:08 ` Danomi Manchego
2013-04-21 21:05 ` Mathias De Maré
2013-04-22 5:59 ` Arnout Vandecappelle
2013-04-22 12:32 ` Danomi Manchego
2013-04-22 21:26 ` Arnout Vandecappelle
2013-10-24 10:31 ` Thomas De Schampheleire
2013-10-24 14:55 ` Danomi Manchego
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=5171D63D.7050705@mind.be \
--to=arnout@mind.be \
--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