Hi, Franz:
I am doing cross-compiler for mips r3000 now and
meet alot of problems.
My host system is i386 with Rad Hat 7.0 installed.
First, I successfully built and installed
binutils-2.8.1 by using binutils-2.8.1.tar.gz and
egcs-mips-linux-1.1.2-2.i386.rpm. This created bin, lib,
mips-linux subdirectories.
Second, I installed the linux kernel source code
for mips by using linux-2.2.14-000715.tar.gz and
configured it and enabled CONFIG_CROSSCOMPILE. Made soft links: let
mips-linux/include/asm pointd to linux-2.2.14-000715/include/asm-mips and
mips-linux/include/linux pointd to
linux-2.2.14-000715/include/linux.
Third, unziped the
egcs-1.1.2.tar.gz, added the patch
egcs-mips-linux-1.1.2-2.i386.rpm and configured it as
following:
./configure
--prefix=/home/sliu --with-newlib --target=mips-linux
and made it this way:
make
SUBDIRS="libiberty texinfo gcc" ALL_TARGET_MODULES= CONFIGURE_TARGET_MODULES=
INSTALL_TARGET_MODULES= LANGUAGES="c"
Then, it gave the following errors in gcc
subdirectory:
xgcc: installation problem, cannot exec
`mips-tfile': No such file or directory
make[1]: *** [libgcc2.a] Error 1 make[1]: Leaving directory `/home/sliu/egcs-1.1.2/gcc' make: *** [all-gcc] Error 2 If you could give me any help, I would be greatly
appreciated.
Regards,
Steven Liu
|
make[1]: Entering directory `/home/sliu/egcs-1.1.2/libiberty' f=" "; \ case $f in \ *alloca.o*) f="$f xmalloc.o xexit.o" ;; \ esac; \ echo $f > needed-list echo argv.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o > required-list make[1]: Leaving directory `/home/sliu/egcs-1.1.2/libiberty' make[1]: Entering directory `/home/sliu/egcs-1.1.2/texinfo' make all-recursive make[2]: Entering directory `/home/sliu/egcs-1.1.2/texinfo' Making all in intl make[3]: Entering directory `/home/sliu/egcs-1.1.2/texinfo/intl' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo/intl' Making all in lib make[3]: Entering directory `/home/sliu/egcs-1.1.2/texinfo/lib' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo/lib' Making all in makeinfo make[3]: Entering directory `/home/sliu/egcs-1.1.2/texinfo/makeinfo' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo/makeinfo' Making all in util make[3]: Entering directory `/home/sliu/egcs-1.1.2/texinfo/util' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo/util' make[2]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo' make[1]: Leaving directory `/home/sliu/egcs-1.1.2/texinfo' make[1]: Entering directory `/home/sliu/egcs-1.1.2/etc' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/sliu/egcs-1.1.2/etc' make[1]: Entering directory `/home/sliu/egcs-1.1.2/gcc' gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config \ -DGCC_INCLUDE_DIR=\"/home/sliu/lib/gcc-lib/mips-linux/egcs-2.91.66/include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"/home/sliu/include/g++\" \ -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/home/sliu/lib/g++-include\" \ -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \ -DCROSS_INCLUDE_DIR=\"/home/sliu/mips-linux/sys-include\" \ -DTOOL_INCLUDE_DIR=\"/home/sliu/mips-linux/include\" \ -c `echo ./cccp.c | sed 's,^\./,,'` gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config \ -DPREFIX=\"/home/sliu\" \ -c `echo ./prefix.c | sed 's,^\./,,'` gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o cccp cccp.o cexp.o prefix.o \ version.o obstack.o rm -f cpp ln cccp cpp gcc -c -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config ./gencheck.c gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o gencheck \ gencheck.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ./gencheck > tmp-check.h ./move-if-change tmp-check.h tree-check.h tree-check.h is unchanged touch s-check gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config \ -DTARGET_NAME=\"mips-linux\" \ -c `echo ./toplev.c | sed 's,^\./,,'` gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o cc1 c-parse.o c-lang.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o regmove.o dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o profile.o insn-attrtab.o mips.o getpwd.o convert.o dyn-string.o obstack.o /bin/sh ./genmultilib \ "" \ "" \ "" \ "" \ "" > tmp-mlib.h ./move-if-change tmp-mlib.h multilib.h multilib.h is unchanged touch s-mlib gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I. -I./config \ -DSTANDARD_STARTFILE_PREFIX=\"/home/sliu/lib/\" -DSTANDARD_EXEC_PREFIX=\"/home/sliu/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"egcs-2.91.66\" -DDEFAULT_TARGET_MACHINE=\"mips-linux\" -DTOOLDIR_BASE_PREFIX=\"/home/sliu/\" \ -c `echo ./gcc.c | sed 's,^\./,,'` gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o xgcc gcc.o prefix.o version.o \ choose-temp.o pexecute.o mkstemp.o obstack.o echo "int xxy_us_dummy;" >tmp-dum.c /home/sliu/egcs-1.1.2/gcc/xgcc -B/home/sliu/egcs-1.1.2/gcc/ -S tmp-dum.c echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ echo "int prepends_underscore = 1;" >>tmp-under.c; \ else \ echo "int prepends_underscore = 0;" >>tmp-under.c; \ fi ./move-if-change tmp-under.c underscore.c underscore.c is unchanged rm -f tmp-dum.c tmp-dum.s touch s-under cp xgcc gcc-cross /home/sliu/egcs-1.1.2/gcc/xgcc -B/home/sliu/egcs-1.1.2/gcc/ -dumpspecs > tmp-specs mv tmp-specs specs if [ -f libgcc2.ready ] ; then \ true; \ else \ touch libgcc2.ready; \ fi rm -f tmplibgcc2.a for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline __main _exit _ctors _pure; \ do \ echo ${name}; \ /home/sliu/egcs-1.1.2/gcc/xgcc -B/home/sliu/egcs-1.1.2/gcc/ -O2 -DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I./config -c -DL${name} \ ./libgcc2.c -o ${name}.o; \ if [ $? -eq 0 ] ; then true; else exit 1; fi; \ mips-linux-ar rc tmplibgcc2.a ${name}.o; \ rm -f ${name}.o; \ done _muldi3 xgcc: installation problem, cannot exec `mips-tfile': No such file or directory make[1]: *** [libgcc2.a] Error 1 make[1]: Leaving directory `/home/sliu/egcs-1.1.2/gcc' make: *** [all-gcc] Error 2