qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Append extra cflags and ldflags
@ 2009-06-15 20:09 Jan Kiszka
  2009-06-16 15:18 ` [Qemu-devel] " Blue Swirl
  2009-06-16 17:11 ` [Qemu-devel] " Avi Kivity
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2009-06-15 20:09 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Blue Swirl, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

In order to allow overriding flags that are set by configure, we have to
append them instead of prepending as it is done so far.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 configure |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 85bc598..eb687bf 100755
--- a/configure
+++ b/configure
@@ -380,9 +380,9 @@ for opt do
   ;;
   --install=*) install="$optarg"
   ;;
-  --extra-cflags=*) CFLAGS="$optarg"
+  --extra-cflags=*) EXTRA_CFLAGS="$optarg"
   ;;
-  --extra-ldflags=*) LDFLAGS="$optarg"
+  --extra-ldflags=*) EXTRA_LDFLAGS="$optarg"
   ;;
   --cpu=*) cpu="$optarg"
   ;;
@@ -1432,8 +1432,8 @@ echo "OS_CFLAGS=$OS_CFLAGS" >> $config_mak
 echo "OS_LDFLAGS=$OS_LDFLAGS" >> $config_mak
 echo "ARCH_CFLAGS=$ARCH_CFLAGS" >> $config_mak
 echo "ARCH_LDFLAGS=$ARCH_LDFLAGS" >> $config_mak
-echo "CFLAGS=$CFLAGS" >> $config_mak
-echo "LDFLAGS=$LDFLAGS" >> $config_mak
+echo "CFLAGS=$CFLAGS $EXTRA_CFLAGS" >> $config_mak
+echo "LDFLAGS=$LDFLAGS $EXTRA_LDFLAGS" >> $config_mak
 echo "EXESUF=$EXESUF" >> $config_mak
 echo "PTHREADLIBS=$PTHREADLIBS" >> $config_mak
 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_mak


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: [PATCH] configure: Append extra cflags and ldflags
  2009-06-15 20:09 [Qemu-devel] [PATCH] configure: Append extra cflags and ldflags Jan Kiszka
@ 2009-06-16 15:18 ` Blue Swirl
  2009-06-16 15:25   ` Jan Kiszka
  2009-06-16 17:11 ` [Qemu-devel] " Avi Kivity
  1 sibling, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2009-06-16 15:18 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

On 6/15/09, Jan Kiszka <jan.kiszka@web.de> wrote:
> In order to allow overriding flags that are set by configure, we have to
>  append them instead of prepending as it is done so far.

The help message from configure does not mention about overriding but
adding flags. Which one is this?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] Re: [PATCH] configure: Append extra cflags and ldflags
  2009-06-16 15:18 ` [Qemu-devel] " Blue Swirl
@ 2009-06-16 15:25   ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2009-06-16 15:25 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

Blue Swirl wrote:
> On 6/15/09, Jan Kiszka <jan.kiszka@web.de> wrote:
>> In order to allow overriding flags that are set by configure, we have to
>>  append them instead of prepending as it is done so far.
> 
> The help message from configure does not mention about overriding but
> adding flags. Which one is this?

I didn't derive this from the help, but from common practice when using
EXTRA_* flags and the fact the gcc switches that come last override what
comes first. Without the patch, adding your personal -W* switches to the
build is impossible when they collide with some set by configure.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Append extra cflags and ldflags
  2009-06-15 20:09 [Qemu-devel] [PATCH] configure: Append extra cflags and ldflags Jan Kiszka
  2009-06-16 15:18 ` [Qemu-devel] " Blue Swirl
@ 2009-06-16 17:11 ` Avi Kivity
  1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-06-16 17:11 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Blue Swirl, qemu-devel

On 06/15/2009 11:09 PM, Jan Kiszka wrote:
> In order to allow overriding flags that are set by configure, we have to
> append them instead of prepending as it is done so far.
>    

Ah, this is useful for -O0 when debugging.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-16 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15 20:09 [Qemu-devel] [PATCH] configure: Append extra cflags and ldflags Jan Kiszka
2009-06-16 15:18 ` [Qemu-devel] " Blue Swirl
2009-06-16 15:25   ` Jan Kiszka
2009-06-16 17:11 ` [Qemu-devel] " Avi Kivity

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).