summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-16 13:02:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-16 13:02:29 +0000
commit4902996148438dd82fbe86b06e15b7b9a6dd9ece (patch)
tree7b3a68cf3d12974abdfcba9a5af75a57620e5b81 /tools
parent56f2ca74adaf64a23c3139fefb3180299ce4237a (diff)
downloadrockbox-4902996148438dd82fbe86b06e15b7b9a6dd9ece.zip
rockbox-4902996148438dd82fbe86b06e15b7b9a6dd9ece.tar.gz
rockbox-4902996148438dd82fbe86b06e15b7b9a6dd9ece.tar.bz2
rockbox-4902996148438dd82fbe86b06e15b7b9a6dd9ece.tar.xz
1. auto-detect and auto-use ccache if installed and present in $PATH
2. slap on -fno-strict-aliasing for gcc 4.1.x builds to see if it HIDES some warnings. We really should fix the source code instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10609 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure36
1 files changed, 21 insertions, 15 deletions
diff --git a/tools/configure b/tools/configure
index 6270e8f..5a112d0 100755
--- a/tools/configure
+++ b/tools/configure
@@ -355,15 +355,10 @@ if test "$1" = "--help"; then
echo "Invoke this in a directory to generate a Makefile to build Rockbox"
echo "Do *NOT* run this within the tools directory!"
echo ""
- echo "Usage: configure [--ccache]"
+ echo "Usage: configure [--ccache][--no-ccache]"
exit
fi
-if test "$1" = "--ccache"; then
- echo "Enable ccache for building"
- ccache="yes"
-fi
-
if test -r "configure"; then
# this is a check for a configure script in the current directory, it there
# is one, try to figure out if it is this one!
@@ -392,17 +387,10 @@ fi
# get our current directory
pwd=`pwd`;
-if [ "$target" = "update" ]; then
- echo "configure update is unfortunately no longer supported"
- exit
-else
-
echo "This script will setup your Rockbox build environment."
echo "Further docs here: http://www.rockbox.org/"
echo ""
-fi
-
if [ -z "$rootdir" ]; then
##################################################################
# Figure out where the source code root is!
@@ -1120,6 +1108,13 @@ else
GCCOPTS="$GCCOPTS -Wno-pointer-sign"
fi
+ if test "$gccnum" -ge "401"; then
+ # this is a lame hack to avoid "warning: dereferencing type-punned pointer
+ # will break strict-aliasing rules"
+
+ GCCOPTS="$GCCOPTS -fno-strict-aliasing"
+ fi
+
fi
# check the compiler for SH platforms
@@ -1142,9 +1137,20 @@ if test "$CC" = "sh-elf-gcc"; then
fi
fi
+if test "$1" = "--ccache"; then
+ echo "Enable ccache for building"
+ ccache="ccache"
+else
+ if test "$1" != "--no-ccache"; then
+ ccache=`findtool ccache`
+ if test -n "$ccache"; then
+ echo "Found and uses ccache ($ccache)"
+ fi
+ fi
+fi
-if test "X$ccache" = "Xyes"; then
- CC="ccache $CC"
+if test -n "$ccache"; then
+ CC="$ccache $CC"
fi
if test "X$endian" = "Xbig"; then