buildin gcc as a cross comp)iler from pc to RAQ2 (Mips)

Frederic GILLIERS fredg@DotCom.FR
Mon Jul 10 08:03:00 GMT 2000


I'm trying to build gcc as a compiler from an i386 FreeBSD to a
RAQ2 running NetBSD.

The binutils seems to be correctly built, but GCC doesn't want to build
:
I gave the following configuration :

I created a build-gcc directory
../gcc-2.8.1/configure
--with-gnu-as=/usr/tmp/gcc-mips/bin/mips-unknown-elf-as
--with-gnu-ld=/usr/tmp/gcc-mips/bin/mips-unknown-elf-ld
--target=mips-unknown-elf --prefix=/usr/tmp/gcc-essai

(The configuration seems OK)

Then
make all

And I get this error message :
make all-recursive
Making all in intl
Making all in lib
Making all in makeinfo
(cd intl && make all)
rm -f tmplibgcc1.a libgcc1.S
cp ../../gcc-2.95.2/gcc/config/mips/mips16.S libgcc1.S
for name in _m16addsf3 _m16subsf3 _m16mulsf3 _m16divsf3  _m16eqsf2
_m16nesf2 _m1
6gtsf2 _m16gesf2 _m16lesf2 _m16ltsf2  _m16fltsisf _m16fixsfsi
_m16adddf3 _m16su
bdf3 _m16muldf3 _m16divdf3  _m16extsfdf2 _m16trdfsf2  _m16eqdf2
_m16nedf2 _m16gt
df2 _m16gedf2 _m16ledf2 _m16ltdf2  _m16fltsidf _m16fixdfsi  _m16retsf
_m16retdf
 _m16stub1 _m16stub2 _m16stub5 _m16stub6 _m16stub9 _m16stub10
_m16stubsf0 _m16s
tubsf1 _m16stubsf2 _m16stubsf5 _m16stubsf6  _m16stubsf9 _m16stubsf10
_m16stubdf
0 _m16stubdf1 _m16stubdf2 _m16stubdf5 _m16stubdf6  _m16stubdf9
_m16stubdf10;  do
  echo ${name};  /usr/tmp/gcc-src/build-gcc/gcc/xgcc
-B/usr/tmp/gcc-src/build-gc
c/gcc/ -B/usr/tmp/gcc-mips//mips-unknown-elf/bin/
-I/usr/tmp/gcc-mips//mips-unkn
own-elf/include -O2  -DCROSS_COMPILE -DIN_GCC    -g -O2 -I./include  -G
0 -g1  -
DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I../../gcc-2.95.2/gcc
-I../../gcc-2.95
.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c -DL${name}
libgcc1.S;  if [ $
? -eq 0 ] ; then true; else exit 1; fi;  mv libgcc1.o ${name}.o;
mips-unknown-e
lf-ar rc tmplibgcc1.a ${name}.o;  rm -f ${name}.o;  done
_m16addsf3
xgcc: installation problem, cannot exec `mips-tfile': No such file or
directory
*** Error code 1

Stop.
*** Error code 1

Stop.

I searched for a Makefile to build "mips-tfile " And I found it in
build-gcc/gcc/
I ran : make mips-tfile
And I got an error message telling me yhat it could not find the
"a.out.h" file.
Finally, I took the "a.out.h" file from the target machine (and all the
files it included) and I copied it in the directory where the
compilation proccess was looking for it.
I tryed : "make mips-tfile " again, and it gave me an enormous error
message :
gcc -c -DCROSS_COMPILE -DIN_GCC    -g   -DHAVE_CONFIG_H    -I.
-I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config
-I../../gcc-2.95.2/gcc/../include ../../gcc-2.95.2/gcc/mips-tfile.c
../../gcc-2.95.2/gcc/mips-tfile.c:705: `scNil' undeclared here (not in a
function)
../../gcc-2.95.2/gcc/mips-tfile.c:705: enumerator value for `sc_Nil' not
integer constant
../../gcc-2.95.2/gcc/mips-tfile.c:706: `scText' undeclared here (not in
a function)
../../gcc-2.95.2/gcc/mips-tfile.c:706: enumerator value for `sc_Text'
not integer constant
../../gcc-2.95.2/gcc/mips-tfile.c:707: `scData' undeclared here (not in
a function)
../../gcc-2.95.2/gcc/mips-tfile.c:707: enumerator value for `sc_Data'
not integer constant
../../gcc-2.95.2/gcc/mips-tfile.c:708: `scBss' undeclared here (not in a
function)
../../gcc-2.95.2/gcc/mips-tfile.c:708: enumerator value for `sc_Bss' not
integer constant
... (cut)


../../gcc-2.95.2/gcc/mips-tfile.c:5537: request for member `unallocated'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5538: syntax error before `*'
../../gcc-2.95.2/gcc/mips-tfile.c:5543: request for member `cur_page' in
something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5543: `cur_page' undeclared (first use
this function)
../../gcc-2.95.2/gcc/mips-tfile.c:5544: request for member `total_pages'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5548: request for member `unallocated'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5556: request for member `total_alloc'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c: In function `free_thead':
../../gcc-2.95.2/gcc/mips-tfile.c:5567: request for member `total_free'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5570: request for member `free_list'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c:5571: request for member `free_list'
in something not a structure or union
../../gcc-2.95.2/gcc/mips-tfile.c: At top level:
../../gcc-2.95.2/gcc/mips-tfile.c:1513: storage size of
`orig_file_header' isn't known
../../gcc-2.95.2/gcc/mips-tfile.c:3406: warning: `free_forward' declared
`static' but never defined
../../gcc-2.95.2/gcc/mips-tfile.c:1691: warning: `free_scope' declared
`static' but never defined
*** Error code 1

Stop.


I'm stuck here.

I'll appreciate any help.

Best regards
    Frederic GILLIERS



More information about the Gcc-help mailing list