Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/gcc Add support for m68010-*-netbsdelf* u...



details:   https://anonhg.NetBSD.org/src/rev/f8b500614130
branches:  trunk
changeset: 521337:f8b500614130
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jan 28 21:10:51 2002 +0000

description:
Add support for m68010-*-netbsdelf* using the existing m68k/netbsd-elf
configuration.

diffstat:

 gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h |  50 +++++++++++++++++++++++--
 gnu/dist/toolchain/gcc/configure                |  10 ++++-
 gnu/dist/toolchain/gcc/configure.in             |  12 +++++-
 3 files changed, 66 insertions(+), 6 deletions(-)

diffs (123 lines):

diff -r 69d6b729dbfd -r f8b500614130 gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h
--- a/gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h   Mon Jan 28 19:57:00 2002 +0000
+++ b/gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h   Mon Jan 28 21:10:51 2002 +0000
@@ -32,17 +32,59 @@
 #define NETBSD_ELF
 #include <netbsd.h>
 
-/* 68020 with 68881 */
-#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
+/* Default target comes from config.gcc */
+#undef TARGET_DEFAULT  
+#define TARGET_DEFAULT TARGET_CPU_DEFAULT 
 
 #define bsd4_4
 #undef HAS_INIT_SECTION
 
+
+#define EXTRA_SPECS \
+  { "cpp_cpu_default_spec", CPP_CPU_DEFAULT_SPEC }, \
+  { "cpp_cpu_spec",         CPP_CPU_SPEC }, \
+  { "cpp_fpu_spec",         CPP_FPU_SPEC }, \
+  { "asm_default_spec",     ASM_DEFAULT_SPEC },
+
+
+#define CPP_CPU_SPEC \
+  "%{m68010:-D__mc68010__} \
+   %{m68020:-D__mc68020__} \
+   %{m68030:-D__mc68030__} \
+   %{m68040:-D__mc68040__} \
+   %(cpp_cpu_default_spec)"
+
+
+#undef TARGET_VERSION
+#if TARGET_DEFAULT & MASK_68020
+#define TARGET_VERSION fprintf (stderr, " (NetBSD/m68k ELF)");
+#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68020__}"
+#define ASM_DEFAULT_SPEC "%{!m680*:-m68020}"
+#else
+#define TARGET_VERSION fprintf (stderr, " (NetBSD/68010 ELF)");
+#define CPP_CPU_DEFAULT_SPEC "%{!m680*:-D__mc68010__}"
+#define ASM_DEFAULT_SPEC "%{!m680*:-m68010}" 
+#endif
+
+
+#if TARGET_DEFAULT & MASK_68881
+#define CPP_FPU_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__}"
+#else
+#define CPP_FPU_SPEC "%{m68881:-D__HAVE_68881__ -D__HAVE_FPU__}"
+#endif
+
+
 #undef CPP_SPEC
-#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC \
+  "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"
+
 
 #undef ASM_SPEC
-#define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
+#define ASM_SPEC \
+  " %| %(asm_default_spec) \
+    %{m68010} %{m68020} %{m68030} %{m68040} %{m68060} \
+    %{fpic:-k} %{fPIC:-k -K}"
+
 
 /* Provide a set of pre-definitions and pre-assertions appropriate for
    the m68k running svr4.  */
diff -r 69d6b729dbfd -r f8b500614130 gnu/dist/toolchain/gcc/configure
--- a/gnu/dist/toolchain/gcc/configure  Mon Jan 28 19:57:00 2002 +0000
+++ b/gnu/dist/toolchain/gcc/configure  Mon Jan 28 21:10:51 2002 +0000
@@ -2932,7 +2932,7 @@
        hppa*-*-*)
                cpu_type=pa
                ;;
-       m68000-*-*)
+       m680[01]0-*-*)
                cpu_type=m68k
                ;;
        mips*-*-*)
@@ -4380,6 +4380,14 @@
                float_format=m68k
                ;;
        m68*-*-netbsdelf*)
+                case $machine in
+                  m68010-*) 
+                   target_cpu_default="0"
+                    ;;
+                  *)
+                   target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
+                    ;;
+                esac
                float_format=m68k
                gas=yes gnu_ld=yes
                ;;
diff -r 69d6b729dbfd -r f8b500614130 gnu/dist/toolchain/gcc/configure.in
--- a/gnu/dist/toolchain/gcc/configure.in       Mon Jan 28 19:57:00 2002 +0000
+++ b/gnu/dist/toolchain/gcc/configure.in       Mon Jan 28 21:10:51 2002 +0000
@@ -498,7 +498,9 @@
        hppa*-*-*)
                cpu_type=pa
                ;;
-       m68000-*-*)
+changequote(,)dnl
+       m680[01]0-*-*)
+changequote([,])dnl
                cpu_type=m68k
                ;;
        mips*-*-*)
@@ -2054,6 +2056,14 @@
                float_format=m68k
                ;;
        m68*-*-netbsdelf*)
+               case $machine in
+                 m68010-*)
+                   target_cpu_default="0"
+                   ;;
+                 *)
+                   target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
+                   ;;
+               esac
                float_format=m68k
                gas=yes gnu_ld=yes
                ;;



Home | Main Index | Thread Index | Old Index