Subject: Problems building ARM toolchain under Linux.

From: Dan Jakubiec <[email-masked]>
Date: Fri, 3 Sep 1999 17:17:28 -0700

I'm trying to build a GNU toolchain for the 'arm-linux' target under and
Intel-based Red Hat Linux 6.0 system.  I've been following Chris Rutter's
excellent document to this (http://inkvine.fluff.org/~chris/arm-tools.html).

I'm using binutils 2.9.1.0.19a and GCC 2.95.1.

I get a good deal of the way into building GCC, but then I hit this error:

-------------------------------
...
make[3]: Entering directory `/home/dan/build-gcc/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 _trampoline __main _exit _ctors _pure; \
do \
  echo ${name}; \
  /home/dan/build-gcc/gcc/xgcc -B/home/dan/build-gcc/gcc/
-B/home/gnu/arm/arm-linux/bin/ -I/home/gnu/arm/arm-linux/include -O2
-DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  -fomit-frame-pointer -fPIC
-g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -I.
-I../../gcc-2.95.1/gcc -I../../gcc-2.95.1/gcc/config
-I../../gcc-2.95.1/gcc/../include -c -DL${name} \
       ../../gcc-2.95.1/gcc/libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  arm-linux-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
../../gcc-2.95.1/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../gcc-2.95.1/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/home/dan/build-gcc/gcc'
make[2]: *** [stmp-multilib-sub] Error 2
make[2]: Leaving directory `/home/dan/build-gcc/gcc'
make[1]: *** [stmp-multilib] Error 1
make[1]: Leaving directory `/home/dan/build-gcc/gcc'
make: *** [all-gcc] Error 2
-------------------------------

For some reason it can't find stdlib.h and unistd.h.  The only place these
live on my system are /usr/include.

Does anyone have any ideas on how to fix this?  Thanks in advance!

--
Dan Jakubiec
Systech Corporation
[email-masked]

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Jan-Uwe Finck <[email-masked]>
Date: Sat, 4 Sep 1999 08:39:06 +0200

> ../../gcc-2.95.1/gcc/libgcc2.c:42: unistd.h: No such file or directory

Try these instructions from a recent posting some weeks ago :

Edit gcc/config/arm/t-linux and add "-Dinhibit_libc" and
"-D__gthr_posix_h"
to TARGET_LIBGCC2_CFLAGS
Delete #include "gthr.h" in libgcc2.c
Add the "--disable-threads" option to configure

Hope it helps,
-- 
CU	
	Jan-Uwe
-------------------------------------------------
PGP-Public-Key on Request.
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]