diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-08-16 13:02:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-08-16 13:02:29 +0000 |
commit | 4902996148438dd82fbe86b06e15b7b9a6dd9ece (patch) | |
tree | 7b3a68cf3d12974abdfcba9a5af75a57620e5b81 | |
parent | 56f2ca74adaf64a23c3139fefb3180299ce4237a (diff) | |
download | rockbox-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
-rwxr-xr-x | tools/configure | 36 |
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 |
360 | fi | 360 | fi |
361 | 361 | ||
362 | if test "$1" = "--ccache"; then | ||
363 | echo "Enable ccache for building" | ||
364 | ccache="yes" | ||
365 | fi | ||
366 | |||
367 | if test -r "configure"; then | 362 | if 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 |
393 | pwd=`pwd`; | 388 | pwd=`pwd`; |
394 | 389 | ||
395 | if [ "$target" = "update" ]; then | ||
396 | echo "configure update is unfortunately no longer supported" | ||
397 | exit | ||
398 | else | ||
399 | |||
400 | echo "This script will setup your Rockbox build environment." | 390 | echo "This script will setup your Rockbox build environment." |
401 | echo "Further docs here: http://www.rockbox.org/" | 391 | echo "Further docs here: http://www.rockbox.org/" |
402 | echo "" | 392 | echo "" |
403 | 393 | ||
404 | fi | ||
405 | |||
406 | if [ -z "$rootdir" ]; then | 394 | if [ -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 | |||
1123 | fi | 1118 | fi |
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 |
1143 | fi | 1138 | fi |
1144 | 1139 | ||
1140 | if test "$1" = "--ccache"; then | ||
1141 | echo "Enable ccache for building" | ||
1142 | ccache="ccache" | ||
1143 | else | ||
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 | ||
1150 | fi | ||
1145 | 1151 | ||
1146 | if test "X$ccache" = "Xyes"; then | 1152 | if test -n "$ccache"; then |
1147 | CC="ccache $CC" | 1153 | CC="$ccache $CC" |
1148 | fi | 1154 | fi |
1149 | 1155 | ||
1150 | if test "X$endian" = "Xbig"; then | 1156 | if test "X$endian" = "Xbig"; then |