m68k problem and libstdc++
Craig Rodrigues
rodrigc@mediaone.net
Thu Jan 3 20:23:00 GMT 2002
On Thu, Jan 03, 2002 at 05:52:32PM -0800, Richard Henderson wrote:
> On Thu, Jan 03, 2002 at 07:55:03PM -0500, Craig Rodrigues wrote:
> > I'm not a 68000 asm expert. Does anyone have an idea as
> > to what the fix could be?
>
> Some preprocessor hackery and or configure hackery.
>
> Virtually all real operating systems don't support anything less
> than 68020, because that's the first one that had a built-in mmu.
OK, the failing targets are: m68k-aout and m68k-rtems.
Now, according to config/m68k/m68k-none.h, the
TARGET_CPU_DEFAULT macro should by default be set to 68020, and
this should set ASM_CPU_DEFAULT_SPEC to "-mc68020"
which would invoke the GNU assembler with the flag to
tell it to use the 68020 instructions.
However, according to the problem report, -m68000 is being passed
to the assembler.
The place where TARGET_CPU_DEFAULT is defined does not
look correct.
I think it should be moved around, to *AFTER* where
M68K_CPU_m68k is defined. Does this look right?
Index: m68k-none.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k-none.h,v
retrieving revision 1.3
diff -u -r1.3 m68k-none.h
--- m68k-none.h 1998/12/16 21:06:54 1.3
+++ m68k-none.h 2002/01/04 04:20:36
@@ -20,11 +20,6 @@
#include "m68k/m68k.h"
-/* Default to m68k (m68020). */
-#ifndef TARGET_CPU_DEFAULT
-#define TARGET_CPU_DEFAULT M68K_CPU_m68k
-#endif
-
/* These are values set by the configure script in TARGET_CPU_DEFAULT.
They are ((desired value for TARGET_DEFAULT) << 4) + sequential integer.
See m68k.h for the values (it should really define MASK_FOO so we can
@@ -37,6 +32,11 @@
#define M68K_CPU_m68040 ((01007 << 4) + 4)
#define M68K_CPU_m68302 ((0 << 4) + 5)
#define M68K_CPU_m68332 ((1 << 4) + 6)
+
+/* Default to m68k (m68020). */
+#ifndef TARGET_CPU_DEFAULT
+#define TARGET_CPU_DEFAULT M68K_CPU_m68k
+#endif
/* This is tested for below, so if target wants to override this, it
just set this first in cover file. */
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
More information about the Libstdc++
mailing list