as, cc, ld ... native or cross compiler? crt0.o?

Joel Sherrill joel.sherrill at
Tue Oct 15 19:14:41 UTC 2002

Tito Costa wrote:
> Hello,
> my native compiler works properly.
> The crt0.o it's looking for is maybe the one in
> <crosscompilerpath>/sparc-rtems/lib/crt0.o and
> <crosscompilerpath>/sparc-rtems/lib/soft/crt0.o
> since the file tools/build-rtems/sparc-rtems/c/make/config.log reports:
> configure:1198: checking for sparc-rtems-gcc
> configure:1242: checking whether the C compiler
> (/home/tcosta/rtems/crosscompiler/bin/sparc-rtems-gcc  ) works
> configure:1258: /home/tcosta/rtems/crosscompiler/bin/sparc-rtems-gcc -o
> conftest    conftest.c  1>&5
> cpp: -lang-c: linker input file unused since linking not done
> ld: fatal: file crt0.o: open failed: No such file or directory
> configure: failed program was:
> #line 1253 "configure"
> #include "confdefs.h"
> main(){return(0);}
> How can I tell the configure script to look into
> <crosscompilerpath>/sparc-rtems/lib/
> I tried with the option --libdir but it didn't work.
> I didn't install the crosscompiler in the default /opt/gcc directory.

If you built it yourself following the instructions, the precise
prefix is not a problem. 

Can you try running this command: sparc-rtems-gcc -o conftest conftest.c
on this file:

main() {return 0;}

and let's see the output.  That is ually a dead give away.

> Thank you.
> - Ti"i wish i could use linux"to

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

More information about the users mailing list