Remove CFLAGS parameter in cc-option
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · malc
Quoted 14 lines · Juan Quintela
Quoted 10 lines · malc
Quoted 4 lines · Anthony Liguori
From: Juan Quintela <[email protected]>
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
This is nonsense, previous options, those in CFLAGS, might conflict with the new ones.
The only thing that we are testing is if gcc support that _option_
Quoted 8 lines
Quoted 3 lines
What is the use case tat you have in mind? A first grep on gcc man page don't show options that conflict with each other.
If you want artificial exmaples i can come up with plenty, and from the top of my head -m486 with -msse2 are quite incompatible with each other, furthermore, point is this - testing one option in isolation is broken.
I think this is a pretty valid point. I think it's worth while to try and better understand what the recursion problem was in the first place.
Signature · 3 lines
Regards, Anthony Liguori
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · Juan Quintela
Quoted 15 lines · malc
Quoted 12 lines · Juan Quintela
Quoted 10 lines · malc
Quoted 4 lines · Anthony Liguori
From: Juan Quintela <[email protected]>
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
This is nonsense, previous options, those in CFLAGS, might conflict with the new ones.
Quoted 9 lines
Quoted 5 lines
The only thing that we are testing is if gcc support that _option_
What is the use case tat you have in mind? A first grep on gcc man page don't show options that conflict with each other.
If you want artificial exmaples i can come up with plenty, and from the top of my head -m486 with -msse2 are quite incompatible with each other, furthermore, point is this - testing one option in isolation is broken.
Quoted 6 lines
Ok. For the case that we were using, it don't matter at all. But in general, there "could" (it is only one cc-option call in all sources).
Anthony, what do you preffer:
- revert the patch and add another one that changes += by :=
No, I don't want to revert this patch and switch to :=. += should work. I don't understand why it doesn't.
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.
Signature · 3 lines
Regards, Anthony Liguori
Quoted 29 lines · Anthony Liguori
Quoted 22 lines · Juan Quintela
Quoted 12 lines · malc
Quoted 11 lines · Juan Quintela
Quoted 9 lines · malc
Quoted 5 lines · Anthony Liguori
From: Juan Quintela <[email protected]>
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
This is nonsense, previous options, those in CFLAGS, might conflict with the new ones.
Quoted 8 lines
Quoted 4 lines
The only thing that we are testing is if gcc support that _option_
What is the use case tat you have in mind? A first grep on gcc man page don't show options that conflict with each other.
If you want artificial exmaples i can come up with plenty, and from the top of my head -m486 with -msse2 are quite incompatible with each other, furthermore, point is this - testing one option in isolation is broken.
Quoted 5 lines
Ok. For the case that we were using, it don't matter at all. But in general, there "could" (it is only one cc-option call in all sources).
Anthony, what do you preffer:
- revert the patch and add another one that changes += by :=
Quoted 6 lines
No, I don't want to revert this patch and switch to :=. += should work. I don't understand why it doesn't.
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.
Signature · 1 line
Thomas
Quoted 41 lines · Thomas Monjalon
Quoted 29 lines · Anthony Liguori
Quoted 22 lines · Juan Quintela
Quoted 12 lines · malc
Quoted 11 lines · Juan Quintela
Quoted 9 lines · malc
Quoted 5 lines · Anthony Liguori
From: Juan Quintela <[email protected]>
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
This is nonsense, previous options, those in CFLAGS, might conflict with the new ones.
Quoted 8 lines
Quoted 4 lines
The only thing that we are testing is if gcc support that _option_
What is the use case tat you have in mind? A first grep on gcc man page don't show options that conflict with each other.
If you want artificial exmaples i can come up with plenty, and from the top of my head -m486 with -msse2 are quite incompatible with each other, furthermore, point is this - testing one option in isolation is broken.
Quoted 5 lines
Ok. For the case that we were using, it don't matter at all. But in general, there "could" (it is only one cc-option call in all sources).
Anthony, what do you preffer:
- revert the patch and add another one that changes += by :=Quoted 6 lines
No, I don't want to revert this patch and switch to :=. += should work. I don't understand why it doesn't.
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.
Quoted 5 lines
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?
Later, Juan.
Quoted 21 lines · Juan Quintela
Quoted 9 lines · Thomas Monjalon
Quoted 3 lines · Anthony Liguori
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.
Quoted 6 lines
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 asQEMU_CFLAGS:= foo
Quoted 6 lines
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.
I could send another patch for that but it seems that my mails are filtered out by the mailing list.
Signature · 1 line
Thomas
Quoted 27 lines · Thomas Monjalon
Quoted 26 lines · Juan Quintela
Quoted 9 lines · Thomas Monjalon
Quoted 3 lines · Anthony Liguori
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.
Quoted 6 lines
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 asQEMU_CFLAGS:= fooWe can't really use CFLAGS, because CFLAGS need to work from the command line
make CFLAGS="-O0 -g"
Quoted 8 lines
Quoted 1 line
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 theMakefilevalue.
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)
Quoted 2 lines
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.