FW: (arm) cross compiler under Cygwin

John Andrews john@triscend.com
Sun Apr 1 00:00:00 GMT 2001


Hi Nhat,

This is another case of missing headers. I think this fix qualifies as
somewhat of a swag but it worked for me:

# going with newlib for now
# copy headers to include missing stdlib.h and unistd.h for libgcc2
cp -r /usr/src/newlib-1.9.0/newlib/libc/include/*  \
      /usr/local/arm-elf-linux/include

I used the default install destination of /usr/local, substitute whatever
you used in --prefix. My target is arm-elf-linux. In general the destination
of the copy is:

$prefix/$target/include

I think creating links to newlib in the gcc source is the recommended
solution. I wasn't sure if that link should be created in the
gcc-2.95.2/gcc/include dir to the newlib-1.9.0/newlib/libc/include dir. I
think this ties in with using the --with-newlib config option. Maybe one of
the experts can comment on this option and the specific link that should be
created.

I'm also not really sure what the default header search path is or how to
find out. Again any expert elaboration would be greatly appreciated.

Hope this helps, Bye for now...

John E. A.

-----Original Message-----
From: nhat.dao@philips.com [ mailto:nhat.dao@philips.com ]
Sent: Monday, March 19, 2001 9:43 AM
To: crossgcc@sources.redhat.com; dkorn@pixelpower.com
Subject: Re: FW: (arm) cross compiler under Cygwin


okay. Hi everybody,

* unpack (binutils-20001221-1-src.tar.gz)
* /usr/local/bin/binutils-20001221-1=>$ ./configure
--target=arm-strongarm-aout
* make all install
* /gcc-2.95.2-6=>$ ./make clean
* ./configure --target=arm-strongarm-aout
* make LANGUAGES= "c++"

[...]
make[2]: Entering directory `/gcc-2.95.2-6/gcc'
rm -f libgcc2.a
if [ -d . ]; then \
  cd .; \
  rm -f libgcc.a ; \
else true; \
fi
make GCC_FOR_TARGET="/gcc-2.95.2-6/gcc/xgcc -B/gcc-2.95.2-6/gcc/
-B/usr/local/arm-strongarm-aout/bin/ -I/usr/l
ocal/arm-strongarm-aout/include" \
  AR_FOR_TARGET="arm-strongarm-aout-ar" \
  AR_FLAGS_FOR_TARGET="rc" \
  CC="gcc" CFLAGS="-g -O2" \
  HOST_PREFIX="" HOST_PREFIX_1="loser-" \
  LANGUAGES="c++" \
  LIBGCC2_CFLAGS="-O2  -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include   -g1
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_N
EEDED   " libgcc2.a
make[3]: Entering directory `/gcc-2.95.2-6/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 _f
ixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi
_floatditf
__gcc_bcmp _varargs __dummy
 _eprintf _bb _shtab _clear_cache _trampoline __main _exit _ctors _pure; \
do \
  echo ${name}; \
  /gcc-2.95.2-6/gcc/xgcc -B/gcc-2.95.2-6/gcc/
-B/usr/local/arm-strongarm-aout/bin/
-I/usr/local/arm-strongarm-
aout/include -O2  -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include   -g1
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
    -I. -I. -I./config -I./../include -c -DL${name} \
       ./libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  arm-strongarm-aout-ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
./libgcc2.c:41: stdlib.h: No such file or directory
./libgcc2.c:42: unistd.h: No such file or directory
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/gcc-2.95.2-6/gcc'
make[2]: *** [stmp-multilib-sub] Error 2
make[2]: Leaving directory `/gcc-2.95.2-6/gcc'
make[1]: *** [stmp-multilib] Error 1
make[1]: Leaving directory `/gcc-2.95.2-6/gcc'
make: *** [all-gcc] Error 2

what can i do, please ?

/pegase
nospam_nhat.dao@philips.com (remove nospam_ to reply)

dkorn@pixelpower.com a écrit :

>   Hi again Pegase,
>
> >otherwise,
> >how can i do to
> >install the cross binutils for arm ?
> >is it in Cygwin environment ?
> >
> >i have :
> >* binutils-20001221-1.tar.gz
> >* binutils-20001221-1-src.tar.gz
>
>   You need the second one, which is a snapshot of the binutils source
> code.
>
>   To make and install the cross binutils is very like the procedure for
gcc:
>
>  - unpack the tar.gz file into a source directory
>  - make a build directory somewhere else and cd into it
>  - /path/to/sourcedir/configure --target=arm-strongarm-aout
>  - make all install
>
>   Then, be sure that /usr/local/bin is in your $PATH setting (or if you
> want to use a --prefix setting for compiling binutils and gcc, make sure
> that $prefix/bin is in $PATH).


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to
crossgcc-unsubscribe@sourceware.cygnus.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