提交 731532c9 编写于 作者: T tbell

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
上级 2effd87a
......@@ -204,7 +204,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
#
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 @@ fi
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
......
......@@ -3068,7 +3068,7 @@ fi
#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 @@ fi
#
# 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 @@ if test "x$ENABLE_PRECOMPH" = xyes; then
{ $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 "no" >&6; }
{ $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
......@@ -95,6 +95,8 @@ EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册