Re: correct to set -nostdinc and then include <stdarg.h> ?

Martin Schlemmer (azarah@gentoo.org)
07 Apr 2003 16:16:12 +0200


On Mon, 2003-04-07 at 16:08, Chris Friesen wrote:
> Russell King wrote:
> > On Mon, Apr 07, 2003 at 03:15:12PM +1000, Keith Owens wrote:
>
> >>On Mon, 07 Apr 2003 00:41:22 -0400,
> >>Chris Friesen <cfriesen@nortelnetworks.com> wrote:
> >>
> >>>I was trying to compile 2.5.66 with gcc 3.2.2. It dies as soon as it tries to
> >>>compile init/main.c because it is unable to find "stdarg.h" which is included by
> >>>"include/linux/kernel.h".
> >>>
> >
> > stdarg.h is part of the compiler specific includes. We want to pick
> > up on these, so we use "-iwithprefix include" to add the compiler specific
> > includes back.
>
> It doesn't seem to work with gcc 3.2.2 then.
>
> > Unfortunately, there seems to be something wrong with GCC's ability to
> > determine where these includes really reside when GCC is installed in
> > a different location to the one it was configured with. In other words,
> > don't do that. Install GCC to the location where you told it to be
> > installed.
>
> gcc was configured with a prefix of "/usr/local/gcc322" and installed using
> "make install". It still gave the error. Is this a gcc bug? I'm at work now,
> but I can run the command you gave this evening to check the results.
>
>

It does work fine. I for instance have gcc binary in
/usr/i686-pc-linux-gnu/gcc-bin/3.2 and the libraries
in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2, which works
fine.

You might just have to give --bindir, etc to the exact locations.
Also, make sure you do not have symlinks, etc in /usr/bin, as they
sometimes 'confuses' gcc ...

-- 
Martin Schlemmer

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/