# HG changeset patch # User tbell # Date 1352917005 28800 # Node ID 582c696033f532b26d1c74ca3301bb81c7d29c55 # Parent c81c4a5d8b502d44e8f1f78c6964a3b45dbaaf1a 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 diff -r c81c4a5d8b50 -r 582c696033f5 common/autoconf/build-performance.m4 --- a/common/autoconf/build-performance.m4 Wed Nov 14 10:13:28 2012 -0800 +++ b/common/autoconf/build-performance.m4 Wed Nov 14 10:16:45 2012 -0800 @@ -204,7 +204,7 @@ # AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], [disable using precompiled headers when compiling C++ @<:@enabled@:>@])], - [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes]) + [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes]) USE_PRECOMPILED_HEADER=1 if test "x$ENABLE_PRECOMPH" = xno; then @@ -214,17 +214,16 @@ if 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]) + AC_MSG_CHECKING([that precompiled headers work]) echo "int alfa();" > conftest.h - $CXX -x c++-header conftest.h -o conftest.hpp.gch + $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 - echo Precompiled header is not working! USE_PRECOMPILED_HEADER=0 AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) fi - rm -f conftest.h + rm -f conftest.h conftest.hpp.gch fi fi diff -r c81c4a5d8b50 -r 582c696033f5 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Wed Nov 14 10:13:28 2012 -0800 +++ b/common/autoconf/generated-configure.sh Wed Nov 14 10:16:45 2012 -0800 @@ -3068,7 +3068,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1352916731 +DATE_WHEN_GENERATED=1352916966 ############################################################################### # @@ -33656,7 +33656,7 @@ # # Check whether --enable-precompiled-headers was given. if test "${enable_precompiled_headers+set}" = set; then - enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers} + enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers} else ENABLE_PRECOMPH=yes fi @@ -33673,9 +33673,8 @@ { $as_echo "$as_me:$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 + $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5 if test ! -f conftest.hpp.gch; then - echo Precompiled header is not working! USE_PRECOMPILED_HEADER=0 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } @@ -33683,7 +33682,7 @@ { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } fi - rm -f conftest.h + rm -f conftest.h conftest.hpp.gch fi fi diff -r c81c4a5d8b50 -r 582c696033f5 common/autoconf/hotspot-spec.gmk.in --- a/common/autoconf/hotspot-spec.gmk.in Wed Nov 14 10:13:28 2012 -0800 +++ b/common/autoconf/hotspot-spec.gmk.in Wed Nov 14 10:16:45 2012 -0800 @@ -95,6 +95,8 @@ EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ +USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ + # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. # This is needed to get the LOG setting to work properly. include $(SRC_ROOT)/common/makefiles/MakeBase.gmk