[uClibc]FOLLOWUP: missing stdarg.h stddef.h, etc.

Marshall M. Midden m4 at brecis.com
Mon Oct 7 16:48:02 UTC 2002


Using uclibc's gcc 3.2 Makefile(modified) and "our" script version, either to
cross-compile to mips works on redhat 7.3 out of the box (-nostdinc). We can
compile and use the gcc delivered on redhat on redhat to compile for i386 and
run on the i386 that it compiles on.  Using static binaries.  I can compile
our kernel for both mipsnommu and i386 and run kernels and userland.

We had some difficulty with this -nostdinc crap when the compiler was gcc 3.1,
but 3.2 works fine.  If one is cross-compiling, one needs a userland library
specified, otherwise you get some unusable thing.  If the include files in
use are significantly different in the library, you'll need a different gcc.
[Sept 30th, 2002 uclibc appears close enough to redhat for what we compile --
fileutils-4.1, textutils-2.0, net-snmp-5.0.1, bash-2.05b, sh-utils-2.0, etc.]

> From: Erik Andersen <andersen at codepoet.org>
> To: Tobias Anderberg <tobias.anderberg at axis.com>
> Cc: Todd Sundsted <toddx503 at yahoo.com>, uclibc at uclibc.org
> Subject: Re: [uClibc]FOLLOWUP: missing stdarg.h stddef.h, etc.
> 
> On Mon Oct 07, 2002 at 02:31:38PM +0200, Tobias Anderberg wrote:
> > Erik Andersen wrote:
> > > On Fri Oct 04, 2002 at 06:15:30AM -0700, Todd Sundsted wrote:
> > > > This is a followup to my last post.  I appears that in uClibc v 0.9.11 there
> > > > was a line like:
> > > > 
> > > > GCCINCDIR = ${shell $(CC) -print-search-dirs | sed -ne "s/install:
> > > > \(.*\)/\1include/gp"}
> > > > 
> > > > In later versions, this disappeared.
> > > 
> > > The idea here is to allow gcc to include the gcc include files.
> > > In newer versions of uClibc this expression has been replaced
> > > with "-iwithprefix include" in CFLAGS, which should do exactly
> > > the same thing, and eliminates the need for calling the shell and
> > > sed.  What compiler are you using?  Can you check that "-nostdinc
> > > -iwithprefix include" works as expected?
> > 
> > This probably won't work, depending on compiler version. The -nostdinc
> > options removes the paths from the search list and thus there's no place
> > to append "include" to form a valid include path, so to speak.
> > 
> > The GCCINCDIR variable would probably be a better solution, atleast it's
> > more portable across compiler versions. I think..
> 
> I got the "-nostdinc -iwithprefix include" from the linux-kernel
> Makefile, which seems to be quite portable. 
> 
> I don't have Redhat 7.3 -- but I find it odd that it works in
> the linux-kernel but doesn't work for uClibc on Redhat 7.3.
> Wierd.



More information about the uClibc mailing list