[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add -nostdinc to TARGET_CFLAGS
From: |
Felix Zielcke |
Subject: |
Re: [PATCH] Add -nostdinc to TARGET_CFLAGS |
Date: |
Sat, 14 Nov 2009 22:16:45 +0100 |
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
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Felix Zielcke, 2009/11/04
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS,
Felix Zielcke <=
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Robert Millan, 2009/11/15
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Felix Zielcke, 2009/11/15
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Robert Millan, 2009/11/15
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Felix Zielcke, 2009/11/15
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Robert Millan, 2009/11/15
- Re: [PATCH] Add -nostdinc to TARGET_CFLAGS, Felix Zielcke, 2009/11/15