[uClinux-dev] Re: uclinux-elf-tools-20030314 released

Philippe De Muyter phdm at macqel.be
Tue Mar 25 11:11:48 EST 2003

David McCullough wrote :
> How does that work ?   On my system is I type "make hello" it uses "cc",
> not m68k-elf-gcc or any other compiler for that matter.

Not really.  It uses $(CC), which is set to the value of the environment
variable CC, if set, or cc otherwise.  You can set CC="m68k-elf-gcc ..."
in your .profile or .bashrc file.

> if you are running:
> 	make "CC=m68k-elf-gcc -v -m5307 -msep-data -Wl,-elf2flt" hello
> how much harder is it to run:
> 	make "CC=m68k-elf-gcc -v -m5307 -msep-data -Wl,-elf2flt" LDLIBS=-lc hello
I didn't know about the LDLIBS variable, but that's not exactly the same
as putting -lc in specs.

With -lc in specs, link ends with :
					 -lgcc -lc -lgcc
With LDLIBS=-lc, link ends with :
					 -lc -lgcc -lgcc

The expected order is -lgcc -lc -lgcc.

> > For people using a specific compiler to target another target or a naked
> > board, they've already solved the link problem, most often by invoking ld
> > directly (just as we do when we compile linux), so they would'nt even notice
> > the change.
> > 
> > At the moment the situation is just bad : we get the include files and
> > the crt0.o file from uclinux/uClibc, but not the library.
> Fair comment and this is a good reason for the change.  Not much point
> including one part of the libc and not the other.  Next time I'm working
> on it I'll look at including -lc in the specs file.


> The truth is that the crt0.o is compatible with both uC-libc and uClibc.
> > I'd prefer we really had a uclinux/uClibc targetted compiler.
> You do as far as I can see,  it just needs the -lc option,  which you
> have already shown you know how to add :-)

It's better for all of us to use standard tools than each one having
its own slightly modified tools :) 

> Cheers,
> Davidm

Best regards,

Philippe De Muyter  phdm at macqel.be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077

More information about the uClinux-dev mailing list