From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr9My-0005f4-93 for qemu-devel@nongnu.org; Wed, 10 Aug 2011 10:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr9Mu-0007i1-UP for qemu-devel@nongnu.org; Wed, 10 Aug 2011 10:02:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr9Mu-0007hp-Hb for qemu-devel@nongnu.org; Wed, 10 Aug 2011 10:02:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7AE2lLS027849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Aug 2011 10:02:47 -0400 Date: Wed, 10 Aug 2011 16:02:45 +0200 From: Jiri Denemark Message-ID: <20110810140245.GB216233@orkuz.home> References: <7d7114c0f2ebea6cf24689d9e58e6494d1b8a463.1312970654.git.jdenemar@redhat.com> <4E4281CF.2030700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E4281CF.2030700@redhat.com> Subject: Re: [Qemu-devel] [PATCH STABLE] build: Move QEMU_INCLUDES before QEMU_CFLAGS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org 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 > > --- > > 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