qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH STABLE] build: Move QEMU_INCLUDES before QEMU_CF


From: Jiri Denemark
Subject: Re: [Qemu-devel] [PATCH STABLE] build: Move QEMU_INCLUDES before QEMU_CFLAGS
Date: Wed, 10 Aug 2011 16:02:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 10, 2011 at 16:04:15 +0300, Avi Kivity wrote:
> On 08/10/2011 01:04 PM, Jiri Denemark wrote:
> > This patch fixes build when any of the include paths from QEMU_CFLAGS
> > contains a header file with similar name to a header file in qemu
> > sources. I hit it with error.h included by qapi/qapi-types-core.h. GCC
> > decided to use /usr/include/alsa/error.h instead of qemu's error.h.
> >
> > Signed-off-by: Jiri Denemark<address@hidden>
> > ---
> >   rules.mak |    8 ++++----
> >   1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/rules.mak b/rules.mak
> > index 612ae37..1a2622c 100644
> > --- a/rules.mak
> > +++ b/rules.mak
> > @@ -15,21 +15,21 @@ MAKEFLAGS += -rR
> >   QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
> >
> >   %.o: %.c
> > -   $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) 
> > $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
> > +   $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) 
> > $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
> >
> >
> 
> Shouldn't we use -isystem instead of -I for system headers?

That would be ideal but unfortunately QEMU_CFLAGS also contains output of
pkg-config --cflags which uses -I for header paths. We would need to convert
them to -isystem. And is -isystem even portable to other compilers (in case we
care about that)?

IMHO just moving paths to qemu sources first is easier and the result is the
same.

Jirka



reply via email to

[Prev in Thread] Current Thread [Next in Thread]