Newbie can't build linux cross-compiler for solaris
Jim Tison
jtison@ntplx.net
Thu Aug 30 16:15:00 GMT 2001
I ran into the same thing at the same place for another target. What fixed it
for me was using the --with-headers= switch in ./configure. This needs to
point to the system headers. In your case (you'll be running this compiler
with the Sun libs, I take it....) you can probably just get away with
pointing --with-headers to /usr/include (or is that /usr/ccb/include? Heck,
I've forgotten... my Solaris experience is so dated!).
You will need to reconfigure and restart your build. It might be smart to
make clean, too.
Peace,
--Jim--
On Thursday 30 August 2001 17:50, David Thompson wrote:
> 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.
----------------------------------------
Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description:
----------------------------------------
----------------------------------------
Content-Type: text/plain; charset="us-ascii"; name="Attachment: 2"
Content-Transfer-Encoding: 7bit
Content-Description:
----------------------------------------
------
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