Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N9dd5-0000bb-Pd for mharc-grub-devel@gnu.org; Sun, 15 Nov 2009 06:50:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9dd1-0000YF-IA for grub-devel@gnu.org; Sun, 15 Nov 2009 06:50:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9dcw-0000T3-9R for grub-devel@gnu.org; Sun, 15 Nov 2009 06:50:46 -0500 Received: from [199.232.76.173] (port=51387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9dcw-0000So-3S for grub-devel@gnu.org; Sun, 15 Nov 2009 06:50:42 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:65051) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9dcv-0000sQ-BO for grub-devel@gnu.org; Sun, 15 Nov 2009 06:50:41 -0500 Received: from [85.180.43.63] (e180043063.adsl.alicedsl.de [85.180.43.63]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MflMO-1MmUbM1LT2-00NG9B; Sun, 15 Nov 2009 12:50:40 +0100 From: Felix Zielcke To: The development of GNU GRUB In-Reply-To: <20091115113530.GA26217@thorin> References: <20091026161638.GA9371@thorin> <20091028231622.GA19287@thorin> <20091029101433.GA8145@thorin> <20091029103618.GA10006@thorin> <1257331694.5000.34.camel@fz.local> <1258233405.2749.8.camel@fz.local> <20091115110458.GA25752@thorin> <1258283870.2822.8.camel@fz.local> <20091115113530.GA26217@thorin> Content-Type: text/plain; charset="UTF-8" Date: Sun, 15 Nov 2009 12:50:39 +0100 Message-ID: <1258285839.2822.12.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19ypKp+ARv+TYyasjFrsBWWCOJzP6y43vAZCb/ 2Xk9Pn8frOT73oNaS9XUm48RPnnW94kfSkqd7NlKID0Hgqq5iM t4YJpCj1foKWhT+/F2U5A== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Add -nostdinc to TARGET_CFLAGS X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2009 11:50:48 -0000 Am Sonntag, den 15.11.2009, 12:35 +0100 schrieb Robert Millan: > On Sun, Nov 15, 2009 at 12:17:50PM +0100, Felix Zielcke wrote: > > > > The advantage is that this does exatly what we want for the target. > > Remove /usr/include from the include search directories but still keep > > the gcc internal one for e.g. stdarg.h > > As far as I understand the gcc manual, isystem adds this directory to > > the search path and treats all headers there in as system headers. > > And with the = between -isystem and $(srcdir) it actually uses > > ${sysroot}{$srcdir} but we don't use any --sysroot or -isysroot. > > The arguments we currently have there just look wrong with my understand > > of the gcc manual > > Ah, I see.. > > > $ cat test.c > > #include > > #include > > > > int main (void) > > { > > return 0; > > } > > > > $ srcdir=$PWD builddir=$PWD gcc -isystem=$srcdir/include -I$srcdir/include -I$builddir -I$builddir/include test.c -o test && ls test > > test > > $ srcdir=$PWD builddir=$PWD gcc -nostdinc -isystem $(gcc -print-file-name=include) -I$srcdir/include -I$builddir -I$builddir/include test.c > > test.c:2:20: error: stdint.h: No such file or directory > > We used -isystem as a way of excluding system headers but not gcc headers. > With the -print-file-name trick this seems to be no longer necessary, right? > > So why not "-nostdinc -I$(gcc -print-file-name=include)" instead? I think we should use -isystem for the gcc internal header files not -I, but I just tested experimental branch with -I instead of -isystem and also compiles cleanly (except the usual grub.texi warnings) As said on IRC already: http://gcc.gnu.org/onlinedocs/cpp/System-Headers.html -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer