public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Franzi Edo." <edo.franzi@ukos.ch>
To: crossgcc@sourceware.org
Subject: gcc-4.3.3 and coldfire
Date: Sun, 21 Jun 2009 10:39:00 -0000	[thread overview]
Message-ID: <FE4757BE-FDD9-4DF1-9BE2-57E3BB62B5EC@ukos.ch> (raw)

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

             reply	other threads:[~2009-06-21 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 10:39 Franzi Edo. [this message]
2009-06-22 21:41 ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FE4757BE-FDD9-4DF1-9BE2-57E3BB62B5EC@ukos.ch \
    --to=edo.franzi@ukos.ch \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).