GPC cross-compilation error
eye484809 at freenet.de
Sun Apr 29 14:26:14 CEST 2007
I'm trying to build a GPC for a deeply embedded non-unixoid platform (sh-elf)
and running into an error of this kind:
--- 8< ---
src=`cd ../../gcc-3.4.6/gcc && pwd` && \
cd ./p/rts && \
CC="`echo /home/eye/dc/dc-chain/build-gcc-sh-elf-3.4.6/gcc/xgcc -B/home/eye/dc/dc-chain/build-gcc-sh-elf-3.4.6/gcc/ -B/home/eye/dc/sh-elf/sh-elf/bin/ -B/home/eye/dc/sh-elf/sh-elf/lib/ -isystem /home/eye/dc/sh-elf/sh-elf/include -isystem /home/eye/dc/sh-elf/sh-elf/sys-include' ' |
sed -e 's,\(-[BI]\)\([^/][^:]\),\1../../\2,g;s,^\([^/][^:]*/\),../../\1,'`"
PC="`echo ./xgpc -B./' ' | sed -e 's,\(-[BI]\)\([^/][^:]\),
\1../../\2,g;s,^\([^/][^:]*/\),../../\1,'`" CONFIG_SITE=nonexisting-file \
$src/p/rts/configure --silent > /dev/null --srcdir=$src/p/rts \
`if [ x at with_shared@ = xyes ]; then echo '--with-shared'; fi`
configure: error: installation or configuration problem: C compiler cannot
make: *** [p/rts/Makefile] Fehler 1
make: *** [all-gcc] Fehler 2
make: Verlasse Verzeichnis '/home/eye/dc/dc-chain/build-gcc-sh-elf-3.4.6'
--- >8 ---
And i believe the error message is quite correct too. The build process is
working in the following steps, as far as i understood it. I am not the
author of the compilation script, so i'm not quite sure.
1. compile a semi-broken C cross-compiler.
2. compile newlib (a C standard library) using this compiler.
3. throw away the compiler, use something from newlib to reconfigure GCC
4. compile the correct cross-compiler for selected languages, namely C, C++,
and in my case also Pascal.
It seems to me that xgcc is the broken compiler from the first step, which is
not intended to produce executables, just libraries. Besides, it generates
the code for the target system, where a compiler would be plain unable to
run. The compilers have to be compiled with ordinary GCC and would run on
If it helps, i have the script which steers the compilation attached to this
message. It expects binutils-2.16, gcc-3.4.6, newlib-1.12.0, and
gnupascal-20060325 unpacked in its directory. Other versions might work if
Makefile is corrected, but e.g. binutils-2.17 and gcc starting with version 4
will not work.
Please note that GPC is the only compiler whose compilation breaks. Before i
added it, C and C++ compilers compiled and worked successfully.
Does anyone have a clue where i start to fix it?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7294 bytes
Desc: not available
More information about the Gpc