This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Need help with -m68060 switch on egcs-1.1b




On Tue, 1 Dec 1998, Kirk Hobart wrote:

> At 06:14 PM 12/1/98 -0500, Quality Quorum wrote:
> >
> >It bad code is in lib, then it worth checking multilib configuration - 
> >gcc does not bark at all if required -m oprtion has multilib support
> >it just links something silently.
> >
> >Aleksey
> 
> 
> That's an interesting point. Where can I find documentation on the multilib
> config process?
> 
> The bad 68060 opcodes occur in library functions such as sprintf, and also
> in my own functions. The compiler emits them even with -m68060, so I must
> somehow fix the compiler before re-building the libs.
> 

This one is relatively simple:

1. Look at which gcc/config/m68k/t-* files is used by your configuration.
   You can do it by looking at gcc/Makefile generated by configure
   macro tmake_file points to this file.

2. Look at this file and examine its multilib options. Below is 
   gcc/config/m68k/t-m68kbare:

CROSS_LIBGCC1 = libgcc1-asm.a
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

# These are really part of libgcc1, but this will cause them to be
# built correctly, so...
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 = m68000/m68020/m5200/mcpu32 m68881/msoft-float
MULTILIB_DIRNAMES =
MULTILIB_MATCHES = m68000=mc68000 m68000=m68302 mcpu32=m68332 \
m68020=mc68020 m68020=m68040 m68020=m68060
MULTILIB_EXCEPTIONS = m68000/msoft-float m5200/m68881 m5200/msoft-float \
mcpu32/m68881 mcpu32/msoft-float

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

As one can see m68060 is not part of the picture: so what you have do
is to delete all stuff you do not need and add all stuff you need
(the less stuff you have the faster tool compilation is going).

You have to understand multilib options to do editing right, they
are described in gcc-info. 
 

> I wish someone else would confirm this compiler bug before I start a
> difficult journey. This is my first experience with gcc source, makefiles,
> configure scripts (gag!), and Linux.
> 
> Thanks!
> --
> Kirk Hobart   Santa Barbara, California   hobart@rain.org
> 

Thanks,

Aleksey


_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.