diff -durN gcc-4.2.1.orig/boehm-gc/configure gcc-4.2.1/boehm-gc/configure
--- gcc-4.2.1.orig/boehm-gc/configure	2007-07-19 16:33:56.000000000 +0200
+++ gcc-4.2.1/boehm-gc/configure	2007-08-03 20:29:22.000000000 +0200
@@ -4323,7 +4323,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/contrib/regression/objs-gcc.sh gcc-4.2.1/contrib/regression/objs-gcc.sh
--- gcc-4.2.1.orig/contrib/regression/objs-gcc.sh	2005-08-15 02:41:31.000000000 +0200
+++ gcc-4.2.1/contrib/regression/objs-gcc.sh	2007-08-03 20:29:22.000000000 +0200
@@ -105,6 +105,10 @@
  then
   make all-gdb all-dejagnu all-ld || exit 1
   make install-gdb install-dejagnu install-ld || exit 1
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
+ then
+  make all-gdb all-dejagnu all-ld || exit 1
+  make install-gdb install-dejagnu install-ld || exit 1
 elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
   make bootstrap || exit 1
   make install || exit 1
diff -durN gcc-4.2.1.orig/gcc/config/cris/linux.h gcc-4.2.1/gcc/config/cris/linux.h
--- gcc-4.2.1.orig/gcc/config/cris/linux.h	2006-02-18 12:12:51.000000000 +0100
+++ gcc-4.2.1/gcc/config/cris/linux.h	2007-08-03 20:29:22.000000000 +0200
@@ -74,7 +74,11 @@
 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
 
 #undef CRIS_SUBTARGET_VERSION
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
+#if UCLIBC_DEFAULT
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+#else
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
+#endif
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
 
diff -durN gcc-4.2.1.orig/libffi/configure gcc-4.2.1/libffi/configure
--- gcc-4.2.1.orig/libffi/configure	2007-07-19 16:33:56.000000000 +0200
+++ gcc-4.2.1/libffi/configure	2007-08-03 20:29:22.000000000 +0200
@@ -3460,7 +3460,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libgfortran/configure gcc-4.2.1/libgfortran/configure
--- gcc-4.2.1.orig/libgfortran/configure	2007-07-19 16:33:56.000000000 +0200
+++ gcc-4.2.1/libgfortran/configure	2007-08-03 20:29:22.000000000 +0200
@@ -3721,7 +3721,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
--- gcc-4.2.1.orig/libgomp/configure	2007-07-19 16:33:56.000000000 +0200
+++ gcc-4.2.1/libgomp/configure	2007-08-03 20:29:22.000000000 +0200
@@ -3893,7 +3893,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
--- gcc-4.2.1.orig/libjava/classpath/configure	2007-01-17 19:10:26.000000000 +0100
+++ gcc-4.2.1/libjava/classpath/configure	2007-08-03 20:29:22.000000000 +0200
@@ -5307,7 +5307,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libjava/classpath/ltconfig gcc-4.2.1/libjava/classpath/ltconfig
--- gcc-4.2.1.orig/libjava/classpath/ltconfig	2006-08-07 22:37:50.000000000 +0200
+++ gcc-4.2.1/libjava/classpath/ltconfig	2007-08-03 20:29:22.000000000 +0200
@@ -603,7 +603,7 @@
 
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case $host_os in
-linux-gnu*) ;;
+linux-gnu*|linux-uclibc*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
 
@@ -1251,7 +1251,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
diff -durN gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
--- gcc-4.2.1.orig/libjava/configure	2007-07-19 16:33:56.000000000 +0200
+++ gcc-4.2.1/libjava/configure	2007-08-03 20:29:22.000000000 +0200
@@ -5424,7 +5424,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libmudflap/configure gcc-4.2.1/libmudflap/configure
--- gcc-4.2.1.orig/libmudflap/configure	2006-12-04 12:13:07.000000000 +0100
+++ gcc-4.2.1/libmudflap/configure	2007-08-03 20:29:22.000000000 +0200
@@ -5394,7 +5394,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libobjc/configure gcc-4.2.1/libobjc/configure
--- gcc-4.2.1.orig/libobjc/configure	2006-10-15 09:42:57.000000000 +0200
+++ gcc-4.2.1/libobjc/configure	2007-08-03 20:29:22.000000000 +0200
@@ -3314,7 +3314,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libssp/configure gcc-4.2.1/libssp/configure
--- gcc-4.2.1.orig/libssp/configure	2006-10-15 09:42:57.000000000 +0200
+++ gcc-4.2.1/libssp/configure	2007-08-03 20:29:22.000000000 +0200
@@ -4480,7 +4480,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
--- gcc-4.2.1.orig/libstdc++-v3/configure	2007-06-29 01:02:05.000000000 +0200
+++ gcc-4.2.1/libstdc++-v3/configure	2007-08-03 20:29:22.000000000 +0200
@@ -4283,7 +4283,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/libtool.m4 gcc-4.2.1/libtool.m4
--- gcc-4.2.1.orig/libtool.m4	2005-07-16 04:30:53.000000000 +0200
+++ gcc-4.2.1/libtool.m4	2007-08-03 20:29:22.000000000 +0200
@@ -739,7 +739,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
diff -durN gcc-4.2.1.orig/ltconfig gcc-4.2.1/ltconfig
--- gcc-4.2.1.orig/ltconfig	2007-02-14 18:08:35.000000000 +0100
+++ gcc-4.2.1/ltconfig	2007-08-03 20:29:22.000000000 +0200
@@ -603,7 +603,7 @@
 
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case $host_os in
-linux-gnu*) ;;
+linux-gnu*|linux-uclibc*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
 
@@ -1251,7 +1251,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
diff -durN gcc-4.2.1.orig/zlib/configure gcc-4.2.1/zlib/configure
--- gcc-4.2.1.orig/zlib/configure	2007-01-17 19:10:26.000000000 +0100
+++ gcc-4.2.1/zlib/configure	2007-08-03 20:29:22.000000000 +0200
@@ -3429,7 +3429,7 @@
   ;;
 
 # This must be Linux ELF.
-linux-gnu*)
+linux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
