[uClinux-dev] compiler issue?

Jon Mandrell mandrell at pugetsound.net
Thu Nov 15 11:20:40 EST 2001

I have downloaded the latest m68k-elf tools from the www.uclinux.org web
site (m68k-elf-tools-20010716.tar.gz) and have been trying to build an
executable for the Coldfire M5272C3 eval board.  I am running Mandrake
8.1 as my host environment.

After installing the compiler file into the /usr/local tree, I created
the standard "hello world" app, and attempt to compile with the command

m68k-elf-gcc -m5200 -Wl,-elf2flt -o hello hello.c

and I get the following error messages:

hello.elf2flt: In function `_start':
hello.elf2flt(.text+0x8): undefined reference to `__uClibc_main'
hello.elf2flt: In function `main':
hello.elf2flt(.text+0x2a): undefined reference to `printf'
collect2: ld returned 1 exit status

I can solve this by simply giving '-lc' on the command line.  I looked
in the file /usr/local/lib/gcc-lib/m68k-elf/2.95.3/specs and it appears
there is no specification for -lc.  If I make this change things appear
to work correctly:

*** specs.old   Thu Nov 15 08:08:35 2001
--- specs       Thu Nov 15 08:15:45 2001
*** 20,25 ****
--- 20,26 ----

+ -lc


Is this something that should be in the compiler specs file, or did I
just miss something?  I have successfully built the uClinux distribution

Jon Mandrell                          mandrell at pugetsound.net

This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/

More information about the uClinux-dev mailing list