gcc-4.3.3 and coldfire

Franzi Edo. edo.franzi@ukos.ch
Sun Jun 21 10:39:00 GMT 2009


Hi All,
I am trying to move from the gcc-4.2.4 to the gcc-4.3.3 version. I  
would like to generate compiler versions for cpu32 and for coldfire  
(m5234).
My toolchain running with the 4.2.4 works fine for both cpus. The  
version 4.3.3 works fine only for cpu32, and I noticed that something  
is wrong with the library location. I had to change the file t-m68kelf  
in order to have a multilib and to have a fPIC libraries. Here is the  
t-m68kelf that works fine for the 4.2.4 version:

LIB1ASMSRC = m68k/lb1sf68.asm
LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
    _double _float _floatex \
    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2

LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c

fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
	cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c
xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
	echo '#define EXTFLOAT' > xfgnulib.c
	cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c

MULTILIB_OPTIONS = m528x/mcpu32 m68881/msoft-float
MULTILIB_OPTIONS += fPIC
MULTILIB_DIRNAMES =
MULTILIB_MATCHES = mcpu32=m68332
MULTILIB_EXCEPTIONS = m528x/m68881 m528x/msoft-float \
		    mcpu32/m68881 mcpu32/msoft-float
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

Here is the same file I modified for the version 4.3.3

LIB1ASMSRC = m68k/lb1sf68.asm
LIB1ASMFUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
    _double _float _floatex \
    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2

LIB2FUNCS_EXTRA = fpgnulib.c xfgnulib.c

fpgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
	cp $(srcdir)/config/m68k/fpgnulib.c fpgnulib.c
xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c
	echo '#define EXTFLOAT' > xfgnulib.c
	cat $(srcdir)/config/m68k/fpgnulib.c >> xfgnulib.c

# Custom multilibs for uKOS

M68K_MLIB_CPU += && (match(MLIB, "^68") \
		     || MLIB == "cpu32" \
		     || MLIB == "5206" \
		     || MLIB == "5235" \
		     || MLIB == "528x")

M68K_MLIB_DIRNAMES = msoft-float fPIC
M68K_MLIB_OPTIONS = msoft-float fPIC
MULTILIB_DIRNAMES = msoft-float fPIC
MULTILIB_OPTIONS = msoft-float fPIC
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

Now, when I compile for cpu32 in the .map file I can see that gcc  
points to the right libraries, but this is not the case for the  
coldfire version:
Here is what I get:

OK for cpu32:
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/ 
4.3.3/../../../../m68k-elf/lib/mcpu32/fPIC/libc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/4.3.3/ 
mcpu32/fPIC/libgcc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/ 
4.3.3/../../../../m68k-elf/lib/mcpu32/fPIC/libc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/4.3.3/ 
mcpu32/fPIC/libgcc.a

Not OK for coldfire:
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/ 
4.3.3/../../../../m68k-elf/lib/libc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/4.3.3/ 
m5206/fPIC/libgcc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/ 
4.3.3/../../../../m68k-elf/lib/libc.a
LOAD /Users/Shared/cross/gcc-4.3.3/m68k-elf/lib/gcc/m68k-elf/4.3.3/ 
m5206/fPIC/libgcc.a
  Here, in the first and the third line the m5206 is missed. Another  
problem is that gcc wants to use the m5206 instead of the m528x as  
forced in the makefile.

Any ideas for helping me with the coldfire cores?
Regards
   Edo.



--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list