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

David McCullough davidm at snapgear.com
Mon Mar 24 17:03:51 EST 2003


Jivin Philippe De Muyter lays it down ...
> David McCullough wrote :
> > Yes,  everything I used to build them is included,  the script is called
> > build-uclinux-elf-tools.sh,  look under:
> > 
> > 	http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-20030314/
> > 
> > let me know if there is anything missing,
> 
> Well,
> 
> I build the new tool-chain using your script, and I have a few remarks :
> 
> - should the script not unpack uClibc and elf2flt itself, just as it does
> for binutils, gcc, STLport ... ?


Mostly becuase these were traditionally checked out from CVS,  but yes
they could be extracted as well.


> - must uClibc-0.9.19.patch.gz be applied, and how ?


No,  it was just to provide the changes against uClibc-0.9.19 in case
someone wants to use a later version,  they can apply the patches.


> - I have a patch available that fix a long-standing problem with -mcpu32
> programs compilation :
> 	relocation truncated to fit: R_68K_PLT16
> See attachment.


Great,  is this to make msep-data/shared-library options work ?
I knew of problems in this area for cpu32.


> - I wonder why, if I compile a standalone client program with :
> 
> 	make "CC=m68k-elf-gcc -v -m5307 -msep-data -Wl,-elf2flt" hello
> 
> it finds crt0.o, but fails with :
> 
> 	hello.elf2flt: In function `_start':
> 	hello.elf2flt(.text+0x8): undefined reference to `__uClibc_main'


The m68k-elf tools have always needed a '-lc'.  I haven't added it into
the specs file as a lot of people use these tools for embedded (non
linux) development and libc may not be appropriate.  I know you may use
-nostdlib and -nostartfiles,  but since it has been this way for so long
I haven't wanted to change it.


> In my opinion, if crt0.o is automatically included, and crt0.o requests
> libc.a, then libc.a must also be included.  As we build here a uClibc-
> targetted compiler, I suggest that the build process adds -lc in the
> specs file.  I have added '-lc' in the 'lib' field of the specs
> file.  With that, I get a clean standalone compilation, and no problem for
> the link of linux itself, because linux is not linked by gcc itself, but
> directly by ld.

Thanks for the feedback,  I will include you patch in the next tools
release,

Thanks,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security



More information about the uClinux-dev mailing list