[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Binutils 2.20 and GCC 4.4.2 native
Hello all,
I just finished compiling binutils and gcc as cross tools. I have
slightly modified again the patch, to have the m68020 multilib target
(020 without fpu). I removed mshort from it as it's useless for my
usage.
I just tried compiling SDL for Coldfire with it. Damn, I put so much
m68k inlined code there, that is not supported by Coldfire CPUs :).
--
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Spécialité: Développement, jeux
diff -Naur gcc-4.4.2-orig/gcc/config/m68k/m68k.c gcc-4.4.2/gcc/config/m68k/m68k.c
--- gcc-4.4.2-orig/gcc/config/m68k/m68k.c 2008-11-19 17:24:10.000000000 +0100
+++ gcc-4.4.2/gcc/config/m68k/m68k.c 2009-11-05 18:34:59.000000000 +0100
@@ -270,8 +270,9 @@
generated 68881 code for 68020 and 68030 targets unless explicitly told
not to. */
#define FL_FOR_isa_20 (FL_FOR_isa_10 | FL_ISA_68020 \
- | FL_BITFIELD | FL_68881)
-#define FL_FOR_isa_40 (FL_FOR_isa_20 | FL_ISA_68040)
+ | FL_BITFIELD)
+#define FL_FOR_isa_20fpu (FL_FOR_isa_20 | FL_68881)
+#define FL_FOR_isa_40 (FL_FOR_isa_20fpu | FL_ISA_68040)
#define FL_FOR_isa_cpu32 (FL_FOR_isa_10 | FL_ISA_68020)
/* Base flags for ColdFire ISAs. */
@@ -355,8 +356,8 @@
{ "68000", m68000, NULL, u68000, isa_00, FL_FOR_isa_00 },
{ "68010", m68010, NULL, u68010, isa_10, FL_FOR_isa_10 },
{ "68020", m68020, NULL, u68020, isa_20, FL_FOR_isa_20 },
- { "68020-40", m68020, NULL, u68020_40, isa_20, FL_FOR_isa_20 },
- { "68020-60", m68020, NULL, u68020_60, isa_20, FL_FOR_isa_20 },
+ { "68020-40", m68020, NULL, u68020_40, isa_20, FL_FOR_isa_20fpu },
+ { "68020-60", m68020, NULL, u68020_60, isa_20, FL_FOR_isa_20fpu },
{ "68030", m68030, NULL, u68030, isa_20, FL_FOR_isa_20 },
{ "68040", m68040, NULL, u68040, isa_40, FL_FOR_isa_40 },
{ "68060", m68060, NULL, u68060, isa_40, FL_FOR_isa_40 },
@@ -581,6 +582,9 @@
{
m68k_tune = m68k_tune_entry->microarch;
m68k_tune_flags = m68k_tune_entry->flags;
+
+ if (m68k_tune_flags & (FL_68881 | FL_CF_FPU))
+ target_flags |= MASK_HARD_FLOAT;
}
#ifdef M68K_DEFAULT_TUNE
else if (!m68k_cpu_entry && !m68k_arch_entry)
diff -Naur gcc-4.4.2-orig/gcc/config/m68k/t-mint gcc-4.4.2/gcc/config/m68k/t-mint
--- gcc-4.4.2-orig/gcc/config/m68k/t-mint 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.4.2/gcc/config/m68k/t-mint 2009-11-06 17:56:09.000000000 +0100
@@ -0,0 +1,37 @@
+#
+# Use multiple libraries
+#
+
+MULTILIB_OPTIONS = m68020/m68020-60/mcpu=5475
+
+MULTILIB_DIRNAMES = m68020 m68020-60 m5475
+
+MULTILIB_MATCHES = \
+ m68020=m68030 \
+ m68020=mcpu?68020 \
+ m68020=mcpu?68030 \
+ m68020=march?68020 \
+ m68020=march?68030 \
+ m68020-60=m68881 \
+ m68020-60=m68020-40 \
+ m68020-60=m68040 \
+ m68020-60=m68060 \
+ m68020-60=mcpu?68040 \
+ m68020-60=mcpu?68060 \
+ m68020-60=march?68040 \
+ m68020-60=march?68060 \
+ mcpu?5475=mcpu?5471 \
+ mcpu?5475=mcpu?5472 \
+ mcpu?5475=mcpu?5473 \
+ mcpu?5475=mcpu?5474 \
+ mcpu?5475=mcpu?547x \
+ mcpu?5475=mcpu?5480 \
+ mcpu?5475=mcpu?5481 \
+ mcpu?5475=mcpu?5482 \
+ mcpu?5475=mcpu?5483 \
+ mcpu?5475=mcpu?5484 \
+ mcpu?5475=mcpu?5485 \
+ mcpu?5475=mcpu?548x
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib