* [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
@ 2012-03-30 15:24 Olaf Hering
2012-03-31 15:41 ` Andreas Färber
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-03-30 15:24 UTC (permalink / raw)
To: qemu-devel, xen-devel
configure will generate incorrect CFLAGS which will lead to compile
errors due to unknown gcc options, IFF CFLAGS was already in the
environment during configure invocation.
Add a space before the -march=i486 gcc option.
This patch is against the qemu-xen tree, but it should apply also to
qemu.git since it has the same issue. Please apply to both trees.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: qemu-xen-dir-remote/configure
===================================================================
--- qemu-xen-dir-remote.orig/configure
+++ qemu-xen-dir-remote/configure
@@ -2637,7 +2637,7 @@ int main(int argc, char **argv)
}
EOF
if ! compile_prog "" "" ; then
- CFLAGS+="-march=i486"
+ CFLAGS+=" -march=i486"
fi
fi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
2012-03-30 15:24 [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386 Olaf Hering
@ 2012-03-31 15:41 ` Andreas Färber
2012-03-31 16:46 ` Olaf Hering
2012-03-31 16:52 ` Peter Maydell
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Färber @ 2012-03-31 15:41 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel, Erik Blake, qemu-devel
Hi Olaf,
Am 30.03.2012 17:24, schrieb Olaf Hering:
>
> configure will generate incorrect CFLAGS which will lead to compile
> errors due to unknown gcc options, IFF CFLAGS was already in the
> environment during configure invocation.
>
> Add a space before the -march=i486 gcc option.
>
> This patch is against the qemu-xen tree, but it should apply also to
> qemu.git since it has the same issue. Please apply to both trees.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
The patch applies fine to upstream QEMU (we should strip leading qemu/
from the commit message though).
This is the only usage of += outside Makefile fragments, so I wonder if
its use may have been by accident. Is it safe in a POSIX context?
Or should we better use CFLAGS="$CFLAGS -march=486"?
For QEMU_CFLAGS we use the pattern QEMU_CFLAGS="-options $QEMU_CFLAGS"
to allow overriding options.
Andreas
>
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: qemu-xen-dir-remote/configure
> ===================================================================
> --- qemu-xen-dir-remote.orig/configure
> +++ qemu-xen-dir-remote/configure
> @@ -2637,7 +2637,7 @@ int main(int argc, char **argv)
> }
> EOF
> if ! compile_prog "" "" ; then
> - CFLAGS+="-march=i486"
> + CFLAGS+=" -march=i486"
> fi
> fi
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
2012-03-31 15:41 ` Andreas Färber
@ 2012-03-31 16:46 ` Olaf Hering
2012-04-02 7:54 ` Andreas Färber
2012-03-31 16:52 ` Peter Maydell
1 sibling, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2012-03-31 16:46 UTC (permalink / raw)
To: Andreas Färber; +Cc: xen-devel, Erik Blake, qemu-devel
On Sat, Mar 31, Andreas Färber wrote:
> This is the only usage of += outside Makefile fragments, so I wonder if
> its use may have been by accident. Is it safe in a POSIX context?
> Or should we better use CFLAGS="$CFLAGS -march=486"?
Now that I look at the shebang, configure is a sh script and += is most
likely a bash feature. So your suggestion for the assignment is correct.
Olaf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
2012-03-31 15:41 ` Andreas Färber
2012-03-31 16:46 ` Olaf Hering
@ 2012-03-31 16:52 ` Peter Maydell
2012-03-31 16:55 ` Olaf Hering
1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2012-03-31 16:52 UTC (permalink / raw)
To: Andreas Färber; +Cc: Olaf Hering, xen-devel, Erik Blake, qemu-devel
On 31 March 2012 16:41, Andreas Färber <afaerber@suse.de> wrote:
> This is the only usage of += outside Makefile fragments, so I wonder if
> its use may have been by accident. Is it safe in a POSIX context?
> Or should we better use CFLAGS="$CFLAGS -march=486"?
> For QEMU_CFLAGS we use the pattern QEMU_CFLAGS="-options $QEMU_CFLAGS"
> to allow overriding options.
For that matter, should this be setting QEMU_CFLAGS instead of
CFLAGS? I have to say I'm not entirely sure what the difference
is...
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
2012-03-31 16:52 ` Peter Maydell
@ 2012-03-31 16:55 ` Olaf Hering
0 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2012-03-31 16:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: xen-devel, Erik Blake, Andreas Färber, qemu-devel
On Sat, Mar 31, Peter Maydell wrote:
> On 31 March 2012 16:41, Andreas Färber <afaerber@suse.de> wrote:
> > This is the only usage of += outside Makefile fragments, so I wonder if
> > its use may have been by accident. Is it safe in a POSIX context?
> > Or should we better use CFLAGS="$CFLAGS -march=486"?
> > For QEMU_CFLAGS we use the pattern QEMU_CFLAGS="-options $QEMU_CFLAGS"
> > to allow overriding options.
>
> For that matter, should this be setting QEMU_CFLAGS instead of
> CFLAGS? I have to say I'm not entirely sure what the difference
> is...
I havent looked into qemu build internals, but there is most likely a
concept of HOST_TOOLS_CFLAGS and TARGET_CFLAGS in qemus Makefiles.
Olaf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386
2012-03-31 16:46 ` Olaf Hering
@ 2012-04-02 7:54 ` Andreas Färber
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2012-04-02 7:54 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel, Erik Blake, qemu-devel
Am 31.03.2012 18:46, schrieb Olaf Hering:
> On Sat, Mar 31, Andreas Färber wrote:
>
>> This is the only usage of += outside Makefile fragments, so I wonder if
>> its use may have been by accident. Is it safe in a POSIX context?
>> Or should we better use CFLAGS="$CFLAGS -march=486"?
>
> Now that I look at the shebang, configure is a sh script and += is most
> likely a bash feature. So your suggestion for the assignment is correct.
...apart from the missing i in i486, obviously. ;)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-02 7:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 15:24 [Qemu-devel] [PATCH] qemu/configure: fix CFLAGS handling for i386 Olaf Hering
2012-03-31 15:41 ` Andreas Färber
2012-03-31 16:46 ` Olaf Hering
2012-04-02 7:54 ` Andreas Färber
2012-03-31 16:52 ` Peter Maydell
2012-03-31 16:55 ` Olaf Hering
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).