This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Can't build gcc for embedded ARC cpu


Hi 
I am trying to build GCC-2.95.3 as a cross-compiler on a i686-pc-linux-gnu host for an embedded ARC cpu core as target (arc-unknown-elf).

I guess that it fails due to the lack of standard library headers.
E.g., with the following configuration:

../src/gcc-2.95.3/configure \
	--host=i686-pc-linux-gnu \
	--target=arc-unknown-elf \
	--build=i686-pc-linux-gnu \
	--prefix=/usr/local/arc \
	--enable-languages=c

it fails in an early stage as follows:

  /home/angel/arc-elf/build-gcc/gcc/xgcc -B/home/angel/arc-elf/build-gcc/gcc/ -B/usr/local/arc/arc-unknown-elf/bin/ -I/usr/local/arc/arc-unknown-elf/include -O2  -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include   -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -I. -I../../src/gcc-2.95.3/gcc -I../../src/gcc-2.95.3/gcc/config -I../../src/gcc-2.95.3/gcc/../include -c -DL${name} \
       ../../src/gcc-2.95.3/gcc/libgcc2.c -o ${name}.o; \
...
../../src/gcc-2.95.3/gcc/libgcc2.c:41: stdlib.h: No such file or directory
../../src/gcc-2.95.3/gcc/libgcc2.c:42: unistd.h: No such file or directory
make[3]: *** [libgcc2.a] Error 1

Now if I add the option '--with-newlib' it arrives much far away in the building process, up to file "choose-temp.c" in the "libiberty" directory, but with a similar error message.

It seems that it is trying to use the just-built cross-compiler, xgcc, to compile some files with standard library headers.
This is wrong since those headers don't exist.
I don't know of any standard library that support the ARC cpu, and it probably shouldn't be necessary for an embedded target.

So, isn't it possible to build GCC without those headers/libraries?
If so, which option should I give to the configure script?
Anyone can enlighten me a little bit?

Thanks

Angel Manchado
-------------

P.S.
I would also like to know the opinion of other people using GCC for ARC (if any).

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]