From 4902996148438dd82fbe86b06e15b7b9a6dd9ece Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 16 Aug 2006 13:02:29 +0000 Subject: 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 --- tools/configure | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'tools/configure') 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 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 -- cgit v1.2.3