Newbie can't build linux cross-compiler for solaris
David Thompson
David.Thompson@efi.com
Thu Aug 30 14:50:00 GMT 2001
Title: Newbie can't build linux cross-compiler for solaris
Hi there,
I am a newbie at building a cross compiler so I'm trying
to read everything I can find, but I've failed in all my
attempts to build a Linux gcc cross-compiler than runs
on Solaris.ÃÂ Here is my simple script,
ÃÂ #!/bin/ksh
ÃÂ GCC=gcc-2.95.3
ÃÂ BINUTILS=binutils-2.10.1
ÃÂ TARGET=i686-pc-linux-gnu
ÃÂ SRCDIR=/home/davidt/gnu/src/sun
ÃÂ BINDIR=/home/davidt/gnu/bin/sun
ÃÂ cd $SRCDIR
ÃÂ mkdir build-binutils build-gcc
ÃÂ # configure, build and install binutils
ÃÂ cd build-binutils
ÃÂ ../$BINUTILS/configure --target=$TARGET --prefix=$BINDIR -v
ÃÂ make all install
ÃÂ # configure, build and install gcc
ÃÂ cd ../build-gcc
ÃÂ ../$GCC/configure --target=$TARGET --prefix=$BINDIR -v
ÃÂ make all install
I have untarred the packages into /home/davidt/gnu/bin/sun,
and binutils builds fine.ÃÂ The error I get is from building
gcc, here is the [slightly formatted] error output,
ÃÂ 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/davidt/gnu/src/sun/build-gcc/gcc/xgcc \
ÃÂ ÃÂ ÃÂ ÃÂ -B/home/davidt/gnu/src/sun/build-gcc/gcc/ \
ÃÂ ÃÂ ÃÂ ÃÂ -B/home/davidt/gnu/bin/sun/i686-pc-linux-gnu/bin/ \
ÃÂ ÃÂ ÃÂ ÃÂ -I/home/davidt/gnu/bin/sun/i686-pc-linux-gnu/include -O2ÃÂ \
ÃÂ ÃÂ ÃÂ ÃÂ -DCROSS_COMPILE -DIN_GCCÃÂ ÃÂ -DSVR4ÃÂ -g -O2 -I./includeÃÂ \
ÃÂ ÃÂ ÃÂ ÃÂ -fPIC -g1ÃÂ -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
ÃÂ ÃÂ ÃÂ ÃÂ -I. -I../../gcc-2.95.3/gcc -I../../gcc-2.95.3/gcc/config \
ÃÂ ÃÂ ÃÂ ÃÂ -I../../gcc-2.95.3/gcc/../include -c -DL${name} \
ÃÂ ÃÂ ÃÂ ÃÂ ../../gcc-2.95.3/gcc/libgcc2.c -o ${name}.o; \
ÃÂ ÃÂ if [ $? -eq 0 ] ; then true; else exit 1; fi; \
ÃÂ ÃÂ i686-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
ÃÂ ÃÂ rm -f ${name}.o; \
ÃÂ done
ÃÂ _muldi3
ÃÂ ../../gcc-2.95.3/gcc/libgcc2.c:41: stdlib.h: No such file or directory
ÃÂ ../../gcc-2.95.3/gcc/libgcc2.c:42: unistd.h: No such file or directory
ÃÂ make[1]: *** [libgcc2.a] Error 1
ÃÂ make[1]: Leaving directory `/home/davidt/gnu/src/sun/build-gcc/gcc'
ÃÂ make: *** [all-gcc] Error 2
I don't understand why stdlib.h & unistd.h cannot be found.ÃÂ I need
help, what am I doing wrong?ÃÂ Any advice or URLs that would help me
(the above script is from http://www.objsw.com/CrossGCC ) would be
extremely appreciated.
--
David Thompson
david.thompson@efi.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list