as, cc, ld ... native or cross compiler? crt0.o?
corsepiu at faw.uni-ulm.de
Sat Oct 12 04:02:35 UTC 2002
Am Sam, 2002-10-12 um 04.24 schrieb Tito Costa:
> hi there,
> I'm working on a Solaris/SPARC host, my target is SPARC with Unix BSP.
> I'm using pre-built compilers tools and RTEMS release 4.5.0.
> When I try to run the crosscompiler on the simple C program suggested in
> the doc (5.4 Verifying the Operation of the Cross Toolset) I get an
> error because as command can't be found. So I linked it to
> sparc-rtems-as in the crosscompiler's bin directory. Is that right?
> Same thing with cc1, now linked to lib/gcc-lib/sparc-rtems/2.95.2/cc1
gcc/cc, as, etc are assumed to be the build-host's native tools (In your
case, the sparc-sun-solaris native toolchain)
<target>-gcc, <target>-as, etc.(aka. canonicalized tools) are supposed
to be the cross-tool chain.
These are the tools' names they are supposed to be invoked by users.
GCC _internally_ uses $(prefix)/<target>/bin/<tool>. This directory
should not be accessed directly by users in general.
> The same thing happens when I run the configure script in the building
> procedure of RTEMS: cc and ld are not found. Are these supposed to be
> the crosscompiler's programs too?
In a standard RTEMS development environment (which is not any different
from a standard gcc development environment). PATH is supposed to
contain the native tools in their non-canonicalized form and the
cross-tools in their canonicalized form.
I.e. do not put $(rtems-prefix)/<target>/bin into your $PATH
> I assumed so, but I got this error while executing the configure script
> (these are the last lines of build-rtems/tools/build/configure.log):
> configure:918: checking for executable suffix
> configure:928: cc -o conftest conftest.c 1>&5
> cpp: -lang-c: linker input file unused since linking not done
> ld: cannot open crt0.o: No such file or directory
> By the way, lines 918 and 928 of the configure script do not correspond
> to the ones reported in the log. Actually I searched "conftest.c" in
> configure and I didn't find it.
It seems to me that your toolchains' installation might be broken.
More information about the users