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

Kendrick Hamilton hamilton at sedsystems.ca
Tue Mar 25 11:21:40 EST 2003


You can also set CC in your makefile.
	CC = m68k-elf-gcc
	CFLAGS = -v -m5307 -msep-data -Wl,-elf2flt
Take a look at the make manual at

http://www.gnu.org/manual/make-3.80/make.html


On Tue, 25 Mar 2003, Philippe De Muyter wrote:

> 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.
> 
> Thanks
> 
> > 
> > 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
> 
> Philippe De Muyter  phdm at macqel.be  Tel +32 27029044
> Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> 

-- 
Kendrick Hamilton E.I.T.
SED Systems, a division of Calian Ltd.
18 Innovation Blvd.
PO Box 1464
Saskatoon, Saskatchewan
Canada
S7N 3R1

Hamilton at sedsystems.ca
Tel: (306) 933-1453
Fax: (306) 933-1486




More information about the uClinux-dev mailing list