1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Daniel Stenberg 2006-08-16 13:02:29 +00:00
parent 56f2ca74ad
commit 4902996148

36
tools/configure vendored
View file

@ -355,15 +355,10 @@ if test "$1" = "--help"; then
echo "Invoke this in a directory to generate a Makefile to build Rockbox" echo "Invoke this in a directory to generate a Makefile to build Rockbox"
echo "Do *NOT* run this within the tools directory!" echo "Do *NOT* run this within the tools directory!"
echo "" echo ""
echo "Usage: configure [--ccache]" echo "Usage: configure [--ccache][--no-ccache]"
exit exit
fi fi
if test "$1" = "--ccache"; then
echo "Enable ccache for building"
ccache="yes"
fi
if test -r "configure"; then if test -r "configure"; then
# this is a check for a configure script in the current directory, it there # 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! # is one, try to figure out if it is this one!
@ -392,17 +387,10 @@ fi
# get our current directory # get our current directory
pwd=`pwd`; 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 "This script will setup your Rockbox build environment."
echo "Further docs here: http://www.rockbox.org/" echo "Further docs here: http://www.rockbox.org/"
echo "" echo ""
fi
if [ -z "$rootdir" ]; then if [ -z "$rootdir" ]; then
################################################################## ##################################################################
# Figure out where the source code root is! # Figure out where the source code root is!
@ -1120,6 +1108,13 @@ else
GCCOPTS="$GCCOPTS -Wno-pointer-sign" GCCOPTS="$GCCOPTS -Wno-pointer-sign"
fi 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 fi
# check the compiler for SH platforms # check the compiler for SH platforms
@ -1142,9 +1137,20 @@ if test "$CC" = "sh-elf-gcc"; then
fi fi
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 if test -n "$ccache"; then
CC="ccache $CC" CC="$ccache $CC"
fi fi
if test "X$endian" = "Xbig"; then if test "X$endian" = "Xbig"; then