Index: configure
===================================================================
RCS file: /cvsroot/rockbox/tools/configure,v
retrieving revision 1.189
diff -u -r1.189 configure
--- configure	3 Apr 2006 21:47:18 -0000	1.189
+++ configure	29 Apr 2006 22:32:47 -0000
@@ -1070,6 +1070,21 @@
 
 fi
 
+# check the compiler for SH platforms
+if test "$CC" = "sh-elf-gcc"; then
+ if test "$gccnum" -lt "400"; then 
+  echo "WARNING: Consider upgrading your compiler to the 4.0.X series!"
+ fi  
+ if { echo $gccver | grep "rockbox"; } then
+   echo "gcc $gccver is patched fine"
+   # then convert -O to -Os to get smaller binaries!
+   CCOPTS=`echo $CCOPTS | sed 's/ -O / -Os /'`
+ else
+  echo "WARNING: You use an unpatched gcc compiler!"
+ fi
+fi
+
+
 if test "X$ccache" = "Xyes"; then
   CC="ccache $CC"
 fi
