Problems building a cross-compiler

Problems building a cross-compiler

Post by Sasa Ostrousk » Wed, 08 Sep 1999 04:00:00



Hello !

                Can anybody help me to build a cross-compiler ? I'm
trying and i get the following error but don't understand why ?

make[1]: Leaving directory `/usr/src/buildegcs/texinfo'
Building the C and C++ compiler
make[1]: Entering directory `/usr/src/buildegcs/gcc'
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 _*oline __main _exit _ctors _pure; \
do \
  echo ${name}; \
  /usr/src/buildegcs/gcc/xgcc -B/usr/src/buildegcs/gcc/ -O2
-DCROSS_COMPILE -DIN_GCC    -g -O2 -I./include  -fPIC -g1  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED   -I. -I/usr/src/egcs-1.1.2/gcc
-I/usr/src/egcs-1.1.2/gcc/config -c -DL${name} \
      /usr/src/egcs-1.1.2/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  i586-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
/usr/src/egcs-1.1.2/gcc/libgcc2.c:41: stdlib.h: No such file or
directory
/usr/src/egcs-1.1.2/gcc/libgcc2.c:42: unistd.h: No such file or
directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/usr/src/buildegcs/gcc'
make: *** [cross] Error 2

I'm using the slackware 4.0 with egcs-1.1.2 . Pls. if somebody can help
or if you need additional informations contact me.

Thank you in advance.
Sasa

 
 
 

Problems building a cross-compiler

Post by nbec.. » Wed, 08 Sep 1999 04:00:00


Don't build in the source directory.

 
 
 

Problems building a cross-compiler

Post by Marcus Sundber » Wed, 08 Sep 1999 04:00:00



> Don't build in the source directory.

Why do you even bother posting when you don't have a single clue?
It's _obvious_ that he isn't building in the source directory, and
even if he did he wouldn't get this error because of it!

The problem is that you need headers from the c-library to compile
some of the run-time parts of gcc. The solution is to either get
the headers for the c-library from a binary package. Or you can
build gcc with 'make cross; make cross-install', which will hopefully
install enough for you to build the c-library. When the c-library
is built and it's headers installed you can finish the gcc build.

//Marcus
--
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404

 
 
 

Problems building a cross-compiler

Post by Sasa Ostrousk » Thu, 09 Sep 1999 04:00:00


I tried also in a separate directory like /usr/src/buildegcs and the
result is the same.
I was thinking to try with the glibc-2.1.2 and gcc-2.95.1

Thank you
Sasa


> Don't build in the source directory.

 
 
 

Problems building a cross-compiler

Post by Sasa Ostrousk » Tue, 14 Sep 1999 04:00:00


Thanks to all !

        I did it.
Sasa


> I tried also in a separate directory like /usr/src/buildegcs and the
> result is the same.
> I was thinking to try with the glibc-2.1.2 and gcc-2.95.1

> Thank you
> Sasa


> > Don't build in the source directory.

--
R.C. di Ostrouska Sasa       Tel.39-0432-510330        e-mail:

Via della Rosta,31           Fax.39-0432-505997

33100 UDINE - ITALY          Mobile.39-348-2202308     web:
http://users.iol.it/rcostro