diff options
Diffstat (limited to 'BUILD')
-rwxr-xr-x | BUILD/SETUP.sh | 2 | ||||
-rwxr-xr-x | BUILD/compile-pentium-gcov | 19 |
2 files changed, 15 insertions, 6 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 02d160158b3..ced9c7ec2df 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -183,7 +183,7 @@ fi # (http://samba.org/ccache) is installed, use it. # We use 'grep' and hope 'grep' will work as expected # (returns 0 if finds lines) -if ccache -V > /dev/null 2>&1 +if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" == "1" then if ! (echo "$CC" | grep "ccache" > /dev/null) then diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov index ca37f78e283..5633efaddf0 100755 --- a/BUILD/compile-pentium-gcov +++ b/BUILD/compile-pentium-gcov @@ -1,12 +1,21 @@ #! /bin/sh +# Need to disable ccache, or we loose the gcov-needed compiler output files. + +CCACHE_GCOV_VERSION_ENABLED=0 +if ccache -V > /dev/null 2>&1 +then + CCACHE_VER=`ccache -V | head -1 | sed s/"ccache version "//` + if test "$CCACHE_VER" == "2.4-gcov" + then + CCACHE_GCOV_VERSION_ENABLED=1 + fi +fi +export CCACHE_GCOV_VERSION_ENABLED + path=`dirname $0` . "$path/SETUP.sh" -# Need to disable ccache, or we loose the gcov-needed compiler output files. -CCACHE_DISABLE=1 -export CCACHE_DISABLE - # GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well # as on the compiler command line), and this requires setting LDFLAGS for BDB. export LDFLAGS="-fprofile-arcs -ftest-coverage" @@ -14,7 +23,7 @@ export LDFLAGS="-fprofile-arcs -ftest-coverage" # The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the # code with profiling information used by gcov. # the -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl. -extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY" +extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY $debug_extra_flags" extra_configs="$pentium_configs $debug_configs --disable-shared $static_link" extra_configs="$extra_configs $max_configs" |