Port-sun2 archive

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

Re: Non "new-toolchain" platforms



On Sun, Jan 27, 2002 at 09:28:53PM -0500, Matt Fredette wrote:

 > Oh yeah, right, I forgot about my config/m68k/netbsd-m68000-elf.h.
 > FWIW here's what I use:

BTW, I've committed the following patch to our in-tree GCC 2.95.3.  It
is a back-port of my GCC-current m68010-*-netbsdelf*|m68k-*-netbsdelf*
configuration.

-- 
        -- Jason R. Thorpe <thorpej%wasabisystems.com@localhost>
Index: configure
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/gcc/configure,v
retrieving revision 1.15
diff -c -r1.15 configure
*** configure   2001/12/15 02:18:26     1.15
--- configure   2002/01/28 21:06:42
***************
*** 2932,2938 ****
        hppa*-*-*)
                cpu_type=pa
                ;;
!       m68000-*-*)
                cpu_type=m68k
                ;;
        mips*-*-*)
--- 2932,2938 ----
        hppa*-*-*)
                cpu_type=pa
                ;;
!       m680[01]0-*-*)
                cpu_type=m68k
                ;;
        mips*-*-*)
***************
*** 4380,4385 ****
--- 4380,4393 ----
                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
                ;;
Index: configure.in
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/gcc/configure.in,v
retrieving revision 1.15
diff -c -r1.15 configure.in
*** configure.in        2001/12/15 02:18:26     1.15
--- configure.in        2002/01/28 21:06:56
***************
*** 498,504 ****
        hppa*-*-*)
                cpu_type=pa
                ;;
!       m68000-*-*)
                cpu_type=m68k
                ;;
        mips*-*-*)
--- 498,506 ----
        hppa*-*-*)
                cpu_type=pa
                ;;
! changequote(,)dnl
!       m680[01]0-*-*)
! changequote([,])dnl
                cpu_type=m68k
                ;;
        mips*-*-*)
***************
*** 2054,2059 ****
--- 2056,2069 ----
                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
                ;;
Index: config/m68k/netbsd-elf.h
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h,v
retrieving revision 1.3
diff -c -r1.3 netbsd-elf.h
*** config/m68k/netbsd-elf.h    2001/12/20 18:14:35     1.3
--- config/m68k/netbsd-elf.h    2002/01/28 21:06:59
***************
*** 32,48 ****
  #define NETBSD_ELF
  #include <netbsd.h>
  
! /* 68020 with 68881 */
! #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
  
  #define bsd4_4
  #undef HAS_INIT_SECTION
  
  #undef CPP_SPEC
! #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} 
%{posix:-D_POSIX_SOURCE}"
  
  #undef ASM_SPEC
! #define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
  
  /* Provide a set of pre-definitions and pre-assertions appropriate for
     the m68k running svr4.  */
--- 32,90 ----
  #define NETBSD_ELF
  #include <netbsd.h>
  
! /* 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 \
!   "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"
  
+ 
  #undef ASM_SPEC
! #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.  */


Home | Main Index | Thread Index | Old Index