Wed, 14 Nov 2012 10:16:45 -0800
8001941: build-infra: --disable-precompiled-headers does not seem to work
Summary: With this fix the flag will do what it advertises
Reviewed-by: ohair, tbell
Contributed-by: erik.joelsson@oracle.com
1.1 --- a/common/autoconf/build-performance.m4 Wed Nov 14 10:13:28 2012 -0800 1.2 +++ b/common/autoconf/build-performance.m4 Wed Nov 14 10:16:45 2012 -0800 1.3 @@ -204,7 +204,7 @@ 1.4 # 1.5 AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], 1.6 [disable using precompiled headers when compiling C++ @<:@enabled@:>@])], 1.7 - [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes]) 1.8 + [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes]) 1.9 1.10 USE_PRECOMPILED_HEADER=1 1.11 if test "x$ENABLE_PRECOMPH" = xno; then 1.12 @@ -214,17 +214,16 @@ 1.13 if test "x$ENABLE_PRECOMPH" = xyes; then 1.14 # Check that the compiler actually supports precomp headers. 1.15 if test "x$GCC" = xyes; then 1.16 - AC_MSG_CHECKING([that precompiled headers work]) 1.17 + AC_MSG_CHECKING([that precompiled headers work]) 1.18 echo "int alfa();" > conftest.h 1.19 - $CXX -x c++-header conftest.h -o conftest.hpp.gch 1.20 + $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD 1.21 if test ! -f conftest.hpp.gch; then 1.22 - echo Precompiled header is not working! 1.23 USE_PRECOMPILED_HEADER=0 1.24 AC_MSG_RESULT([no]) 1.25 else 1.26 AC_MSG_RESULT([yes]) 1.27 fi 1.28 - rm -f conftest.h 1.29 + rm -f conftest.h conftest.hpp.gch 1.30 fi 1.31 fi 1.32
2.1 --- a/common/autoconf/generated-configure.sh Wed Nov 14 10:13:28 2012 -0800 2.2 +++ b/common/autoconf/generated-configure.sh Wed Nov 14 10:16:45 2012 -0800 2.3 @@ -3068,7 +3068,7 @@ 2.4 #CUSTOM_AUTOCONF_INCLUDE 2.5 2.6 # Do not change or remove the following line, it is needed for consistency checks: 2.7 -DATE_WHEN_GENERATED=1352916731 2.8 +DATE_WHEN_GENERATED=1352916966 2.9 2.10 ############################################################################### 2.11 # 2.12 @@ -33656,7 +33656,7 @@ 2.13 # 2.14 # Check whether --enable-precompiled-headers was given. 2.15 if test "${enable_precompiled_headers+set}" = set; then 2.16 - enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers} 2.17 + enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} 2.18 else 2.19 ENABLE_PRECOMPH=yes 2.20 fi 2.21 @@ -33673,9 +33673,8 @@ 2.22 { $as_echo "$as_me:$LINENO: checking that precompiled headers work" >&5 2.23 $as_echo_n "checking that precompiled headers work... " >&6; } 2.24 echo "int alfa();" > conftest.h 2.25 - $CXX -x c++-header conftest.h -o conftest.hpp.gch 2.26 + $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 2.27 if test ! -f conftest.hpp.gch; then 2.28 - echo Precompiled header is not working! 2.29 USE_PRECOMPILED_HEADER=0 2.30 { $as_echo "$as_me:$LINENO: result: no" >&5 2.31 $as_echo "no" >&6; } 2.32 @@ -33683,7 +33682,7 @@ 2.33 { $as_echo "$as_me:$LINENO: result: yes" >&5 2.34 $as_echo "yes" >&6; } 2.35 fi 2.36 - rm -f conftest.h 2.37 + rm -f conftest.h conftest.hpp.gch 2.38 fi 2.39 fi 2.40
3.1 --- a/common/autoconf/hotspot-spec.gmk.in Wed Nov 14 10:13:28 2012 -0800 3.2 +++ b/common/autoconf/hotspot-spec.gmk.in Wed Nov 14 10:16:45 2012 -0800 3.3 @@ -95,6 +95,8 @@ 3.4 EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ 3.5 EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ 3.6 3.7 +USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ 3.8 + 3.9 # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. 3.10 # This is needed to get the LOG setting to work properly. 3.11 include $(SRC_ROOT)/common/makefiles/MakeBase.gmk