[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option |
Date: |
Fri, 11 Sep 2009 18:17:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Thomas Monjalon <address@hidden> wrote:
> Juan Quintela wrote:
>> Thomas Monjalon <address@hidden> 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.
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option, Thomas Monjalon, 2009/09/11
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option, Thomas Monjalon, 2009/09/11
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option, Thomas Monjalon, 2009/09/11
[Qemu-devel] Re: [COMMIT 8a2e6ab] Remove CFLAGS parameter in cc-option, Thomas Monjalon, 2009/09/12