cross-compiler build: can't find stdio.h

Bill Currie bcurrie@tssc.co.nz
Tue Sep 22 19:31:00 GMT 1998


John Breen wrote:
> 
> I thought I'd seen this asked before, but I searched the FAQ and the
> archive titles three months back, and didn't see it.

That was me, and no, there's nothing in the FAQ on this (Jeff said it's
WAAY out of date as well).

> I'm trying to build egcs-1.1a for m68k-elf (NOTE: since egcs doesn't
> currently support m68k-elf, I'm using my own hacked .h files, based on a
> patch from gcc-2.7.2.2; but I don't think that's the problem).  I
> finally started getting close, but now it's dying while building
> libiberty because it can't find stdio.h.

Almost exact simptom I had, except it was stdlib.h and unistd.h I think.

> When I built gcc-2.7.2.2 m68k-elf, the "cygnus patch" had something
> about removing the need for stdio.h.  Doesn't egcs have something
> similar?  I do have the headers from the gcc-2.7.2.2 build (although on
> another system); should I copy them over and use --with-headers?  Or did
> I possibly do something wrong?

Yes, you should use --with-headers=... to specifiy the location of your
target include tree and --with-libs=... to specifiy the location of your
target lib tree.  These get copied into to target specific installation
directory.

Here's an example (using one tree for the tool chain, separate directory
for build):
../src/configure --prefix=$HOME --target=m68k-tekelec-mtos
--with-headers=$HOME/mtos/include --with-libs=$HOME/mtos/lib

Note: I haven't submitted the patches for m68k-tekelec-mtos yet (hasn't
been properly tested yet), but it's just a copy of m68k-*-aout with some
tweaks in gcc to use slightly different defaults.  However, I imagine
you don't really care as you're going for m68k-*-elf.

HTH
Bill
-- 
Leave others their otherness



More information about the Gcc mailing list