Loris Caren wrote:
I've got gcc-2.95.3, binutils-2.11 and gpc-20010623. I am able to build a native gpc and a gcc cross compiler, but the gpc cross almost finishes construction before stopping with an error message. Can anybody report success at building this cross, or suggest what my problem might be?
../../gcc-2.95.3/gcc/p/script/mkdir-p p/rts src=`cd ../../gcc-2.95.3/gcc && pwd` && \ cd p/rts && \ CC="`echo /usr4/gpc68-build/gcc/xgcc -B/usr4/gpc68-build/gcc/ -B/usr/local/m68k-coff/bin/ -I/usr/local/m68k-coff/include' ' | sed -e 's,-B([^/][^:]),-B../../\1,g;s,^([^/][^:]),../../\1,'`" PC="`echo ./xgpc -B./' ' | sed -e 's,-B([^/][^:]),-B../../\1,g;s,^([^/][^:]),../../\1,'`" CONFIG_SITE=nonexisting-file \ $src/p/rts/configure --silent > /dev/null --srcdir=$src/p/rts \ `if [ x@with_shared@ = xyes ]; then echo '--with-shared'; fi` configure: error: installation or configuration problem: C compiler cannot create executables.
The script claims that the (just built) "C compiler cannot create executables". This compiler is /usr4/gpc68-build/gcc/xgcc, and since it's not installed yet, it needs the options -B/usr4/gpc68-build/gcc/ -B/usr/local/m68k-coff/bin/ (or at least the former).
Try manually compiling a hello world program with this compiler and see if/why it fails. Likely reasons are that you haven't built the cross-bintuils (assembler, linker, etc.) before or haven't installed the system headers and libraries of the target system in /usr/local/m68k-coff/{include,lib}/ (yes, you need to do both in order to get a working cross-compiler -- building the cross-binutils is usually straightforward; the system headers and libraries are best copied from a running target system).
Frank