freemint / m68k-atari-mint-gcc

Fork of GNU's gcc with support for the m68k-atari-mint target
https://github.com/freemint/m68k-atari-mint-gcc/wiki
Other
26 stars 7 forks source link

New multilib: 68000, 68030, 68030/m68881, 68060, 5475 #15

Open mikrosk opened 3 years ago

mikrosk commented 3 years ago

Making m68030 soft-float and m68060 hard-float by default required some creative thinking. This MR enables following multilib paths:

m68k-atari-mint-gcc -print-file-name=libgcc.a                   libgcc.a

m68k-atari-mint-gcc -m68000 -print-file-name=libgcc.a               libgcc.a
m68k-atari-mint-gcc -m68000 -msoft-float -print-file-name=libgcc.a      libgcc.a
m68k-atari-mint-gcc -m68000 -mhard-float -print-file-name=libgcc.a      libgcc.a
m68k-atari-mint-gcc -m68000 -m68881 -print-file-name=libgcc.a           libgcc.a

m68k-atari-mint-gcc -m68030 -print-file-name=libgcc.a               m68020/libgcc.a
m68k-atari-mint-gcc -m68030 -msoft-float -print-file-name=libgcc.a      m68020/libgcc.a
m68k-atari-mint-gcc -m68030 -mhard-float -print-file-name=libgcc.a      m68020/m68881/libgcc.a
m68k-atari-mint-gcc -m68030 -m68881 -print-file-name=libgcc.a           m68020/m68881/libgcc.a

m68k-atari-mint-gcc -m68020-60 -print-file-name=libgcc.a            m68020/libgcc.a
m68k-atari-mint-gcc -m68020-60 -msoft-float -print-file-name=libgcc.a       m68020/libgcc.a
m68k-atari-mint-gcc -m68020-60 -mhard-float -print-file-name=libgcc.a       m68020/m68881/libgcc.a
m68k-atari-mint-gcc -m68020-60 -m68881 -print-file-name=libgcc.a        m68020/m68881/libgcc.a

m68k-atari-mint-gcc -m68040 -print-file-name=libgcc.a               m68060/libgcc.a
m68k-atari-mint-gcc -m68040 -msoft-float -print-file-name=libgcc.a      libgcc.a
m68k-atari-mint-gcc -m68040 -mhard-float -print-file-name=libgcc.a      m68060/libgcc.a
m68k-atari-mint-gcc -m68040 -m68881 -print-file-name=libgcc.a           m68060/libgcc.a

m68k-atari-mint-gcc -m68060 -print-file-name=libgcc.a               m68060/libgcc.a
m68k-atari-mint-gcc -m68060 -msoft-float -print-file-name=libgcc.a      libgcc.a
m68k-atari-mint-gcc -m68060 -mhard-float -print-file-name=libgcc.a      m68060/libgcc.a
m68k-atari-mint-gcc -m68060 -m68881 -print-file-name=libgcc.a           m68060/libgcc.a

(+ mshort variants)

m68020 is used because that is what gcc uses by default also in other m68k targets and that CPU ~ "^m68020" check is based on ISA, not CPU name and I wanted to change as little as possible against upstream.

I have also added mapping mcpu.5475=mcpu.5475/m68881 so -mcpu=5475 -mhard-float wont default into /usr/lib/lib*.a.

I'm not going to publish this anytime soon, I plan to backport also other m68k changes from gcc >= 8, too. Plus, if approved, we need to update mintlib & friends (see also freemint/fdlibm#4).

Fixes #1.