trying to create cross compiler for mipsel-linux
Rupert Wood
me@rupey.net
Mon Nov 26 23:23:00 GMT 2001
Mark Juszczec wrote:
> I have the following installed on a RedHat 7.0, kernel
> 2.2.16-22, i586:
>
> /usr/local/src/binutils-2.11.2
> /usr/local/src/build-binutils
> /usr/local/src/build-gcc
> /usr/local/src/gcc-3.0.2
> /usr/local/src/newlib-1.9.0
newlib is intended for embedded systems; you shouldn't use it to target
mipsel-linux system.
Instead you should use copies of files from the target mipsel-linux
distribution:
* 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)
> 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.
I don't think '--enable-static' does anything, but I guess it won't
hurt.
> /usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mip
> sel-linux/bits/os_defines.h:37:22:
> features.h: No such file or directory
If you're lucky then this is related to assumptions about the wrong
header files and will just go away :-)
Good luck,
Rup.
More information about the Gcc-help
mailing list