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:
parent
56f2ca74ad
commit
4902996148
1 changed files with 21 additions and 15 deletions
36
tools/configure
vendored
36
tools/configure
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue