summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/configure b/tools/configure
index faa67a8ee7..1b85f0be6f 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1070,6 +1070,27 @@ else
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!"
+ echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
+ else
+ # figure out patch status
+ gccpatch=`$CC --version`;
+
+ if { echo $gccpatch | grep "rockbox" >/dev/null 2>&1; } then
+ echo "gcc $gccver is rockbox patched"
+ # 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: $gccver"
+ echo "WARNING: http://www.rockbox.org/twiki/bin/view/Main/CrossCompiler"
+ fi
+ fi
+fi
+
+
if test "X$ccache" = "Xyes"; then
CC="ccache $CC"
fi