trying to create cross compiler for mipsel-linux

Mark and Janice Juszczec
Tue Nov 27 11:43:00 GMT 2001


you wrote:

>Subject: RE: trying to create cross compiler for mipsel-linux
>Date: Tue, 27 Nov 2001 07:23:02 -0000

>newlib is intended for embedded systems; you shouldn't use it to target
>mipsel-linux system.

    I'm planning to compile on an intel based pc running RedHat 7.0 but I 
want to run stuff on a PDA with a 75MHz Philips R3912-based mips processor.  
That's why I figured I needed newlib.  Am I wrong or is mipsel-linux the 
wrong target to use for this processor?

>Instead you should use copies of files from the target mipsel-linux
>   * target /usr/include to /usr/local/mipsel-linux/sys-include
>     (making sure that you get the contents of linux and asm and not
>      just dangling symlinks)
>   * target /lib in /usr/local/mipsel-linux/lib
>     (won't need subdirectories)
>   * target *.o from /usr/lib to /usr/local/mipsel-linux/lib
>     (plus any other libs you think you might need; won't need
>      subdirectories)

      Let me make sure I understand this.  I need the contents of 
/usr/include, /lib and /usr/lib/*.o from a mips system.  How are these used 
in the creation of a cross compiler?  Will an intel system (the one where 
I'm compiling gcc to make a cross compiler) understand mips object files and 

> > I configured/tried to make gcc as follows:
> >
> > /usr/local/src/gcc-3.0.2/configure --target=mipsel-linux
> > --with-newlib
> > --with-headers=/usr/local/src/newlib-1.9.0/newlib/libc/include
> > --enable-static --disable-shared
>You can use '--with-headers' and '--with-libs' twice to do the above
>copies but I'm not sure if they copy subdirectories or not, or whether
>they'll copy include/linux and include/asm correctly.

     Does this mean that these options attempt to do the copies (the ones 
you described at the beginning of your email) at compile time?  Do you 
suggest manual copies because these options may not copy everything in all 
the subdirectories?

>I don't think '--enable-static' does anything, but I guess it won't

     Does this mean that only --disable-shared is needed?

>If you're lucky

     Well, so far I haven't been ;-(
     But that's got to change soon.

     Thanks for all the information.


Get your FREE download of MSN Explorer at

More information about the Gcc-help mailing list