This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linker problem?


Torbjørn Heltne wrote:
> 
> Hello list members!
> 
> I'm pretty new to this... but I have followed the instructions on
> http://sources.redhat.com/ecos/tools/linux-arm-elf.html to install,
> configure and build the arm-elf-gcc and friends.

These instructions describe how to be build an ARM compiler solely for the
purposes of eCos. This means that what you get out of it is not a general
purpose C compiler, and in particular does not contain a C library or any
startup code.

> It went pretty smooth except that I had to use LANGUAGES="c" under "Build
> and install GCC". Don't think that causes my problem though... :-)

We haven't heard any problems with LANGUAGES="c c++" before.
 
> Anyway: trying to build the well-known "hello, world!" I bump into a
> problem. Seen this one before, anyone?
> 
> [etotorh@eto00840 ]$ make
> arm-elf-gcc -O2   -c -o hello.o hello.c
> arm-elf-gcc -o hello.elf startup.o syscalls.o hello.o -nostartfiles \
>   -Wl,-Ttext,0,-Tdata,0x300000
> /tools/H-i686-pc-linux-gnu/arm-elf/bin/ld: cannot find -lc
> collect2: ld returned 1 exit status
> make: *** [hello.elf] Error 1
> [etotorh@eto00840 ]$
> 
> What's this "-lc" that the linker can't find?

You need to follow the instructions in the eCos Getting Started manual
(available on-line at http://sources.redhat.com/ecos ). If you have
followed the instructions for building a compiler for eCos, the above
compiler commands are not appropriate - you have to use the include files
and linker scripts from a built eCos configuration.

Sorry this was a bit late. HTH,

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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