From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] CFLAGS_FOR_BUILD compiler flags
Date: Fri, 29 Oct 2010 21:06:14 +0200 [thread overview]
Message-ID: <877hh0ddjt.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <AANLkTim12PLkFLjAZw08vJTM5VjUWCDYPSHXM9u8cOWY@mail.gmail.com> (Will Newton's message of "Fri, 29 Oct 2010 14:18:27 +0100")
>>>>> "Will" == Will Newton <will.newton@gmail.com> writes:
Will> Hi all,
Will> It looks like something changed with the flags passed when building
Will> toolchains. In older buildroots it seems we passed "-g -O2"
Will> explicitly:
Will> $ grep CFLAGS_FOR_BUILD toolchain/gcc/gcc-uclibc-3.x.mk
Will> CFLAGS_FOR_BUILD="-g -O2 $(HOST_CFLAGS)" \
Will> CFLAGS_FOR_BUILD="-g -O2 $(HOST_CFLAGS)" \
Will> CFLAGS_FOR_BUILD="-g -O2 $(HOST_CFLAGS)" \
Will> Now we use TARGET_CONFIGURE_OPTS, which sets CFLAGS_FOR_BUILD for us:
Will> $ grep CFLAGS_FOR_BUILD package/Makefile.in
Will> CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
Will> FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \
Will> But without the -g -O2 being added. This results in the toolchain
Will> being built without optimisations, which makes it a bit slower than it
Will> otherwise would be (although I expect it makes building the toolchain
Will> faster!).
Will> CFLAGS_FOR_BUILD is currently defaulted in the top-level Makefile but
Will> then not used. Perhaps a patch like the below would be the right thing
Will> to do? Comments?
You're completely right. I prefer to get rid of CFLAGS_FOR_BUILD though
as it's only used by sstrip, so I've committed a slightly different patch.
--
Bye, Peter Korsgaard
prev parent reply other threads:[~2010-10-29 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 13:18 [Buildroot] CFLAGS_FOR_BUILD compiler flags Will Newton
2010-10-29 19:06 ` Peter Korsgaard [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=877hh0ddjt.fsf@macbook.be.48ers.dk \
--to=jacmet@uclibc.org \
--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