trying to create cross compiler for mipsel-linux
Mark and Janice Juszczec
juszczec@hotmail.com
Mon Nov 19 16:39:00 GMT 2001
Hello all
on Fri, 23 Nov 2001 09:26:23 John Zaitseff wrote:
>A number of people have previously queried compiling GCC 3.0 as a
>cross-compiler for embedded systems under Linux. These people have had
>problems in doing so, with apparently no answers to their queries.
>I also have had problems compiling GCC 3.0.2 as a cross-compiler (in my
>case, for arm-elf) under Linux. I have found a suitable workaround, which
>others having the same problems may like to know. It probably would be
>good if someone got around to FIXING the problems as well...
(I've snipped the instructions so this won't be terribly long)
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
I configured/made binutils as follows:
../binutils-2.11.2/configure --target=mipsel-linux -v
make all install
and then I made the following links:
cd /usr/local/mipsel-linux/
mkdir sys-include
ln -s sys-include include
chmod o+w sys-include
cd /usr/local/lib
ls
mkdir -p gcc-lib/mipsel-linux
chmod o+w gcc-lib/mipsel-linux
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
make all
I've attached the make errors at the end of this message. Can anyone tell
if this is some kind of missing link to an include file problem like what
you've dealt with? If it is, how can I fix it? Has anyone out there made a
cross compiler for mipsel-linux? If so, can you tell me how you did it?
Thanks
Mark
/usr/local/src/build-gcc/gcc/xgcc -B/usr/local/src/build-gcc/gcc/
-nostdinc++ -L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src
-L/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/src/.libs
-nostdinc -B/usr/local/src/build-gcc/mipsel-linux/newlib/
-isystem /usr/local/src/build-gcc/mipsel-linux/newlib/targ-include
-isystem /usr/local/src/gcc-3.0.2/newlib/libc/include
-B/usr/local/mipsel-linux/bin/ -B/usr/local/mipsel-linux/lib/
-isystem /usr/local/mipsel-linux/include
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../gcc
-I/usr/local/src/gcc-3.0.2/libstdc++-v3/../include
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux
-I/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include -
I/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++
-g -O2 -D_GNU_SOURCE -fno-implicit-templates
-Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-g -c /usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc
In file included from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
from
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:37:22:
features.h: No such file or directory
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:44:23:
gnu/types.h: No such file or directory
In file included from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/c++config.h:34,
from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/bits/std_cstdlib.h:37,
from
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/cstdlib:31,
from
/usr/local/src/gcc-3.0.2/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/include/mipsel-linux/bits/os_defines.h:45:
syntax
error before `;' token
make[3]: *** [eh_alloc.lo] Error 1
make[3]: Leaving directory
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory
`/usr/local/src/build-gcc/mipsel-linux/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2
but
find . -name features.h -print
./newlib-1.9.0/newlib/libc/include/sys/features.h
./gcc-3.0.2/libstdc++-v3/include/c_shadow/features.h
find . -name types.h -print
./binutils-2.11.2/include/mpw/sys/types.h
./newlib-1.9.0/newlib/libc/include/machine/types.h
./newlib-1.9.0/newlib/libc/include/sys/types.h
./newlib-1.9.0/newlib/libc/sys/linux/sys/types.h
./newlib-1.9.0/newlib/libc/sys/rtems/sys/types.h
./gcc-3.0.2/gcc/fixinc/tests/base/sys/types.h
The syntax error is in:
39 #if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
40
41 // The types __off_t and __off64_t are not defined through <sys/types.h>
42 // as _G_config assumes. For libc5 and glibc 2.0 instead use
43 // <gnu/types.h> and the old name for __off64_t.
44 #include <gnu/types.h>
45 typedef __loff_t __off64_t;
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the Gcc-help
mailing list