diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/moxie/moxie.h gcc-mainline/gcc/config/moxie/moxie.h
--- gcc-mainline-3/gcc/config/moxie/moxie.h	2010-12-06 10:31:16.000000000 -0800
+++ gcc-mainline/gcc/config/moxie/moxie.h	2010-12-07 09:43:22.000000000 -0800
@@ -48,6 +48,10 @@
 #undef LIB_SPEC
 #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
 
+#undef  LINK_SPEC
+#define LINK_SPEC "%{h*} %{v:-V} \
+		   %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
+
 /* Layout of Source Language Data Types */
 
 #define INT_TYPE_SIZE 32
@@ -61,6 +65,18 @@
 
 #define DEFAULT_SIGNED_CHAR 1
 
+#undef  SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef  PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef  WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
+#undef  WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
+
 /* Registers...
 
    $fp  - frame pointer
diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/moxie/rtems.h gcc-mainline/gcc/config/moxie/rtems.h
--- gcc-mainline-3/gcc/config/moxie/rtems.h	2010-07-30 10:03:15.000000000 -0700
+++ gcc-mainline/gcc/config/moxie/rtems.h	2010-12-07 09:42:50.000000000 -0800
@@ -27,3 +27,9 @@ along with GCC; see the file COPYING3.  
       builtin_assert ("system=rtems");		\
     }						\
   while (0)
+
+#undef LINK_SPEC
+#undef SIZE_TYPE
+#undef PTRDIFF_TYPE
+#undef WCHAR_TYPE
+#undef WCHAR_TYPE_SIZE
diff -rupN --exclude=.svn gcc-mainline-3/gcc/config.gcc gcc-mainline/gcc/config.gcc
--- gcc-mainline-3/gcc/config.gcc	2010-12-06 03:31:49.000000000 -0800
+++ gcc-mainline/gcc/config.gcc	2010-12-07 09:49:10.000000000 -0800
@@ -979,14 +979,14 @@ frv-*-*linux*)
 moxie-*-elf)
 	gas=yes
 	gnu_ld=yes
-	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
+	tm_file="dbxelf.h elfos.h ${tm_file}"
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
 	;;
 moxie-*-uclinux*)
 	gas=yes
 	gnu_ld=yes
-	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"
+	tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
 	tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
 	tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
