Wed Feb 28 15:30:00 GMT 2001
Bharani Chadalavada wrote:
> "J. Johnston" wrote:
> > Bharani Chadalavada wrote:
> > >
> > > Hi,
> > >
> > > I was trying to compile newlib using an i386->mips cross gcc. I have a
> > > couple of questions.
> > > I realize that I need to provide my own implementation of close, read,
> > > write etc for my applications to work. But when I tried the above
> > > compilation, newlib needed the following header files - machine/ansi.h,
> > > stddef.h, limits.h etc.(this is just a partial list). Now what I don't
> > > understand is, do I have to have these header files as target specific
> > > stuff since I am compiling newlib as a target library or do I have to
> > > have these stuff from the native host which is i386.
> > > I was able to compile newlib when I gave the i386 specific header files
> > > in the include path. But I am not sure if this is the right thing.
> > >
> > > I really appreciate your time and help.
> > >
> > > Thank you,
> > > Bharani.
> > Bharani,
> > You need to compile newlib for the target which in this case is mips.
> > The header files in question should be supplied by your cross-compiler. What did you specify when
> > you configured newlib and did you personally build the cross-compiler?
> Yes. I built the cross-compiler personally. Specifically, I am using a netbsd box and there is an
> i386->mips cross compiler in the pkgsrc. But the header files in question do not get built as a part
> of the cross compiler. But why would the cross compilet supply machine/ansi.h for example? Are they
> not mips machine specific stuff(in this case)??
Try adding an empty ansi.h file in libc/include/machine. Another newlib user using netbsd ran
into a similiar problem. The other header files you mention should be around as they are supposed
to be built by the compiler.
I'm not sure why you are adding the redundant mips in your configuration. Try just mips-elf. I
assume that you have a mips-elf-gcc somewhere.
-- Jeff J.
More information about the Newlib