Help:Question about m68k-coff gcc-lib and newlib?

J. Johnston
Thu Mar 22 11:15:00 GMT 2001

> Cliff Tsai wrote:
> Hi:
>     After build m68k-coff,I found there are following dirs and files under
> \m68k-coff\lib\gcc-lib\m68k-coff\2.95.2
>     \m5200\ligcc.a
>     \m68000\libgcc.a
>     \mcpu32libgcc.a
>     \msoft-float\libgcc.a
>     (*)libgcc.a
>      .
>      .
>   Question:
>     (1) I don't know the /msoft-float/libgcc.a  is for what kind of cpu(m68k,m5200,mcpu32...)
>     (2) the (*)libgcc.a is for what kind of cpu?

It is the default for the configuration (i.e. no multilib options specified).  You will have to ask
the gcc folks.  The /msoft-float/libgcc.a is used when only -msoft-float is specified.

>     (3) How to change the configuration:
>         I've found t-m68kbare,t-m68kelf,t-mot3300....under gcc\config\m68k.
>         For example in t-m68kbare:
>         MULTILIB_OPTIONS = m68000/m68020/m5200/mcpu32 m68881/msoft-float
>         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
>              .......
>        Do I need to write my own t-m68kcoff?

No.  Look at config.gcc (if you have a newer port) or which ties the configuration
triple to the t-xxxxx file.  You will see a couple of m68xx-coff set ups which refer to t-xxxx files
already in place.
>     (4) When build m68k-coff-gcc,what t-*** file does it use to configure it's gcc-lib

See the answer to the previous question.

You can find out more information regarding MULTILIB variables in the gcc info files.  If you have
further questions, please contact the gcc mailing list as this forum should only be for newlib

>     (5) When configure newlib for m68k.Does it use the same t-*** file as in (4) ?

Yes, indirectly.  Newlib and other target libraries call the compiler with the -print-multi-lib
option to get at the stuff that is in the MULTILIB_xxxx variables.  See which gets
called to calculate the multilib directories and options at configuration time.

-- Jeff J.

More information about the Newlib mailing list