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.tar.gz
rockbox-4902996148438dd82fbe86b06e15b7b9a6dd9ece.zip
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 6270e8f21f..5a112d02e9 100755
--- a/tools/configure
+++ b/tools/configure
@@ -355,15 +355,10 @@ if test "$1" = "--help"; then
355 echo "Invoke this in a directory to generate a Makefile to build Rockbox" 355 echo "Invoke this in a directory to generate a Makefile to build Rockbox"
356 echo "Do *NOT* run this within the tools directory!" 356 echo "Do *NOT* run this within the tools directory!"
357 echo "" 357 echo ""
358 echo "Usage: configure [--ccache]" 358 echo "Usage: configure [--ccache][--no-ccache]"
359 exit 359 exit
360fi 360fi
361 361
362if test "$1" = "--ccache"; then
363 echo "Enable ccache for building"
364 ccache="yes"
365fi
366
367if test -r "configure"; then 362if test -r "configure"; then
368 # this is a check for a configure script in the current directory, it there 363 # this is a check for a configure script in the current directory, it there
369 # is one, try to figure out if it is this one! 364 # is one, try to figure out if it is this one!
@@ -392,17 +387,10 @@ fi
392# get our current directory 387# get our current directory
393pwd=`pwd`; 388pwd=`pwd`;
394 389
395if [ "$target" = "update" ]; then
396 echo "configure update is unfortunately no longer supported"
397 exit
398else
399
400echo "This script will setup your Rockbox build environment." 390echo "This script will setup your Rockbox build environment."
401echo "Further docs here: http://www.rockbox.org/" 391echo "Further docs here: http://www.rockbox.org/"
402echo "" 392echo ""
403 393
404fi
405
406if [ -z "$rootdir" ]; then 394if [ -z "$rootdir" ]; then
407 ################################################################## 395 ##################################################################
408 # Figure out where the source code root is! 396 # Figure out where the source code root is!
@@ -1120,6 +1108,13 @@ else
1120 GCCOPTS="$GCCOPTS -Wno-pointer-sign" 1108 GCCOPTS="$GCCOPTS -Wno-pointer-sign"
1121 fi 1109 fi
1122 1110
1111 if test "$gccnum" -ge "401"; then
1112 # this is a lame hack to avoid "warning: dereferencing type-punned pointer
1113 # will break strict-aliasing rules"
1114
1115 GCCOPTS="$GCCOPTS -fno-strict-aliasing"
1116 fi
1117
1123fi 1118fi
1124 1119
1125# check the compiler for SH platforms 1120# check the compiler for SH platforms
@@ -1142,9 +1137,20 @@ if test "$CC" = "sh-elf-gcc"; then
1142 fi 1137 fi
1143fi 1138fi
1144 1139
1140if test "$1" = "--ccache"; then
1141 echo "Enable ccache for building"
1142 ccache="ccache"
1143else
1144 if test "$1" != "--no-ccache"; then
1145 ccache=`findtool ccache`
1146 if test -n "$ccache"; then
1147 echo "Found and uses ccache ($ccache)"
1148 fi
1149 fi
1150fi
1145 1151
1146if test "X$ccache" = "Xyes"; then 1152if test -n "$ccache"; then
1147 CC="ccache $CC" 1153 CC="$ccache $CC"
1148fi 1154fi
1149 1155
1150if test "X$endian" = "Xbig"; then 1156if test "X$endian" = "Xbig"; then