From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N9PzN-0008QJ-EA for mharc-grub-devel@gnu.org; Sat, 14 Nov 2009 16:16:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9PzK-0008O6-T7 for grub-devel@gnu.org; Sat, 14 Nov 2009 16:16:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9PzF-0008Nd-EZ for grub-devel@gnu.org; Sat, 14 Nov 2009 16:16:53 -0500 Received: from [199.232.76.173] (port=44679 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9PzF-0008Na-8r for grub-devel@gnu.org; Sat, 14 Nov 2009 16:16:49 -0500 Received: from moutng.kundenserver.de ([212.227.126.188]:57194) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9PzE-0006oR-0k for grub-devel@gnu.org; Sat, 14 Nov 2009 16:16:48 -0500 Received: from [85.180.1.205] (e180001205.adsl.alicedsl.de [85.180.1.205]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0M8MHm-1MDrLg3yra-00w2gg; Sat, 14 Nov 2009 22:16:47 +0100 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1257331694.5000.34.camel@fz.local> References: <20091026161638.GA9371@thorin> <20091028231622.GA19287@thorin> <20091029101433.GA8145@thorin> <20091029103618.GA10006@thorin> <1257331694.5000.34.camel@fz.local> Content-Type: text/plain; charset="UTF-8" Date: Sat, 14 Nov 2009 22:16:45 +0100 Message-ID: <1258233405.2749.8.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX187bVsmL/FPROhnQp7W7OKiCI2W8Wjnt6pcQIG UY6j9xVljCK5t9+a3ieN2srMJhwkMAHyWxB89+ONiwCQbDUFK4 PLCC/6ecwPK3eVJmUNCow== 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: Sat, 14 Nov 2009 21:16:55 -0000 Am Mittwoch, den 04.11.2009, 11:48 +0100 schrieb Felix Zielcke: > Am Donnerstag, den 29.10.2009, 11:36 +0100 schrieb Robert Millan: > > On Thu, Oct 29, 2009 at 11:14:33AM +0100, Robert Millan wrote: > > > > > > It appears that -nostdinc also excludes GCC internal header directory (for > > > e.g. stdarg.h), which I didn't expect. > > > > > > Does someone know a clean way to resolve this? A quick check at GCC > > > command-line options didn't reveal a way to explicitly include that > > > directory afterwards without knowing its path. > > > > > > I.e. something similar to `gcc -print-file-name=libgcc.a` > > > > Maybe with -isysroot=`pwd`/dummy instead of -nostdinc. > > > > It's an ugly kludge, but the alternatives look even worse. > > > > Does someone have a better idea? > > > > Thanks to the hint from rubisher I looked now at Linux Makefiles. > They use this: > > NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > > # ls $(gcc-4.4 -print-file-name=include)/stdarg.h > /usr/lib/gcc/x86_64-linux-gnu/4.4.2/include/stdarg.h > Robert? IMO this makes at least more sense then what we have now and I just tested this now with and without a seperate build directory with experimental branch and it works TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -nostdinc -isystem $(shell $(CC) -print-file-name=include) -I$(srcdir)/include -I$(builddir) -I$(builddir)/include -Wall -W -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer