From: Juan Quintela <quintela@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option
Date: Fri, 11 Sep 2009 18:17:27 +0200 [thread overview]
Message-ID: <m3y6ol4fs8.fsf@neno.mitica> (raw)
In-Reply-To: <200909111806.39520.thomas@monjalon.net> (Thomas Monjalon's message of "Fri, 11 Sep 2009 18:06:39 +0200")
Thomas Monjalon <thomas@monjalon.net> wrote:
> Juan Quintela wrote:
>> Thomas Monjalon <thomas@monjalon.net> wrote:
>> > Anthony Liguori wrote:
>> >> What I'd prefer is for someone to figure out the root cause of += not
>> >> working for us. If we can't, I'd like a big fat comment stating that
>> >> it's a known deficiency and we'll move on.
>> >
>> > "make" complains about an infinite recursive assignment because the first
>> > assignment of CFLAGS defines a recursively-expanded variable and the
>> > right value is a macro which uses the CFLAGS.
>> >
>> > As explained in
>> > http://www.gnu.org/software/make/manual/html_node/Appending.html , it can
>> > be fixed by making CFLAGS a simply-expanded variable at its first
>> > assignment.
>> >
>> > I have submitted a patch.
>>
>> Thanks for the explanation.
>> I haven't yet seen your patch, but I agree that right thing to do is
>> do the 1st assignment as QEMU_CFLAGS := foo
>>
>> We can't really use CFLAGS, because CFLAGS need to work from the command
>> line
>>
>> make CFLAGS="-O0 -g"
>>
>> or I am lossing something obvious?
>
> In order to use the variable from the command line, we should use the
> syntax "override" before each CFLAGS modification. This way, it is possible
> to append options after the user ones.
> If override is not used, "make" expand the variable by using the command line
> value in priority, which overwrites the Makefile value.
>
qemu only uses CFLAGS twice in the build system (everything interesting
goes in QEMU_CFLAGS)
(this in configure)
CFLAGS="-g $CFLAGS"
if test "$debug" = "no" ; then
CFLAGS="-O2 $CFLAGS"
fi
echo "CFLAGS=$CFLAGS" >> $config_host_mak
and
%.o: %.c
$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@")
(optionrom still uses them)
I think that no override is needed (we can use := for QEMU_CFLAGS)
> I could send another patch for that but it seems that my mails are filtered
> out by the mailing list.
Can you sent it to me then, I will repost
Later, Juan.
next prev parent reply other threads:[~2009-09-11 16:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200909092236.n89MaDVS020267@d01av01.pok.ibm.com>
[not found] ` <Pine.LNX.4.64.0909100409430.2139@linmac.oyster.ru>
[not found] ` <m3d45z63ry.fsf@neno.mitica>
[not found] ` <Pine.LNX.4.64.0909100434590.4541@linmac.oyster.ru>
2009-09-10 0:51 ` [Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option Anthony Liguori
[not found] ` <m3r5uf4odd.fsf@neno.mitica>
2009-09-10 1:51 ` Anthony Liguori
2009-09-11 15:44 ` Thomas Monjalon
2009-09-11 15:52 ` Juan Quintela
2009-09-11 16:06 ` Thomas Monjalon
2009-09-11 16:17 ` Juan Quintela [this message]
2009-09-11 16:35 Thomas Monjalon
-- strict thread matches above, loose matches on Subject: below --
2009-09-11 16:40 Thomas Monjalon
2009-09-11 16:53 Thomas Monjalon
2009-09-11 16:54 Thomas Monjalon
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=m3y6ol4fs8.fsf@neno.mitica \
--to=quintela@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=thomas@monjalon.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;
as well as URLs for NNTP newsgroup(s).