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]

RE: Can't build gcc for embedded ARC cpu


Hi,
I have the same problem with 2.95.3 trying to build GCC on an
i686-pc-linux-gnu host for powerpc-unknown-eabi target.
Everything I have tried fails. I even tried the cross-build.sh approach and
it fails in a different way (i get as far as building g++spec.c and then get
a ton of "Assembler messages:" lines with various invalid operand errors, I
used the --with-newlib and it also gets me to the choose-temp.c part of the
build. I have tried different binutil version and if anything that just
confused matters with yet different problems.
It would be nice to know if someone has a working build with 2.95.3 (and of
course how can we make our builds work!).

I have seen some people use the headers from NewLib to get round the
stdlib.h, unistd.h compile problems but that
does not seem right. I just want the build to go through without linking the
libgcc etc. runtimes.

All the Best
Con O'Donnell


-----Original Message-----
From: crossgcc-owner@sources.redhat.com
[mailto:crossgcc-owner@sources.redhat.com]On Behalf Of Angel Manchado
Sent: Tuesday, May 22, 2001 6:17 PM
To: crossgcc@sources.redhat.com
Subject: 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/inclu
de -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



------
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]