From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] open2300: fix build failure
Date: Thu, 6 Feb 2014 10:05:23 +0100 [thread overview]
Message-ID: <20140206100523.34e8247b@skate> (raw)
In-Reply-To: <1391634562-1680-1-git-send-email-s.martin49@gmail.com>
Dear Samuel Martin,
On Wed, 5 Feb 2014 22:09:22 +0100, Samuel Martin wrote:
> +- allow to extend CFLAGS and CC_LDFLAGS
[...]
> +-CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\"
> +-CC_LDFLAGS = -lm
> +-CC_WINFLAG =
> ++CFLAGS += -Wall -O3 -DVERSION=\"$(VERSION)\"
> ++CC_LDFLAGS += -lm
> ++CC_WINFLAG =
This doesn't allow to extend CFLAGS if the CFLAGS is passed on the
right hand side of the "make" call.
I.e, with your patch, if you do:
make CFLAGS=-something
Then the CFLAGS will only contain "-something", not "-something -Wall
-O3 -DVERSION...". However, with your patch, it works if you do:
CFLAGS=-something make
In Buildroot, we indeed often do $(TARGET_CONFIGURE_OPTS) $(MAKE),
which means CFLAGS is passed on the left side of make. But this
specific package does not do this:
$(MAKE) CC=... LD=... -C $(@D)
So it doesn't pass CFLAGS, so there is no problem for now, but if it
started to pass CFLAGS on the right side of make, then your patch
wouldn't work.
Instead, if you want it to work in all cases, it should be:
override CFLAGS += -Wall -O3 ...
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-02-06 9:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 21:09 [Buildroot] [PATCH] open2300: fix build failure Samuel Martin
2014-02-06 9:05 ` Thomas Petazzoni [this message]
2014-02-06 20:40 ` Samuel Martin
-- strict thread matches above, loose matches on Subject: below --
2014-02-06 20:49 Samuel Martin
2014-02-06 22:13 ` Peter Korsgaard
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=20140206100523.34e8247b@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