Index: src/common/lib/libc/arch/m68k/gen/divsi3.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/common/lib/libc/arch/m68k/gen/divsi3.S,v
retrieving revision 1.5
diff -u -p -r1.5 divsi3.S
--- src/common/lib/libc/arch/m68k/gen/divsi3.S  7 Sep 2013 19:06:29 -0000       1.5
+++ src/common/lib/libc/arch/m68k/gen/divsi3.S  25 Jan 2015 22:43:41 -0000
@@ -44,14 +44,35 @@
#endif /* LIBC_SCCS and not lint */

/* int / int */
-#ifndef __mc68010__
ENTRY(__divsi3)
+#ifndef __mc68010__
       movel   4(%sp),%d0
       divsl   8(%sp),%d0
       rts
-END(__divsi3)
#else
-ENTRY(__divsi3)
+
+#ifdef __PIC__
+       movel   8(%sp), %d0     | load the divisor
+       bpl     2f
+       negl    %d0
+2:     movel   %d0,-(%sp)      | store abs(divisor)
+
+       movel   8(%sp), %d1     | load the dividend
+       bpl     1f
+       negl    %d1
+1:     movel   %d1,-(%sp)      | store abs(dividend)
+
+       eorl    %d1, %d0
+       bpl     3f              | branch if sgn(divisor) == sgn(dividend)
+       PIC_CALL(_C_LABEL(__udivsi3))
+       addq    #8,%sp
+       negl    %d0             | negate quotient
+       rts
+3:
+       PIC_CALL(_C_LABEL(__udivsi3))
+       addq    #8,%sp
+       rts
+#else
| NB: this requires that __udivsi3 preserve %a0:
       movel   4(%sp), %d1     | load the dividend
       bpl     1f
@@ -66,5 +87,6 @@ ENTRY(__divsi3)
3:     jmp     _C_LABEL(__udivsi3)
.Lret: negl    %d0             | negate quotient
       jmp     (%a0)
-END(__divsi3)
+#endif
#endif /* __mc68010__ */
+END(__divsi3)
Index: src/common/lib/libc/arch/m68k/gen/modsi3.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/common/lib/libc/arch/m68k/gen/modsi3.S,v
retrieving revision 1.7
diff -u -p -r1.7 modsi3.S
--- src/common/lib/libc/arch/m68k/gen/modsi3.S  4 Mar 2014 04:03:49 -0000       1.7
+++ src/common/lib/libc/arch/m68k/gen/modsi3.S  25 Jan 2015 22:43:41 -0000
@@ -44,8 +44,8 @@
#endif /* LIBC_SCCS and not lint */

/* int % int */
-#ifndef __mc68010__
ENTRY(__modsi3)
+#ifndef __mc68010__
       movel   4(%sp),%d1
#ifdef __mcoldfire__
       remsl   8(%sp),%d0:%d1
@@ -54,9 +54,32 @@ ENTRY(__modsi3)
       divsll  8(%sp),%d0:%d1
#endif
       rts
-END(__modsi3)
#else
-ENTRY(__modsi3)
+#ifdef __PIC__
+| NB: this requires that __udivsi3 returns the modulus in %d1:
+       movel   8(%sp), %d1     | load the divisor
+       bpl     1f
+       negl    %d1
+1:     movel   %d1,-(%sp)      | store abs(divisor)
+
+       movel   8(%sp), %d0     | load the dividend
+       bpl     2f
+       negl    %d0
+       movel   %d0,-(%sp)      | store abs(dividend)
+
+       PIC_CALL(_C_LABEL(__udivsi3))
+       addq    #8,%sp
+       negl    %d1
+       movl    %d1, %d0        | move modulus into %d0
+       rts
+
+2:     movel   %d0,-(%sp)      | store abs(dividend)
+       PIC_CALL(_C_LABEL(__udivsi3))
+       addq    #8,%sp
+       movl    %d1, %d0        | move modulus into %d0
+       rts
+#else
+
| NB: this requires that __udivsi3 preserve %a0 and return
| the modulus in %d1:
       movel   (%sp)+, %a0     | pop return address
@@ -66,11 +89,13 @@ ENTRY(__modsi3)
1:     movel   (%sp), %d0      | load the dividend
       pea     (.Lret,%pc)     | push our return address
       bpl     2f
+
       negl    4(%sp)          | store abs(dividend)
       subql   #2, (%sp)       | adjust return address
2:     jmp     _C_LABEL(__udivsi3)
       negl    %d1             | negate modulus
.Lret: movl    %d1, %d0        | move modulus into %d0
       jmp     (%a0)
-END(__modsi3)
+#endif
#endif /* __mc68010__ */
+END(__modsi3)
Index: src/common/lib/libc/arch/m68k/gen/mulsi3.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/common/lib/libc/arch/m68k/gen/mulsi3.S,v
retrieving revision 1.4
diff -u -p -r1.4 mulsi3.S
--- src/common/lib/libc/arch/m68k/gen/mulsi3.S  16 Jul 2013 23:24:18 -0000      1.4
+++ src/common/lib/libc/arch/m68k/gen/mulsi3.S  1 Feb 2015 16:49:21 -0000
@@ -49,8 +49,6 @@ ENTRY(__mulsi3)
       movel   4(%sp),%d0
       mulsl   8(%sp),%d0
#else
-| NB: this requires that __udivsi3 preserve %a0 and return
-| the modulus in %d1:
       movew   6(%sp), %d0
       movel   %d0, %a0        | save B
       muluw   8(%sp), %d0     | %d0 holds B * C
Index: src/common/lib/libc/arch/m68k/gen/umodsi3.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/common/lib/libc/arch/m68k/gen/umodsi3.S,v
retrieving revision 1.5
diff -u -p -r1.5 umodsi3.S
--- src/common/lib/libc/arch/m68k/gen/umodsi3.S 4 Mar 2014 06:15:33 -0000       1.5
+++ src/common/lib/libc/arch/m68k/gen/umodsi3.S 25 Jan 2015 22:43:41 -0000
@@ -44,8 +44,8 @@
#endif /* LIBC_SCCS and not lint */

/* unsigned % unsigned */
-#ifndef __mc68010__
ENTRY(__umodsi3)
+#ifndef __mc68010__
       movel   4(%sp),%d1
#ifdef __mcoldfire__
       remul   8(%sp),%d0:%d1
@@ -54,14 +54,22 @@ ENTRY(__umodsi3)
       divull  8(%sp),%d0:%d1
#endif
       rts
-END(__umodsi3)
#else
-ENTRY(__umodsi3)
+#ifdef __PIC__
+| NB: this requires that __udivsi3 returns the modulus in %d1:
+       movel   8(%sp),-(%sp)
+       movel   8(%sp),-(%sp)
+       PIC_CALL(_C_LABEL(__udivsi3))
+       addq    #8,%sp
+       movel   %d1, %d0        | move the modulus into %d0
+       rts
+#else
| NB: this requires that __udivsi3 preserve the %a0
| register, and that it returns the modulus in %d1:
       movel   (%sp)+, %a0     | pop the return address
       jsr     _C_LABEL(__udivsi3)
       movel   %d1, %d0        | move the modulus into %d0
       jmp     (%a0)           | return
-END(__umodsi3)
+#endif
#endif /* __mc68010__ */
+END(__umodsi3)
Index: src/distrib/sets/lists/comp/mi
===================================================================
RCS file: /home/chs/netbsd/cvs/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1944
diff -u -p -r1.1944 mi
--- src/distrib/sets/lists/comp/mi      26 Jan 2015 00:22:02 -0000      1.1944
+++ src/distrib/sets/lists/comp/mi      1 Feb 2015 01:53:18 -0000
@@ -4123,8 +4123,8 @@
./usr/libexec/f771                             comp-obsolete           gcc=4,obsolete
./usr/libexec/lint1                            comp-c-bin
./usr/libexec/lint2                            comp-c-bin
-./usr/libexec/lto-wrapper                      comp-c-bin              gcc=48,pic
-./usr/libexec/lto1                             comp-c-bin              gcc=48,pic
+./usr/libexec/lto-wrapper                      comp-c-bin              gcc=48,pic,gcccmds
+./usr/libexec/lto1                             comp-c-bin              gcc=48,pic,gcccmds
./usr/libexec/pcpp                             comp-c-bin              pcc
./usr/sbin/config                              comp-obsolete           obsolete
./usr/sbin/config.new                          comp-obsolete           obsolete
Index: src/distrib/sets/lists/comp/shl.mi
===================================================================
RCS file: /home/chs/netbsd/cvs/src/distrib/sets/lists/comp/shl.mi,v
retrieving revision 1.273
diff -u -p -r1.273 shl.mi
--- src/distrib/sets/lists/comp/shl.mi  25 Jan 2015 15:50:30 -0000      1.273
+++ src/distrib/sets/lists/comp/shl.mi  1 Feb 2015 09:47:06 -0000
@@ -46,7 +46,8 @@
./usr/lib/libg++_pic.a                         comp-obsolete           obsolete
./usr/lib/libg2c_pic.a                         comp-fortran-lib        gcc=3,picinstall
./usr/lib/libg2c_pic.a                         comp-obsolete           gcc=4,obsolete
-./usr/lib/libgcc_eh.a                          comp-c-lib              gcccmds
+./usr/lib/libgcc_eh.a                          comp-c-lib              gcc=45
+./usr/lib/libgcc_eh.a                          comp-c-lib              gcc=48
./usr/lib/libgcc_eh_p.a                                comp-c-proflib          obsolete
./usr/lib/libgcc_eh_pic.a                      comp-c-piclib           obsolete
./usr/lib/libgcc_pic.a                         comp-c-lib              gcc=4,picinstall
@@ -123,7 +124,7 @@
./usr/lib/libnpf_pic.a                         comp-npf-piclib         npf,picinstall
./usr/lib/libntp_pic.a                         comp-obsolete           obsolete
./usr/lib/libnvpair_pic.a                      comp-zfs-piclib         zfs,picinstall
-./usr/lib/libobjc_pic.a                                comp-objc-piclib        gcccmds,picinstall
+./usr/lib/libobjc_pic.a                                comp-objc-piclib        picinstall
./usr/lib/libopcodes.so.6                      comp-c-shlib            binutils
./usr/lib/libopcodes.so.6.0                    comp-c-shlib            binutils
./usr/lib/libopenpgpsdk_pic.a                  comp-obsolete           obsolete
@@ -244,7 +245,7 @@
./usr/lib/libssh_pic.a                         comp-c-piclib           crypto,picinstall
./usr/lib/libssl_pic.a                         comp-c-piclib           crypto,picinstall
./usr/lib/libssp_pic.a                         comp-obsolete           obsolete
-./usr/lib/libstdc++_pic.a                      comp-cxx-piclib         cxx,gcccmds,libstdcxx,picinstall
+./usr/lib/libstdc++_pic.a                      comp-cxx-piclib         cxx,libstdcxx,picinstall
./usr/lib/libtddl_pic.a                                comp-c-piclib           tpm,picinstall
./usr/lib/libtelnet_pic.a                      comp-obsolete           obsolete
./usr/lib/libtermcap_pic.a                     comp-c-piclib   picinstall
Index: src/external/gpl3/binutils/dist/bfd/elf32-m68k.c
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/binutils/dist/bfd/elf32-m68k.c,v
retrieving revision 1.5
diff -u -p -r1.5 elf32-m68k.c
--- src/external/gpl3/binutils/dist/bfd/elf32-m68k.c    26 Aug 2014 17:03:51 -0000      1.5
+++ src/external/gpl3/binutils/dist/bfd/elf32-m68k.c    1 Feb 2015 09:18:01 -0000
@@ -614,6 +614,46 @@ static const struct elf_m68k_plt_info el
  elf_cpu32_plt_entry, { 4, 18 }, 10
};

+#define M68000_PLT_ENTRY_SIZE 36
+/* Procedure linkage table entries for m68000/m68008/m68010 */
+static const bfd_byte elf_m68000_plt0_entry[M68000_PLT_ENTRY_SIZE] =
+{
+  0x20, 0x3c,             /* move.l #offset,%d0 */
+  0, 0, 0, 0,             /* + (.got + 4) - . */
+  0x2f, 0x3b, 0x08, 0xfa, /* move.l (-6,%pc,%d0:l),-(%sp) */
+  0x20, 0x3c,             /* move.l #offset,%d0 */
+  0, 0, 0, 0,             /* + (.got + 8) - . */
+  0x22, 0x7b, 0x08, 0xfa, /* move.l (-6,%pc,%d0:l),%a1 */
+  0x4e, 0xd1,             /* jmp (%a1) */
+  0, 0, 0, 0,             /* pad out to 36 bytes.  */
+  0, 0, 0, 0,
+  0, 0, 0, 0,
+  0, 0,
+};
+
+static const bfd_byte elf_m68000_plt_entry[M68000_PLT_ENTRY_SIZE] =
+{
+  0x20, 0x3c,              /* move.l #offset,%d0 */
+  0, 0, 0, 0,              /* + (.got.plt entry) - . */
+  0x22, 0x7b, 0x08, 0xfa,  /* move.l (-6,%pc,%d0:l),%a1 */
+  0x4e, 0xd1,              /* jmp (%a1) */
+  0x2f, 0x3c,              /* move.l #offset,-(%sp) */
+  0, 0, 0, 0,             /* + reloc index */
+  0x20, 0x3c,              /* move.l #offset,%d0 */
+  0xff, 0xff, 0xff, 0xf8,  /* + .plt - . */
+  0x61, 0x00, 0x00, 0x02,  /* bsr <next insn> */
+  0xd0, 0x9f,              /* addl (%sp)+,%d0 */
+  0x22, 0x40,              /* moveal %d0,%a1 */
+  0x4e, 0xd1,              /* jmp (%a1) */
+  0, 0,                    /* pad out to 36 bytes.  */
+};
+
+static const struct elf_m68k_plt_info elf_m68000_plt_info = {
+  M68000_PLT_ENTRY_SIZE,
+  elf_m68000_plt0_entry, { 2, 12 },
+  elf_m68000_plt_entry, { 2, 20 }, 12
+};
+
/* The m68k linker needs to keep track of the number of relocs that it
   decides to copy in check_relocs for each symbol.  This is so that it
   can discard PC relative relocs if it doesn't need them when linking
@@ -3059,6 +3099,8 @@ elf_m68k_get_plt_info (bfd *output_bfd)
  unsigned int features;

  features = bfd_m68k_mach_to_features (bfd_get_mach (output_bfd));
+  if (features & m68000)
+    return &elf_m68000_plt_info;
  if (features & cpu32)
    return &elf_cpu32_plt_info;
  if (features & mcfisa_b)
Index: src/external/gpl3/gcc/dist/gcc/config.gcc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/dist/gcc/config.gcc,v
retrieving revision 1.32
diff -u -p -r1.32 config.gcc
--- src/external/gpl3/gcc/dist/gcc/config.gcc   10 Jan 2015 01:06:41 -0000      1.32
+++ src/external/gpl3/gcc/dist/gcc/config.gcc   25 Jan 2015 22:43:41 -0000
@@ -1775,8 +1775,8 @@ m68010-*-netbsdelf* | m68k-*-netbsdelf*
               ;;
       m68010*)
               target_cpu_default="m68010"
-               tmake_file="m68k/t-m68kelf m68k/t-m68010-netbsd"
               default_m68k_cpu=68010
+               tmake_file="${tmake_file} m68k/t-m68010-netbsd"
               tmake_file="${tmake_file} m68k/t-floatlib"
               ;;
       *)
Index: src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 m68k.c
--- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c   1 Mar 2014 08:43:26 -0000       1.1.1.2
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.c   25 Jan 2015 22:43:41 -0000
@@ -2176,7 +2176,7 @@ m68k_wrap_symbol (rtx x, enum m68k_reloc

  use_x_p = (base_reg == pic_offset_table_rtx) ? TARGET_XGOT : TARGET_XTLS;

-  if (TARGET_COLDFIRE && use_x_p)
+  if (TARGET_68010 || (TARGET_COLDFIRE && use_x_p))
    /* When compiling with -mx{got, tls} switch the code will look like this:

       move.l <X>@<RELOC>,<TEMP_REG>
@@ -2988,7 +2988,7 @@ output_move_simode_const (rtx *operands)
  if (src == 0
      && (DATA_REG_P (dest) || MEM_P (dest))
      /* clr insns on 68000 read before writing.  */
-      && ((TARGET_68010 || TARGET_COLDFIRE)
+      && ((TARGET_68020 || TARGET_COLDFIRE)
         || !(MEM_P (dest) && MEM_VOLATILE_P (dest))))
    return "clr%.l %0";
  else if (GET_MODE (dest) == SImode && valid_mov3q_const (src))
@@ -3040,7 +3040,7 @@ output_move_himode (rtx *operands)
         && (DATA_REG_P (operands[0])
             || GET_CODE (operands[0]) == MEM)
         /* clr insns on 68000 read before writing.  */
-         && ((TARGET_68010 || TARGET_COLDFIRE)
+         && ((TARGET_68020 || TARGET_COLDFIRE)
             || !(GET_CODE (operands[0]) == MEM
                  && MEM_VOLATILE_P (operands[0]))))
       return "clr%.w %0";
@@ -3075,7 +3075,7 @@ output_move_qimode (rtx *operands)

  /* clr and st insns on 68000 read before writing.  */
  if (!ADDRESS_REG_P (operands[0])
-      && ((TARGET_68010 || TARGET_COLDFIRE)
+      && ((TARGET_68020 || TARGET_COLDFIRE)
         || !(GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))))
    {
      if (operands[1] == const0_rtx)
@@ -3109,7 +3109,7 @@ output_move_stricthi (rtx *operands)
{
  if (operands[1] == const0_rtx
      /* clr insns on 68000 read before writing.  */
-      && ((TARGET_68010 || TARGET_COLDFIRE)
+      && ((TARGET_68020 || TARGET_COLDFIRE)
         || !(GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))))
    return "clr%.w %0";
  return "move%.w %1,%0";
@@ -3120,7 +3120,7 @@ output_move_strictqi (rtx *operands)
{
  if (operands[1] == const0_rtx
      /* clr insns on 68000 read before writing.  */
-      && ((TARGET_68010 || TARGET_COLDFIRE)
+      && ((TARGET_68020 || TARGET_COLDFIRE)
          || !(GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))))
    return "clr%.b %0";
  return "move%.b %1,%0";
Index: src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md,v
retrieving revision 1.3
diff -u -p -r1.3 m68k.md
--- src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md  1 Mar 2014 08:58:31 -0000       1.3
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/m68k.md  25 Jan 2015 22:43:41 -0000
@@ -7112,7 +7112,7 @@
    }
  else if (MOTOROLA)
    {
-      if (TARGET_COLDFIRE)
+      if (TARGET_COLDFIRE || TARGET_68010)
       /* Load the full 32-bit PC-relative offset of
          _GLOBAL_OFFSET_TABLE_ into the PIC register, then use it to
          calculate the absolute value.  The offset and "lea"
Index: src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h,v
retrieving revision 1.7
diff -u -p -r1.7 netbsd-elf.h
--- src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h     1 Mar 2014 09:04:12 -0000       1.7
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h     25 Jan 2015 22:43:41 -0000
@@ -91,11 +91,6 @@ along with GCC; see the file COPYING3.
#undef LINK_SPEC
#define LINK_SPEC NETBSD_LINK_SPEC_ELF

-/* NetBSD/sun2 does not support shlibs, avoid using libgcc_pic.  */
-#if TARGET_DEFAULT_CPU == 0
-#undef REAL_LIBGCC_SPEC
-#endif
-
#define NETBSD_ENTRY_POINT "_start"

/* Output assembler code to FILE to increment profiler label # LABELNO
@@ -105,10 +100,10 @@ along with GCC; see the file COPYING3.
#define FUNCTION_PROFILER(FILE, LABELNO)                               \
do                                                                     \
  {                                                                    \
-    if (TARGET_COLDFIRE)                                               \
+    if (TARGET_COLDFIRE || TARGET_68010)                               \
      {                                                                        \
        asm_fprintf (FILE, "\tmovea.l #%LLP%d-.,%Ra1\n", (LABELNO));   \
-        asm_fprintf (FILE, "\tlea (-6,%Rpc,%Ra1),%Ra1\n", (LABELNO));  \
+        asm_fprintf (FILE, "\tlea (-6,%Rpc,%Ra1),%Ra1\n");             \
      }                                                                        \
    else                                                               \
      asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO));     \
Index: src/external/gpl3/gcc/dist/libgcc/config/m68k/lb1sf68.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/dist/libgcc/config/m68k/lb1sf68.S,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 lb1sf68.S
--- src/external/gpl3/gcc/dist/libgcc/config/m68k/lb1sf68.S     1 Mar 2014 08:41:47 -0000       1.1.1.1
+++ src/external/gpl3/gcc/dist/libgcc/config/m68k/lb1sf68.S     25 Jan 2015 22:43:41 -0000
@@ -189,7 +189,20 @@ see the files COPYING3 and COPYING.RUNTI
       .macro PICLEA sym, reg
       movel   #_GLOBAL_OFFSET_TABLE_@GOTPC, \reg
       lea     (-6, pc, \reg), \reg
+#ifdef __mc68010__
+       /*
+        * The GOT offset can be bigger than 16 bits
+        * but mc68010 only has a 16-bit displacement addressing mode,
+        * so use a temp register to load the offset.
+        */
+       movel   a2, sp@-
+       movel   #\sym@GOT, a2
+       addal   a2, \reg
+       movel   sp@+, a2
+       movel   (\reg), \reg
+#else
       movel   \sym@GOT(\reg), \reg
+#endif
       .endm

       .macro PICPEA sym, areg
@@ -199,7 +212,7 @@ see the files COPYING3 and COPYING.RUNTI
       .endm

       .macro PICCALL addr
-#if defined (__mcoldfire__) && !defined (__mcfisab__) && !defined (__mcfisac__)
+#if (defined (__mcoldfire__) && !defined (__mcfisab__) && !defined (__mcfisac__)) || defined(__mc68010__)
       lea     \addr-.-8,a0
       jsr     pc@(a0)
#else
@@ -211,7 +224,7 @@ see the files COPYING3 and COPYING.RUNTI
       /* ISA C has no bra.l instruction, and since this assembly file
          gets assembled into multiple object files, we avoid the
          bra instruction entirely.  */
-#if defined (__mcoldfire__) && !defined (__mcfisab__)
+#if (defined (__mcoldfire__) && !defined (__mcfisab__)) || defined (__mc68010__)
       lea     \addr-.-8,a0
       jmp     pc@(a0)
#else
Index: src/external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk,v
retrieving revision 1.3
diff -u -p -r1.3 defs.mk
--- src/external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk        31 Jan 2015 12:15:24 -0000      1.3
+++ src/external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk        1 Feb 2015 09:21:17 -0000
@@ -11,7 +11,7 @@ G_LIB1ASMSRC=m68k/lb1sf68.S
G_LIB2_DIVMOD_FUNCS=_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
G_LIB2FUNCS_ST=_eprintf __gcc_bcmp
G_LIB2FUNCS_EXTRA=
-G_LIBGCC2_CFLAGS=-O2  -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include    -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
+G_LIBGCC2_CFLAGS=-O2  -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
G_SHLIB_MKMAP=${GNUHOSTDIST}/libgcc/mkmap-symver.awk
G_SHLIB_MKMAP_OPTS=
G_SHLIB_MAPFILES=libgcc-std.ver
Index: src/external/public-domain/sqlite/lib/Makefile
===================================================================
RCS file: /home/chs/netbsd/cvs/src/external/public-domain/sqlite/lib/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- src/external/public-domain/sqlite/lib/Makefile      7 Mar 2014 18:37:48 -0000       1.6
+++ src/external/public-domain/sqlite/lib/Makefile      25 Jan 2015 22:43:41 -0000
@@ -16,6 +16,10 @@ FILESDIR_sqlite3.pc= /usr/lib/pkgconfig

CLEANFILES+=sqlite3.pc

+.if ${MACHINE_ARCH} == "m68000"
+DBG+=          -O1
+.endif
+
.include <bsd.lib.mk>

all: sqlite3.pc
Index: src/lib/csu/arch/m68k/crtbegin.h
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/csu/arch/m68k/crtbegin.h,v
retrieving revision 1.4
diff -u -p -r1.4 crtbegin.h
--- src/lib/csu/arch/m68k/crtbegin.h    27 Jul 2013 13:07:06 -0000      1.4
+++ src/lib/csu/arch/m68k/crtbegin.h    25 Jan 2015 22:43:41 -0000
@@ -30,7 +30,13 @@

__asm( ".pushsection .init"
#ifdef __pic__
+#ifdef __mc68010__
+"\n\t" "movel  #__do_global_ctors_aux - .,%a0"
+"\n\t" "lea    (-8,%pc,%a0),%a0"
+"\n\t" "jsr    (%a0)"
+#else
"\n\t" "bsrl   __do_global_ctors_aux"
+#endif
#else
"\n\t" "jsr    __do_global_ctors_aux"
#endif
@@ -38,7 +44,13 @@ __asm(       ".pushsection .init"

__asm( ".pushsection .fini"
#ifdef __pic__
+#ifdef __mc68010__
+"\n\t" "movel  #__do_global_dtors_aux - .,%a0"
+"\n\t" "lea    (-8,%pc,%a0),%a0"
+"\n\t" "jsr    (%a0)"
+#else
"\n\t" "bsrl   __do_global_dtors_aux"
+#endif
#else
"\n\t" "jsr    __do_global_dtors_aux"
#endif
Index: src/lib/libc/arch/m68k/Makefile.inc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/Makefile.inc,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile.inc
--- src/lib/libc/arch/m68k/Makefile.inc 4 Mar 2014 06:30:40 -0000       1.17
+++ src/lib/libc/arch/m68k/Makefile.inc 25 Jan 2015 22:43:41 -0000
@@ -2,7 +2,11 @@

SRCS+= __sigaction14_sigtramp.c __sigtramp2.S __m68k_read_tp.S __mmap.S

-ASM+=  _lwp_getprivate.S mremap.S
+SRCS+= _lwp_getprivate.S mremap.S
+
+.if ${MACHINE_ARCH} == "m68000"
+SRCS+= mulsi3.S
+.endif

CPPFLAGS+= -I.         # for assym.h

Index: src/lib/libc/arch/m68k/SYS.h
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/SYS.h,v
retrieving revision 1.18
diff -u -p -r1.18 SYS.h
--- src/lib/libc/arch/m68k/SYS.h        24 Jul 2013 15:38:07 -0000      1.18
+++ src/lib/libc/arch/m68k/SYS.h        1 Feb 2015 17:01:59 -0000
@@ -46,6 +46,15 @@
#endif

#define CERROR         _C_LABEL(__cerror)
+#ifdef __mc68010__
+#define JCS_CERROR     jcs     999f
+#define JBRA_CERROR    LEA_LCL(CERROR, %a1) ; jmp (%a1)
+#define CERROR_TRAMP   999: ; JBRA_CERROR
+#else
+#define JCS_CERROR     jcs     CERROR
+#define JBRA_CERROR    jbra    CERROR
+#define CERROR_TRAMP
+#endif

#define _SYSCALL_NOERROR(x,y)                                          \
       ENTRY(x);                                                       \
@@ -53,7 +62,7 @@

#define _SYSCALL(x,y)                                                  \
       _SYSCALL_NOERROR(x,y);                                          \
-       jcs CERROR
+       JCS_CERROR

#define SYSCALL_NOERROR(x)                                             \
       _SYSCALL_NOERROR(x,x)
@@ -69,6 +78,7 @@
#define PSEUDO(x,y)                                                    \
       _SYSCALL(x,y);                                                  \
       rts;                                                            \
+       CERROR_TRAMP;                                                   \
       END(x)

#define RSYSCALL_NOERROR(x)                                            \
Index: src/lib/libc/arch/m68k/gen/Makefile.inc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/Makefile.inc,v
retrieving revision 1.33
diff -u -p -r1.33 Makefile.inc
--- src/lib/libc/arch/m68k/gen/Makefile.inc     18 Mar 2014 18:20:37 -0000      1.33
+++ src/lib/libc/arch/m68k/gen/Makefile.inc     1 Feb 2015 09:51:54 -0000
@@ -21,9 +21,8 @@ SRCS+=        infinityl.c
SRCS+= fpclassifyl.c isfinitel.c isinfl.c isnanl.c signbitl.c
.endif

-SRCS+= ashlsi3.S ashrsi3.S \
-       lshlsi3.S lshrsi3.S \
-       negdf2.S negsf2.S
+SRCS+= ashlsi3.S ashrsi3.S lshlsi3.S lshrsi3.S
+
SRCS+= bswap16.S bswap32.S bswap64.S
SRCS+= _lwp.c
CPPFLAGS._lwp.c        += -D_LIBC_SOURCE
Index: src/lib/libc/arch/m68k/gen/_setjmp.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/_setjmp.S,v
retrieving revision 1.9
diff -u -p -r1.9 _setjmp.S
--- src/lib/libc/arch/m68k/gen/_setjmp.S        16 Jul 2013 22:12:20 -0000      1.9
+++ src/lib/libc/arch/m68k/gen/_setjmp.S        25 Jan 2015 22:43:41 -0000
@@ -85,6 +85,6 @@ ok:
       rts

botch:
-       jbsr    PIC_PLT(_C_LABEL(longjmperror))
+       PIC_CALL(_C_LABEL(longjmperror))
       stop    #0
END(_longjmp)
Index: src/lib/libc/arch/m68k/gen/resumecontext.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/resumecontext.S,v
retrieving revision 1.8
diff -u -p -r1.8 resumecontext.S
--- src/lib/libc/arch/m68k/gen/resumecontext.S  17 Jul 2013 03:04:54 -0000      1.8
+++ src/lib/libc/arch/m68k/gen/resumecontext.S  25 Jan 2015 22:43:41 -0000
@@ -46,16 +46,16 @@ ENTRY(_resumecontext)
       subl    #(4 + UC_SIZE),%sp      /* retaddr preservation + ucontext_t */
       lea     (%sp),%a0
       movl    %a0,-(%sp)
-       jbsr    PIC_PLT(_C_LABEL(_getcontext))
+       PIC_CALL(_C_LABEL(_getcontext))
       movl    (4 + UC_LINK)(%sp),(%sp)        /* uc_link */
       tstl    (%sp)                   /* check for NULL */
       jne     1f
-       jbsr    PIC_PLT(_C_LABEL(exit)) /* cleanly exit(0) */
+       PIC_CALL(_C_LABEL(exit))        /* cleanly exit(0) */
       jmp     2f
-1:     jbsr    PIC_PLT(_C_LABEL(setcontext))
+1:     PIC_CALL(_C_LABEL(setcontext))
       /* NOTREACHED */
       /* But just in case... */
2:     movl    #-1,(%sp)
-       jbsr    PIC_PLT(_C_LABEL(_exit))
+       PIC_CALL(_C_LABEL(_exit))
       /* NOTREACHED */
END(_resumecontext)
Index: src/lib/libc/arch/m68k/gen/setjmp.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/setjmp.S,v
retrieving revision 1.15
diff -u -p -r1.15 setjmp.S
--- src/lib/libc/arch/m68k/gen/setjmp.S 17 Jul 2013 03:05:41 -0000      1.15
+++ src/lib/libc/arch/m68k/gen/setjmp.S 25 Jan 2015 22:43:41 -0000
@@ -60,7 +60,7 @@ ENTRY(__setjmp14)
       lea     -12(%sp),%sp    /* sizeof(stack_t) */
       clrl    (%sp)           /* ss = NULL */
       movl    %sp,4(%sp)      /* oss = stack_t on stack */
-       jbsr    PIC_PLT(_C_LABEL(__sigaltstack14))
+       PIC_CALL(_C_LABEL(__sigaltstack14))

       movl    8(%sp),%d0      /* ss_flags */
       andl    #1,%d0          /* extract SS_ONSTACK */
@@ -75,7 +75,7 @@ ENTRY(__setjmp14)
       pea     SC_MASK(%a0)    /* oset = &sc.sc_mask */
       movl    #0,-(%sp)       /* set = NULL */
       movl    #0,-(%sp)       /* action = 0 <ignored> */
-       jbsr    PIC_PLT(_C_LABEL(__sigprocmask14))
+       PIC_CALL(_C_LABEL(__sigprocmask14))
       addl    #12,%sp

       movl    4(%sp),%a0      /* get jmp_buf pointer again */
Index: src/lib/libc/arch/m68k/gen/sigsetjmp.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/sigsetjmp.S,v
retrieving revision 1.10
diff -u -p -r1.10 sigsetjmp.S
--- src/lib/libc/arch/m68k/gen/sigsetjmp.S      16 Jul 2013 22:12:20 -0000      1.10
+++ src/lib/libc/arch/m68k/gen/sigsetjmp.S      25 Jan 2015 22:43:41 -0000
@@ -63,9 +63,9 @@ ENTRY(__sigsetjmp14)
       movl    %d1,(_JBLEN * 4)(%a0)   /* save at end of area */
       tstl    %d1
       bne     dosig
-       jra     PIC_PLT(_C_LABEL(_setjmp))
+       PIC_JMP(_C_LABEL(_setjmp))
dosig:
-       jra     PIC_PLT(_C_LABEL(__setjmp14))
+       PIC_JMP(_C_LABEL(__setjmp14))
END(__sigsetjmp14)


@@ -73,7 +73,7 @@ ENTRY(__siglongjmp14)
       movl    4(%sp),%a0      /* save area pointer */
       tstl    (_JBLEN * 4)(%a0) /* check mask... */
       bne     didsig
-       jra     PIC_PLT(_C_LABEL(_longjmp))
+       PIC_JMP(_C_LABEL(_longjmp))
didsig:
-       jra     PIC_PLT(_C_LABEL(__longjmp14))
+       PIC_JMP(_C_LABEL(__longjmp14))
END(__siglongjmp14)
Index: src/lib/libc/arch/m68k/gen/swapcontext.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/gen/swapcontext.S,v
retrieving revision 1.6
diff -u -p -r1.6 swapcontext.S
--- src/lib/libc/arch/m68k/gen/swapcontext.S    17 Jul 2013 03:05:17 -0000      1.6
+++ src/lib/libc/arch/m68k/gen/swapcontext.S    25 Jan 2015 22:43:41 -0000
@@ -38,14 +38,14 @@

ENTRY(swapcontext)
       movl    4(%sp),-(%sp)           | push oucp on stack
-       jbsr    PIC_PLT(_C_LABEL(_getcontext))  | getcontext(oucp)
+       PIC_CALL(_C_LABEL(_getcontext)) | getcontext(oucp)
       tstl    %d0                     | OK?
       jne     L1
       movl    (%sp),%a0
       addql   #8,UC_MCONTEXT_SP(%a0)  | adjust saved stack pointer (again)
       movl    %sp@(4),UC_MCONTEXT_PC(%a0) | adjust saved program counter (again)
       movl    12(%sp),(%sp)           | push ucp on stack
-       jbsr    PIC_PLT(_C_LABEL(setcontext))   | setcontext(ucp)
+       PIC_CALL(_C_LABEL(setcontext))  | setcontext(ucp)
L1:    addql   #4,%sp                  | pop ucp
       rts
END(swapcontext)
Index: src/lib/libc/arch/m68k/sys/__clone.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/__clone.S,v
retrieving revision 1.5
diff -u -p -r1.5 __clone.S
--- src/lib/libc/arch/m68k/sys/__clone.S        16 Jul 2013 23:00:15 -0000      1.5
+++ src/lib/libc/arch/m68k/sys/__clone.S        1 Feb 2015 10:03:54 -0000
@@ -53,14 +53,15 @@ ENTRY(__clone)
       clrl    -(%sp)          /* Fake return address */
       SYSTRAP(__clone)        /* Note: `fn' in (a1) is preserved */
       lea     12(%sp),%sp     /* Zap syscall args */
-       jcs     3f              /* Punt if syscall failed */
+       JCS_CERROR              /* Punt if syscall failed */
       tstl    %d0
       jne     1f              /* We're the parent, just return. */
       jsr     (%a1)           /* We're the clone, call the function */
       movl    %d0,-(%sp)      /* If clone returns, invoke _exit(3) */
-       jbsr    PIC_PLT(_C_LABEL(_exit))
+       PIC_CALL(_C_LABEL(_exit))
       /* NOTREACHED */
1:     rts
2:     movl    #EINVAL,%d0
-3:     jbra    CERROR
+3:     JBRA_CERROR
+       CERROR_TRAMP
END(__clone)
Index: src/lib/libc/arch/m68k/sys/__mmap.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/__mmap.S,v
retrieving revision 1.3
diff -u -p -r1.3 __mmap.S
--- src/lib/libc/arch/m68k/sys/__mmap.S 16 Jul 2013 22:19:37 -0000      1.3
+++ src/lib/libc/arch/m68k/sys/__mmap.S 25 Jan 2015 22:43:41 -0000
@@ -33,4 +33,5 @@ _SYSCALL(__mmap,mmap)
       movl    %d0,%a0
#endif
       rts
+       CERROR_TRAMP
END(__mmap)
Index: src/lib/libc/arch/m68k/sys/__vfork14.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/__vfork14.S,v
retrieving revision 1.12
diff -u -p -r1.12 __vfork14.S
--- src/lib/libc/arch/m68k/sys/__vfork14.S      12 Sep 2013 15:36:15 -0000      1.12
+++ src/lib/libc/arch/m68k/sys/__vfork14.S      25 Jan 2015 22:43:41 -0000
@@ -71,7 +71,7 @@ err:
       .globl  _C_LABEL(__errno)
       movl    %a1,-(%sp)
       movl    %d0,-(%sp)
-       jbsr    PIC_PLT(_C_LABEL(__errno))
+       PIC_CALL(_C_LABEL(__errno))
#ifdef __SVR4_ABI__
       movl    (%sp)+,(%a0)
#else
Index: src/lib/libc/arch/m68k/sys/_lwp_getprivate.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/_lwp_getprivate.S,v
retrieving revision 1.3
diff -u -p -r1.3 _lwp_getprivate.S
--- src/lib/libc/arch/m68k/sys/_lwp_getprivate.S        16 Jul 2013 22:19:16 -0000      1.3
+++ src/lib/libc/arch/m68k/sys/_lwp_getprivate.S        1 Feb 2015 10:00:46 -0000
@@ -33,4 +33,5 @@ SYSCALL(_lwp_getprivate)
       movl    %d0,%a0
#endif
       rts
+       CERROR_TRAMP
END(_lwp_getprivate)
Index: src/lib/libc/arch/m68k/sys/brk.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/brk.S,v
retrieving revision 1.19
diff -u -p -r1.19 brk.S
--- src/lib/libc/arch/m68k/sys/brk.S    12 Sep 2013 15:36:15 -0000      1.19
+++ src/lib/libc/arch/m68k/sys/brk.S    25 Jan 2015 22:43:41 -0000
@@ -71,7 +71,7 @@ ENTRY(_brk)
       movl    %a1,4(%sp)
ok:
       SYSTRAP(break)
-       jcs     CERROR
+       JCS_CERROR
#ifdef __PIC__
       LEA_LCL(_C_LABEL(__curbrk),%a0)
       movl    %a1,(%a0)
@@ -80,4 +80,5 @@ ok:
#endif
       clrl    %d0
       rts
+       CERROR_TRAMP
END(_brk)
Index: src/lib/libc/arch/m68k/sys/cerror.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/cerror.S,v
retrieving revision 1.18
diff -u -p -r1.18 cerror.S
--- src/lib/libc/arch/m68k/sys/cerror.S 12 Sep 2013 15:36:15 -0000      1.18
+++ src/lib/libc/arch/m68k/sys/cerror.S 25 Jan 2015 22:43:41 -0000
@@ -51,7 +51,7 @@
_ENTRY(CERROR)
#ifdef _REENTRANT
       movl    %d0,-(%sp)
-       jbsr    PIC_PLT(_C_LABEL(__errno))
+       PIC_CALL(_C_LABEL(__errno))
#ifndef        __SVR4_ABI__
       movl    %d0,%a0
#endif
Index: src/lib/libc/arch/m68k/sys/exect.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/exect.S,v
retrieving revision 1.8
diff -u -p -r1.8 exect.S
--- src/lib/libc/arch/m68k/sys/exect.S  16 Jul 2013 22:20:35 -0000      1.8
+++ src/lib/libc/arch/m68k/sys/exect.S  1 Feb 2015 17:00:57 -0000
@@ -45,6 +45,6 @@
#endif /* LIBC_SCCS and not lint */

ENTRY(exect)
-       SYSTRAP(execve)
-       jbra    CERROR          /* exect(file, argv, env) */
+       SYSTRAP(execve)         /* exect(file, argv, env) */
+       JBRA_CERROR
END(exect)
Index: src/lib/libc/arch/m68k/sys/fork.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/fork.S,v
retrieving revision 1.8
diff -u -p -r1.8 fork.S
--- src/lib/libc/arch/m68k/sys/fork.S   16 Jul 2013 22:15:55 -0000      1.8
+++ src/lib/libc/arch/m68k/sys/fork.S   25 Jan 2015 22:43:41 -0000
@@ -47,4 +47,5 @@ _SYSCALL(__fork,fork)
       subql   #1,%d1  /* from 1 to 0 in child, 0 to -1 in parent */
       andl    %d1,%d0
       rts             /* pid = fork() */
+       CERROR_TRAMP
END(__fork)
Index: src/lib/libc/arch/m68k/sys/getcontext.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/getcontext.S,v
retrieving revision 1.6
diff -u -p -r1.6 getcontext.S
--- src/lib/libc/arch/m68k/sys/getcontext.S     17 Jul 2013 03:01:27 -0000      1.6
+++ src/lib/libc/arch/m68k/sys/getcontext.S     25 Jan 2015 22:43:41 -0000
@@ -46,4 +46,5 @@ _SYSCALL(_getcontext,getcontext)
       movl    %sp@,UC_MCONTEXT_PC(%a0)| adjust saved program counter
       clrl    UC_MCONTEXT_D0(%a0)     | arrange for return value of 0
       rts
+       CERROR_TRAMP
END(_getcontext)
Index: src/lib/libc/arch/m68k/sys/mremap.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/mremap.S,v
retrieving revision 1.3
diff -u -p -r1.3 mremap.S
--- src/lib/libc/arch/m68k/sys/mremap.S 16 Jul 2013 22:15:55 -0000      1.3
+++ src/lib/libc/arch/m68k/sys/mremap.S 1 Feb 2015 10:01:49 -0000
@@ -33,4 +33,5 @@ SYSCALL(mremap)
       movl    %d0,%a0
#endif
       rts
+       CERROR_TRAMP
END(mremap)
Index: src/lib/libc/arch/m68k/sys/pipe.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/pipe.S,v
retrieving revision 1.8
diff -u -p -r1.8 pipe.S
--- src/lib/libc/arch/m68k/sys/pipe.S   16 Jul 2013 22:16:53 -0000      1.8
+++ src/lib/libc/arch/m68k/sys/pipe.S   25 Jan 2015 22:43:41 -0000
@@ -53,4 +53,5 @@ _SYSCALL(_pipe,pipe)
       movl    %d1,(%a0)
       clrl    %d0
       rts
+       CERROR_TRAMP
END(_pipe)
Index: src/lib/libc/arch/m68k/sys/ptrace.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/ptrace.S,v
retrieving revision 1.15
diff -u -p -r1.15 ptrace.S
--- src/lib/libc/arch/m68k/sys/ptrace.S 12 Sep 2013 15:36:15 -0000      1.15
+++ src/lib/libc/arch/m68k/sys/ptrace.S 25 Jan 2015 22:43:41 -0000
@@ -51,7 +51,7 @@

ENTRY(ptrace)
#ifdef _REENTRANT
-       jbsr    PIC_PLT(_C_LABEL(__errno))
+       PIC_CALL(_C_LABEL(__errno))
#ifndef        __SVR4_ABI__
       movl    %d0,%a0
#endif
@@ -66,6 +66,7 @@ ENTRY(ptrace)
#endif /* __PIC__ */
#endif /* _REENTRANT */
       SYSTRAP(ptrace)
-       jcs     CERROR
+       JCS_CERROR
       rts
+       CERROR_TRAMP
END(ptrace)
Index: src/lib/libc/arch/m68k/sys/sbrk.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/sbrk.S,v
retrieving revision 1.17
diff -u -p -r1.17 sbrk.S
--- src/lib/libc/arch/m68k/sys/sbrk.S   24 Jul 2013 15:38:07 -0000      1.17
+++ src/lib/libc/arch/m68k/sys/sbrk.S   25 Jan 2015 22:43:41 -0000
@@ -62,11 +62,12 @@ ENTRY(_sbrk)
       movl    (%a1),%d0
       addl    %d0,4(%sp)
       SYSTRAP(break)
-       jcs     CERROR
+       JCS_CERROR
       movl    (%a1),%d0
       movl    4(%sp),(%a1)
#ifdef __SVR4_ABI__
       movl    %d0,%a0
#endif
       rts
+       CERROR_TRAMP
END(_sbrk)
Index: src/lib/libc/arch/m68k/sys/shmat.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/shmat.S,v
retrieving revision 1.3
diff -u -p -r1.3 shmat.S
--- src/lib/libc/arch/m68k/sys/shmat.S  16 Jul 2013 22:16:53 -0000      1.3
+++ src/lib/libc/arch/m68k/sys/shmat.S  25 Jan 2015 22:43:41 -0000
@@ -33,4 +33,5 @@ SYSCALL(shmat)
       movl    %d0,%a0
#endif
       rts
+       CERROR_TRAMP
END(shmat)
Index: src/lib/libc/arch/m68k/sys/syscall.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/arch/m68k/sys/syscall.S,v
retrieving revision 1.9
diff -u -p -r1.9 syscall.S
--- src/lib/libc/arch/m68k/sys/syscall.S        24 Jul 2013 15:38:07 -0000      1.9
+++ src/lib/libc/arch/m68k/sys/syscall.S        25 Jan 2015 22:43:41 -0000
@@ -46,6 +46,7 @@
ENTRY(syscall)
       clrl    %d0
       trap    #0
-       jcs     CERROR
+       JCS_CERROR
       rts
+       CERROR_TRAMP
END(syscall)
Index: src/lib/libc/compat/arch/m68k/gen/compat_setjmp.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/gen/compat_setjmp.S,v
retrieving revision 1.3
diff -u -p -r1.3 compat_setjmp.S
--- src/lib/libc/compat/arch/m68k/gen/compat_setjmp.S   4 Mar 2014 06:27:00 -0000       1.3
+++ src/lib/libc/compat/arch/m68k/gen/compat_setjmp.S   25 Jan 2015 22:43:41 -0000
@@ -58,10 +58,10 @@ ENTRY(setjmp)
       lea     -12(%sp),%sp    /* space for sigstack args/rvals */
       clrl    (%sp)           /* don't change it... */
       movl    %sp,4(%sp)      /* ...but return the current val */
-       jbsr    PIC_PLT(_C_LABEL(__sigaltstack14))
+       PIC_CALL(_C_LABEL(__sigaltstack14))
                               /* note: flags returned in sp@(8) */
       clrl    (%sp)           /* don't change mask, just return */
-       jbsr    PIC_PLT(_C_LABEL(sigblock)) /*  old value */
+       PIC_CALL(_C_LABEL(sigblock)) /*  old value */
       movl    8(%sp),%d1      /* old flags value */
       andl    #1,%d1          /* extract onstack flag */
       lea     12(%sp),%sp
@@ -92,6 +92,6 @@ ok:
       trap    #1              /* finish via compat_13_sigreturn13() */

botch:
-       jbsr    PIC_PLT(_C_LABEL(longjmperror))
+       PIC_CALL(_C_LABEL(longjmperror))
       stop    #0
END(longjmp)
Index: src/lib/libc/compat/arch/m68k/gen/compat_sigsetjmp.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/gen/compat_sigsetjmp.S,v
retrieving revision 1.3
diff -u -p -r1.3 compat_sigsetjmp.S
--- src/lib/libc/compat/arch/m68k/gen/compat_sigsetjmp.S        18 Mar 2014 18:20:37 -0000      1.3
+++ src/lib/libc/compat/arch/m68k/gen/compat_sigsetjmp.S        25 Jan 2015 22:43:41 -0000
@@ -63,9 +63,9 @@ ENTRY(sigsetjmp)
       movl    %d1,(_JBLEN * 4)(%a0)   /* save at end of area */
       tstl    %d1
       bne     dosig
-       jra     PIC_PLT(_C_LABEL(_setjmp))
+       PIC_JMP(_C_LABEL(_setjmp))
dosig:
-       jra     PIC_PLT(_C_LABEL(setjmp))
+       PIC_JMP(_C_LABEL(setjmp))
END(sigsetjmp)


@@ -73,7 +73,7 @@ ENTRY(siglongjmp)
       movl    4(%sp),%a0      /* save area pointer */
       tstl    (_JBLEN * 4)(%a0) /* check mask... */
       bne     didsig
-       jra     PIC_PLT(_C_LABEL(_longjmp))
+       PIC_JMP(_C_LABEL(_longjmp))
didsig:
-       jra     PIC_PLT(_C_LABEL(longjmp))
+       PIC_JMP(_C_LABEL(longjmp))
END(siglongjmp)
Index: src/lib/libc/compat/arch/m68k/sys/compat_Ovfork.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat_Ovfork.S,v
retrieving revision 1.3
diff -u -p -r1.3 compat_Ovfork.S
--- src/lib/libc/compat/arch/m68k/sys/compat_Ovfork.S   12 Sep 2013 15:36:16 -0000      1.3
+++ src/lib/libc/compat/arch/m68k/sys/compat_Ovfork.S   25 Jan 2015 22:43:41 -0000
@@ -74,7 +74,7 @@ err:
       .globl  _C_LABEL(__errno)
       movl    %a1,-(%sp)
       movl    %d0,-(%sp)
-       jbsr    PIC_PLT(_C_LABEL(__errno))
+       PIC_CALL(_C_LABEL(__errno))
#ifdef __SVR4_ABI__
       movl    (%sp)+,(%a0)
#else
Index: src/lib/libc/compat/arch/m68k/sys/compat___sigreturn14.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat___sigreturn14.S,v
retrieving revision 1.2
diff -u -p -r1.2 compat___sigreturn14.S
--- src/lib/libc/compat/arch/m68k/sys/compat___sigreturn14.S    16 Jul 2013 23:00:15 -0000      1.2
+++ src/lib/libc/compat/arch/m68k/sys/compat___sigreturn14.S    1 Feb 2015 10:09:22 -0000
@@ -43,18 +43,8 @@
#endif
#endif /* LIBC_SCCS and not lint */

-/*
- * We must preserve the state of the registers as the user has set them up.
- */
-#ifdef GPROF
-#undef _PROF_PROLOG
-#define _PROF_PROLOG \
-       .data; 1: .long 0; \
-       .text; INTERRUPT_SAVEREG; LEA_LCL(1b,%a0); jbsr MCOUNT_ENTRY; \
-       INTERRUPT_RESTOREREG
-#endif
-
-ENTRY(__sigreturn14)
+ENTRY_NOPROFILE(__sigreturn14)
       trap    #3              /* special sigreturn syscall entry point */
-       jbra    CERROR
+       JCS_CERROR
+       CERROR_TRAMP
END(__sigreturn14)
Index: src/lib/libc/compat/arch/m68k/sys/compat_sigpending.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat_sigpending.S,v
retrieving revision 1.2
diff -u -p -r1.2 compat_sigpending.S
--- src/lib/libc/compat/arch/m68k/sys/compat_sigpending.S       16 Jul 2013 23:00:15 -0000      1.2
+++ src/lib/libc/compat/arch/m68k/sys/compat_sigpending.S       25 Jan 2015 22:43:41 -0000
@@ -51,4 +51,5 @@ _SYSCALL(sigpending,compat_13_sigpending
       movl    %d0,(%a0)
       clrl    %d0
       rts
+       CERROR_TRAMP
END(sigpending)
Index: src/lib/libc/compat/arch/m68k/sys/compat_sigprocmask.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat_sigprocmask.S,v
retrieving revision 1.4
diff -u -p -r1.4 compat_sigprocmask.S
--- src/lib/libc/compat/arch/m68k/sys/compat_sigprocmask.S      25 Jul 2013 22:08:15 -0000      1.4
+++ src/lib/libc/compat/arch/m68k/sys/compat_sigprocmask.S      25 Jan 2015 22:43:41 -0000
@@ -58,7 +58,7 @@ gotptr:
       movl    (%a0),8(%sp)            /* indirect to new mask arg */
doit:
       SYSTRAP(compat_13_sigprocmask13)
-       jcs     CERROR
+       JCS_CERROR
       tstl    12(%sp)         /* test if old mask requested */
       jeq     out
       movl    12(%sp),%a0
@@ -66,4 +66,5 @@ doit:
out:
       clrl    %d0
       rts
+       CERROR_TRAMP
END(sigprocmask)
Index: src/lib/libc/compat/arch/m68k/sys/compat_sigreturn.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat_sigreturn.S,v
retrieving revision 1.2
diff -u -p -r1.2 compat_sigreturn.S
--- src/lib/libc/compat/arch/m68k/sys/compat_sigreturn.S        16 Jul 2013 23:00:15 -0000      1.2
+++ src/lib/libc/compat/arch/m68k/sys/compat_sigreturn.S        1 Feb 2015 10:08:42 -0000
@@ -43,24 +43,14 @@
#endif
#endif /* LIBC_SCCS and not lint */

-/*
- * We must preserve the state of the registers as the user has set them up.
- */
-#ifdef GPROF
-#undef _PROF_PROLOG
-#define _PROF_PROLOG \
-       .data; 1: .long 0; \
-       .text; INTERRUPT_SAVEREG; LEA_LCL(1b,%a0); jbsr MCOUNT_ENTRY; \
-       INTERRUPT_RESTOREREG
-#endif /* GPROF */
-
WARN_REFERENCES(sigreturn, \
    "warning: reference to compatibility sigreturn()")

/*
 * NOTE: Trap #1 is used for compat_13_sigreturn13 on the m68k!
 */
-ENTRY(sigreturn)
+ENTRY_NOPROFILE(sigreturn)
       trap    #1              /* signals compat_13_sigreturn13() */
-       jbra    CERROR
+       JBRA_CERROR
+       CERROR_TRAMP
END(sigreturn)
Index: src/lib/libc/compat/arch/m68k/sys/compat_sigsuspend.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compat/arch/m68k/sys/compat_sigsuspend.S,v
retrieving revision 1.3
diff -u -p -r1.3 compat_sigsuspend.S
--- src/lib/libc/compat/arch/m68k/sys/compat_sigsuspend.S       25 Jul 2013 22:08:15 -0000      1.3
+++ src/lib/libc/compat/arch/m68k/sys/compat_sigsuspend.S       25 Jan 2015 22:43:41 -0000
@@ -50,7 +50,8 @@ ENTRY(sigsuspend)
       movl    4(%sp),%a0
       movl    (%a0),4(%sp)            /* indirect to mask arg */
       SYSTRAP(compat_13_sigsuspend13)
-       jcs     CERROR
+       JCS_CERROR
       clrl    %d0                     /* shouldn't happen */
       rts
+       CERROR_TRAMP
END(sigsuspend)
Index: src/lib/libc/compiler_rt/Makefile.inc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/compiler_rt/Makefile.inc,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile.inc
--- src/lib/libc/compiler_rt/Makefile.inc       3 Sep 2014 19:29:14 -0000       1.27
+++ src/lib/libc/compiler_rt/Makefile.inc       25 Jan 2015 22:43:41 -0000
@@ -100,8 +100,6 @@ GENERIC_SRCS+= \
       multi3.c \
       mulvsi3.c \
       mulvti3.c \
-       negdf2.c \
-       negsf2.c \
       negti2.c \
       negvsi2.c \
       negvti2.c \
Index: src/lib/libc/gmon/gmon.c
===================================================================
RCS file: /home/chs/netbsd/cvs/src/lib/libc/gmon/gmon.c,v
retrieving revision 1.35
diff -u -p -r1.35 gmon.c
--- src/lib/libc/gmon/gmon.c    18 Sep 2014 13:58:20 -0000      1.35
+++ src/lib/libc/gmon/gmon.c    25 Jan 2015 22:43:41 -0000
@@ -160,7 +160,7 @@ monstartup(u_long lowpc, u_long highpc)

       o = p->highpc - p->lowpc;
       if (p->kcountsize < o) {
-#ifndef notdef
+#ifndef __mc68010__
               s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
#else /* avoid floating point */
               u_long quot = o / p->kcountsize;
Index: src/libexec/ld.elf_so/Makefile
===================================================================
RCS file: /home/chs/netbsd/cvs/src/libexec/ld.elf_so/Makefile,v
retrieving revision 1.129
diff -u -p -r1.129 Makefile
--- src/libexec/ld.elf_so/Makefile      19 Sep 2014 17:43:33 -0000      1.129
+++ src/libexec/ld.elf_so/Makefile      25 Jan 2015 22:43:41 -0000
@@ -26,23 +26,7 @@ ARCHSUBDIR=  ${MACHINE_CPU}
.endif
M=             ${.CURDIR}/arch/${ARCHSUBDIR}

-.if ((${MACHINE_CPU} == "aarch64") ||                                  \
-     (${LDELFSO_MACHINE_ARCH} == "alpha") ||                           \
-     (${MACHINE_CPU} == "arm") ||                                      \
-     (${LDELFSO_MACHINE_ARCH} == "coldfire") ||                                \
-     (${LDELFSO_MACHINE_ARCH} == "hppa") ||                            \
-     (${LDELFSO_MACHINE_ARCH} == "i386") ||                            \
-     (${LDELFSO_MACHINE_ARCH} == "m68k") ||                            \
-     (${MACHINE_CPU} == "mips") ||                                     \
-     (${MACHINE_CPU} == "or1k") ||                                     \
-     (${MACHINE_CPU} == "powerpc") ||                                  \
-     (${MACHINE_CPU} == "riscv") ||                                    \
-     (${MACHINE_CPU} == "sh3") ||                                      \
-     (${LDELFSO_MACHINE_ARCH} == "sparc") ||                           \
-     (${LDELFSO_MACHINE_ARCH} == "sparc64") ||                         \
-     (${LDELFSO_MACHINE_ARCH} == "x86_64") ||                          \
-     (${LDELFSO_MACHINE_ARCH} == "vax")) &&                            \
-    ${MKPIC} != "no"
+.if ${MKPIC} != "no"

LDFLAGS+=      ${${ACTIVE_CC} == "clang":? -Wl,-Bsymbolic : -symbolic} \
               -shared -nostartfiles -nodefaultlibs
Index: src/libexec/ld.elf_so/arch/m68k/Makefile.inc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/libexec/ld.elf_so/arch/m68k/Makefile.inc,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.inc
--- src/libexec/ld.elf_so/arch/m68k/Makefile.inc        4 Jun 2005 16:17:17 -0000       1.10
+++ src/libexec/ld.elf_so/arch/m68k/Makefile.inc        25 Jan 2015 22:43:41 -0000
@@ -3,7 +3,7 @@
SRCS+=         rtld_start.S mdreloc.c

# XXX Should not be in CPPFLAGS!
-CPPFLAGS+=     -fpic
+CPPFLAGS+=     -fPIC

CPPFLAGS+=     -DELFSIZE=32

Index: src/libexec/ld.elf_so/arch/m68k/rtld_start.S
===================================================================
RCS file: /home/chs/netbsd/cvs/src/libexec/ld.elf_so/arch/m68k/rtld_start.S,v
retrieving revision 1.11
diff -u -p -r1.11 rtld_start.S
--- src/libexec/ld.elf_so/arch/m68k/rtld_start.S        18 Mar 2014 18:20:38 -0000      1.11
+++ src/libexec/ld.elf_so/arch/m68k/rtld_start.S        1 Feb 2015 17:12:04 -0000
@@ -31,11 +31,7 @@

#include <machine/asm.h>

-       .text
-       .align  4
-       .globl  .rtld_start
-       .type   .rtld_start,@function
-.rtld_start:
+ENTRY_NOPROFILE(.rtld_start)
       subql   #8,%sp                  | storage for obj and cleanup

       GOT_SETUP(%a0)
@@ -46,28 +42,25 @@

       movel   %a5,-(%sp)              | relocbase
       movel   %a1,-(%sp)              | &_DYNAMIC
-       jbsr    _rtld_relocate_nonplt_self@PLTPC
+       PIC_CALL(_rtld_relocate_nonplt_self)
       addql   #8,%sp                  | pop arguments

       movel   %a5,-(%sp)              | relocbase
       pea     4(%sp)                  | sp
-       jbsr    _rtld@PLTPC             | entry = _rtld(sp, relocbase)
+       PIC_CALL(_rtld)                 | entry = _rtld(sp, relocbase)
       addql   #8,%sp                  | pop arguments

       moveal  (%sp)+,%a1              | cleanup
       moveal  (%sp)+,%a0              | obj
       moveal  %d0,%a3
       jmp     (%a3)                   | Go for it!
-       .size   .rtld_start,.-.rtld_start
+END(.rtld_start)

-       .align  4
-       .globl  _rtld_bind_start
-       .type   _rtld_bind_start,@function
-_rtld_bind_start:
+ENTRY_NOPROFILE(_rtld_bind_start)
       INTERRUPT_SAVEREG
       movel   20(%sp),-(%sp)          | push reloff
       movel   (16+4)(%sp),-(%sp)      | push obj
-       jbsr    _rtld_bind@PLTPC        | %a0 = _rtld_bind(obj, reloff)
+       PIC_CALL(_rtld_bind)            | %a0 = _rtld_bind(obj, reloff)
       addql   #8,%sp                  | pop args
#ifdef __SVR4_ABI__
       movel   %a0,(16+4)(%sp)         | write fake `return' address over obj
@@ -77,4 +70,4 @@ _rtld_bind_start:
       INTERRUPT_RESTOREREG            | restore caller-saved registers
       addql   #4,%sp                  | skip reloff
       rts                             | `return' right into function
-       .size   _rtld_bind_start,.-_rtld_bind_start
+END(_rtld_bind_start)
Index: src/share/mk/bsd.own.mk
===================================================================
RCS file: /home/chs/netbsd/cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.842
diff -u -p -r1.842 bsd.own.mk
--- src/share/mk/bsd.own.mk     23 Jan 2015 03:43:24 -0000      1.842
+++ src/share/mk/bsd.own.mk     1 Feb 2015 17:13:23 -0000
@@ -729,19 +729,6 @@ MKPROFILE.riscv32=no
MKPROFILE.riscv64=no

#
-# The m68000 port is incomplete.
-#
-.if ${MACHINE_ARCH} == "m68000"
-NOPIC=         # defined
-MKISCSI=       no
-# XXX GCC 4 outputs mcount() calling sequences that try to load values
-# from over 64KB away and this fails to assemble.
-.if defined(HAVE_GCC)
-NOPROFILE=     # defined
-.endif
-.endif
-
-#
# The ia64 port is incomplete.
#
MKLINT.ia64=   no
Index: src/sys/arch/m68k/include/asm.h
===================================================================
RCS file: /home/chs/netbsd/cvs/src/sys/arch/m68k/include/asm.h,v
retrieving revision 1.33
diff -u -p -r1.33 asm.h
--- src/sys/arch/m68k/include/asm.h     12 Sep 2013 15:36:17 -0000      1.33
+++ src/sys/arch/m68k/include/asm.h     25 Jan 2015 22:43:41 -0000
@@ -77,21 +77,43 @@

#ifdef __PIC__
#define PIC_PLT(name)          name@PLTPC
-#ifdef __mcoldfire__
+#if defined(__mcoldfire__) || defined(__mc68010__)
#define LEA_LCL(name,reg) \
       movl    __IMMEDIATE name - .,reg ; \
-       lea     (-6,%pc,reg),reg
+       lea     (-8,%pc,reg),reg
#define GOT_SETUP(reg) \
       movl    __IMMEDIATE _GLOBAL_OFFSET_TABLE_@GOTPC,reg ; \
       lea     (-6,%pc,reg),reg
+#define PIC_PLTADDR(name,reg) \
+       movl    __IMMEDIATE PIC_PLT(name),reg ; \
+       lea     (-6,%pc,reg),reg
+#ifdef __mc68010__
+#define PIC_CALL_REG(name,reg) \
+       PIC_PLTADDR(name,reg) ; \
+       jsr     (reg)
+#define PIC_JMP_REG(name,reg) \
+       PIC_PLTADDR(name,reg) ; \
+       jmp     (reg)
+#define PIC_CALL(name) \
+       PIC_CALL_REG(name,%a0)
+#define PIC_JMP(name) \
+       PIC_JMP_REG(name,%a0)
+#else
+#define PIC_CALL(name)         jbsr    PIC_PLT(name)
+#define PIC_JMP(name)          jra     PIC_PLT(name)
+#endif
#else
#define LEA_LCL(name,reg)      lea     (name,%pc),reg
#define GOT_SETUP(reg)         lea     (_GLOBAL_OFFSET_TABLE_@GOTPC,%pc),reg
+#define PIC_CALL(name)         jbsr    PIC_PLT(name)
+#define PIC_JMP(name)          jra     PIC_PLT(name)
#endif
#else
#define PIC_PLT(name)          name
#define LEA_LCL(name,reg)      movl    __IMMEDIATE name,reg
#define GOT_SETUP(reg)         /* nothing */
+#define PIC_CALL(name)         jbsr    name
+#define PIC_JMP(name)          jra     name
#endif

#if __STDC__
Index: src/tests/libexec/Makefile
===================================================================
RCS file: /home/chs/netbsd/cvs/src/tests/libexec/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- src/tests/libexec/Makefile  10 Jun 2014 04:28:39 -0000      1.4
+++ src/tests/libexec/Makefile  25 Jan 2015 22:43:41 -0000
@@ -3,9 +3,7 @@
.include "Makefile.inc"
.include <bsd.own.mk>

-.if ${MACHINE_ARCH} != "m68000"
TESTS_SUBDIRS=         ld.elf_so
-.endif

TESTSDIR=      ${TESTSBASE}/libexec

Index: src/tools/gcc/Makefile
===================================================================
RCS file: /home/chs/netbsd/cvs/src/tools/gcc/Makefile,v
retrieving revision 1.74
diff -u -p -r1.74 Makefile
--- src/tools/gcc/Makefile      16 Jan 2015 20:10:26 -0000      1.74
+++ src/tools/gcc/Makefile      25 Jan 2015 22:43:41 -0000
@@ -181,10 +181,6 @@ NATIVE_CONFIGURE_ARGS+= --enable-tls
NATIVE_CONFIGURE_ARGS+=        --enable-initfini-array
.endif

-.if ${MACHINE_ARCH} == "m68000"
-NATIVE_CONFIGURE_ARGS+= --disable-shared
-.endif
-
NATIVE_CONFIGURE_ARGS+=        \
                       --disable-multilib \
                       --disable-symvers \
Index: src/tools/gcc/mknative-gcc
===================================================================
RCS file: /home/chs/netbsd/cvs/src/tools/gcc/mknative-gcc,v
retrieving revision 1.81
diff -u -p -r1.81 mknative-gcc
--- src/tools/gcc/mknative-gcc  31 Jan 2015 08:50:01 -0000      1.81
+++ src/tools/gcc/mknative-gcc  31 Jan 2015 09:55:17 -0000
@@ -97,14 +97,6 @@ get_libgcc () {
       }       | sanitise_includes \
               | write_mk $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk

-       if [ "${MACHINE_ARCH}" = "m68000" ]
-       then
-               ex <<__EOF__ $_OUTDIR/lib/lib$_subdir/arch/$MACHINE_ARCH/defs.mk
-/G_LIBGCC2_CFLAGS/ s/-fPIC//
-wq
-__EOF__
-       fi
-
       for f in auto-target.h; do
               write_c $_OUTDIRBASE/lib/lib$_subdir/arch/$MACHINE_ARCH/$f \
                   <$_TMPDIR/$_PLATFORM/libgcc/$f