--- old/common/autoconf/build-performance.m4 2013-05-23 14:10:58.498284792 +0200 +++ new/common/autoconf/build-performance.m4 2013-05-23 14:10:58.398267499 +0200 @@ -176,47 +176,13 @@ # with other users. Thus change the umask. SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" fi - CCACHE_FOUND="" - if test "x$CCACHE" != x; then - BPERF_SETUP_CCACHE_USAGE - fi -]) - -AC_DEFUN([BPERF_SETUP_CCACHE_USAGE], -[ - if test "x$CCACHE" != x; then - CCACHE_FOUND="true" - # Only use ccache if it is 3.1.4 or later, which supports - # precompiled headers. - AC_MSG_CHECKING([if ccache supports precompiled headers]) - HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null` - if test "x$HAS_GOOD_CCACHE" = x; then - AC_MSG_RESULT([no, disabling ccache]) - CCACHE= - else - AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers]) - PUSHED_FLAGS="$CXXFLAGS" - CXXFLAGS="-fpch-preprocess $CXXFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no]) - CXXFLAGS="$PUSHED_FLAGS" - if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no, disabling ccaching of precompiled headers]) - CCACHE= - fi - fi - fi - if test "x$CCACHE" != x; then CCACHE_SLOPPINESS=time_macros CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" - CCACHE_FLAGS=-fpch-preprocess if test "x$SET_CCACHE_DIR" != x; then - mkdir -p $CCACHE_DIR > /dev/null 2>&1 - chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 + mkdir -p $with_ccache_dir > /dev/null 2>&1 + chmod a+rwxs $with_ccache_dir > /dev/null 2>&1 fi fi ]) @@ -232,28 +198,29 @@ [disable using precompiled headers when compiling C++ @<:@enabled@:>@])], [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes]) -USE_PRECOMPILED_HEADER=1 -if test "x$ENABLE_PRECOMPH" = xno; then + USE_PRECOMPILED_HEADER=1 + if test "x$ENABLE_PRECOMPH" = xno; then USE_PRECOMPILED_HEADER=0 -fi - -if test "x$ENABLE_PRECOMPH" = xyes; then + elif test "x$CCACHE" != x; then + # Disable precompiled header when using ccache as they don't work well together. + USE_PRECOMPILED_HEADER=0 + elif test "x$ENABLE_PRECOMPH" = xyes; then # Check that the compiler actually supports precomp headers. if test "x$GCC" = xyes; then - AC_MSG_CHECKING([that precompiled headers work]) - echo "int alfa();" > conftest.h - $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD - if test ! -f conftest.hpp.gch; then - USE_PRECOMPILED_HEADER=0 - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - fi - rm -f conftest.h conftest.hpp.gch + AC_MSG_CHECKING([that precompiled headers work]) + echo "int alfa();" > conftest.h + $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD + if test ! -f conftest.hpp.gch; then + USE_PRECOMPILED_HEADER=0 + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi + rm -f conftest.h conftest.hpp.gch fi -fi + fi -AC_SUBST(USE_PRECOMPILED_HEADER) + AC_SUBST(USE_PRECOMPILED_HEADER) ]) --- old/common/autoconf/configure.ac 2013-05-23 14:10:58.938360875 +0200 +++ new/common/autoconf/configure.ac 2013-05-23 14:10:58.838343587 +0200 @@ -211,12 +211,12 @@ # Setup smart javac (after cores and memory have been setup) BPERF_SETUP_SMART_JAVAC -# Can the C/C++ compiler use precompiled headers? -BPERF_SETUP_PRECOMPILED_HEADERS - # Setup use of ccache, if available BPERF_SETUP_CCACHE +# Can the C/C++ compiler use precompiled headers? +BPERF_SETUP_PRECOMPILED_HEADERS + ############################################################################### # # And now the finish... --- old/common/autoconf/generated-configure.sh 2013-05-23 14:10:59.368435232 +0200 +++ new/common/autoconf/generated-configure.sh 2013-05-23 14:10:59.248414479 +0200 @@ -595,8 +595,8 @@ ac_subst_vars='LTLIBOBJS LIBOBJS -CCACHE USE_PRECOMPILED_HEADER +CCACHE SJAVAC_SERVER_DIR ENABLE_SJAVAC SJAVAC_SERVER_CORES @@ -1027,9 +1027,9 @@ with_sjavac_server_java with_sjavac_server_cores enable_sjavac -enable_precompiled_headers enable_ccache with_ccache_dir +enable_precompiled_headers ' ac_precious_vars='build_alias host_alias @@ -1692,11 +1692,11 @@ framework [enabled] --enable-sjavac use sjavac to do fast incremental compiles [disabled] + --disable-ccache disable using ccache to speed up recompilations + [enabled] --disable-precompiled-headers disable using precompiled headers when compiling C++ [enabled] - --disable-ccache disable using ccache to speed up recompilations - [enabled] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3365,8 +3365,6 @@ - - # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3775,7 +3773,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1367502949 +DATE_WHEN_GENERATED=1369310526 ############################################################################### # @@ -32873,48 +32871,6 @@ -# Can the C/C++ compiler use precompiled headers? - - -############################################################################### -# -# Can the C/C++ compiler use precompiled headers? -# -# Check whether --enable-precompiled-headers was given. -if test "${enable_precompiled_headers+set}" = set; then : - enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} -else - ENABLE_PRECOMPH=yes -fi - - -USE_PRECOMPILED_HEADER=1 -if test "x$ENABLE_PRECOMPH" = xno; then - USE_PRECOMPILED_HEADER=0 -fi - -if test "x$ENABLE_PRECOMPH" = xyes; then - # Check that the compiler actually supports precomp headers. - if test "x$GCC" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 -$as_echo_n "checking that precompiled headers work... " >&6; } - echo "int alfa();" > conftest.h - $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 - if test ! -f conftest.hpp.gch; then - USE_PRECOMPILED_HEADER=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - rm -f conftest.h conftest.hpp.gch - fi -fi - - - - # Setup use of ccache, if available # Check whether --enable-ccache was given. @@ -32986,68 +32942,58 @@ # with other users. Thus change the umask. SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" fi - CCACHE_FOUND="" if test "x$CCACHE" != x; then + CCACHE_SLOPPINESS=time_macros + CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" - if test "x$CCACHE" != x; then - CCACHE_FOUND="true" - # Only use ccache if it is 3.1.4 or later, which supports - # precompiled headers. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 -$as_echo_n "checking if ccache supports precompiled headers... " >&6; } - HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null` - if test "x$HAS_GOOD_CCACHE" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5 -$as_echo "no, disabling ccache" >&6; } - CCACHE= - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5 -$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; } - PUSHED_FLAGS="$CXXFLAGS" - CXXFLAGS="-fpch-preprocess $CXXFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test "x$SET_CCACHE_DIR" != x; then + mkdir -p $with_ccache_dir > /dev/null 2>&1 + chmod a+rwxs $with_ccache_dir > /dev/null 2>&1 + fi + fi -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - CC_KNOWS_CCACHE_TRICK=yes +# Can the C/C++ compiler use precompiled headers? + + +############################################################################### +# +# Can the C/C++ compiler use precompiled headers? +# +# Check whether --enable-precompiled-headers was given. +if test "${enable_precompiled_headers+set}" = set; then : + enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} else - CC_KNOWS_CCACHE_TRICK=no + ENABLE_PRECOMPH=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="$PUSHED_FLAGS" - if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5 -$as_echo "no, disabling ccaching of precompiled headers" >&6; } - CCACHE= - fi - fi - fi - if test "x$CCACHE" != x; then - CCACHE_SLOPPINESS=time_macros - CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" - CCACHE_FLAGS=-fpch-preprocess - if test "x$SET_CCACHE_DIR" != x; then - mkdir -p $CCACHE_DIR > /dev/null 2>&1 - chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 - fi + USE_PRECOMPILED_HEADER=1 + if test "x$ENABLE_PRECOMPH" = xno; then + USE_PRECOMPILED_HEADER=0 + elif test "x$CCACHE" != x; then + # Disable precompiled header when using ccache as they don't work well together. + USE_PRECOMPILED_HEADER=0 + elif test "x$ENABLE_PRECOMPH" = xyes; then + # Check that the compiler actually supports precomp headers. + if test "x$GCC" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 +$as_echo_n "checking that precompiled headers work... " >&6; } + echo "int alfa();" > conftest.h + $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 + if test ! -f conftest.hpp.gch; then + USE_PRECOMPILED_HEADER=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + rm -f conftest.h conftest.hpp.gch fi + fi + - fi ############################################################################### @@ -34410,20 +34356,15 @@ # Finally output some useful information to the user -if test "x$CCACHE_FOUND" != x; then - if test "x$HAS_GOOD_CCACHE" = x; then - CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" - CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." - else - CCACHE_STATUS="installed and in use" - fi +if test "x$CCACHE" != x; then + CCACHE_STATUS="installed and in use" else - if test "x$GCC" = xyes; then - CCACHE_STATUS="not installed (consider installing)" - CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." - else - CCACHE_STATUS="not available for your system" - fi + if test "x$GCC" = xyes; then + CCACHE_STATUS="not installed (consider installing)" + CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." + else + CCACHE_STATUS="not available for your system" + fi fi printf "\n" --- old/common/autoconf/help.m4 2013-05-23 14:11:00.528635836 +0200 +++ new/common/autoconf/help.m4 2013-05-23 14:11:00.438620274 +0200 @@ -130,20 +130,15 @@ [ # Finally output some useful information to the user -if test "x$CCACHE_FOUND" != x; then - if test "x$HAS_GOOD_CCACHE" = x; then - CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" - CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." - else - CCACHE_STATUS="installed and in use" - fi +if test "x$CCACHE" != x; then + CCACHE_STATUS="installed and in use" else - if test "x$GCC" = xyes; then - CCACHE_STATUS="not installed (consider installing)" - CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." - else - CCACHE_STATUS="not available for your system" - fi + if test "x$GCC" = xyes; then + CCACHE_STATUS="not installed (consider installing)" + CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." + else + CCACHE_STATUS="not available for your system" + fi fi printf "\n"