提交 2e52dc01 编写于 作者: E erikj

8001753: build-infra: mismatch with full debug symbol control for hotspot

Summary: Enabling hotspot to use the FDS settings established at configure time
Reviewed-by: dholmes, ohair
上级 3a41ea67
...@@ -3674,7 +3674,7 @@ fi ...@@ -3674,7 +3674,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1355221697 DATE_WHEN_GENERATED=1355221914
############################################################################### ###############################################################################
# #
...@@ -27820,34 +27820,34 @@ esac ...@@ -27820,34 +27820,34 @@ esac
# ENABLE_DEBUG_SYMBOLS # ENABLE_DEBUG_SYMBOLS
# This must be done after the toolchain is setup, since we're looking at objcopy. # This must be done after the toolchain is setup, since we're looking at objcopy.
# #
ENABLE_DEBUG_SYMBOLS=default
# default on macosx is no...
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=no
fi
# Check whether --enable-debug-symbols was given. # Check whether --enable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then : if test "${enable_debug_symbols+set}" = set; then :
enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols} enableval=$enable_debug_symbols;
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
$as_echo_n "checking if we should generate debug symbols... " >&6; } $as_echo_n "checking if we should generate debug symbols... " >&6; }
if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
# explicit enabling of enable-debug-symbols and can't find objcopy # explicit enabling of enable-debug-symbols and can't find objcopy
# this is an error # this is an error
as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
fi fi
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then if test "x$enable_debug_symbols" = "xyes"; then
ENABLE_DEBUG_SYMBOLS=true
elif test "x$enable_debug_symbols" = "xno"; then
ENABLE_DEBUG_SYMBOLS=false
else
# default on macosx is false
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=false
# Default is on if objcopy is found, otherwise off # Default is on if objcopy is found, otherwise off
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=yes ENABLE_DEBUG_SYMBOLS=true
else else
ENABLE_DEBUG_SYMBOLS=no ENABLE_DEBUG_SYMBOLS=false
fi fi
fi fi
...@@ -27857,25 +27857,21 @@ $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; } ...@@ -27857,25 +27857,21 @@ $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
# #
# ZIP_DEBUGINFO_FILES # ZIP_DEBUGINFO_FILES
# #
ZIP_DEBUGINFO_FILES=yes
# Check whether --enable-zip-debug-info was given. # Check whether --enable-zip-debug-info was given.
if test "${enable_zip_debug_info+set}" = set; then : if test "${enable_zip_debug_info+set}" = set; then :
enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info} enableval=$enable_zip_debug_info;
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
$as_echo_n "checking if we should zip debug-info files... " >&6; } $as_echo_n "checking if we should zip debug-info files... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
$as_echo "$ZIP_DEBUGINFO_FILES" >&6; } $as_echo "${enable_zip_debug_info}" >&6; }
# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes if test "x${enable_zip_debug_info}" = "xno"; then
# use that... ZIP_DEBUGINFO_FILES=false
if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
ZIP_DEBUGINFO_FILES=1
else else
ZIP_DEBUGINFO_FILES=0 ZIP_DEBUGINFO_FILES=true
fi fi
...@@ -97,6 +97,24 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ ...@@ -97,6 +97,24 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
# creation.
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
FULL_DEBUG_SYMBOLS=1
# Ensure hotspot uses the objcopy that configure located
ALT_OBJCOPY:=$(OBJCOPY)
else
FULL_DEBUG_SYMBOLS=0
endif
# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
ZIP_DEBUGINFO_FILES:=1
endif
ifeq ($(ZIP_DEBUGINFO_FILES), false)
ZIP_DEBUGINFO_FILES:=0
endif
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. # 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. # This is needed to get the LOG setting to work properly.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
...@@ -432,32 +432,30 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], ...@@ -432,32 +432,30 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
# ENABLE_DEBUG_SYMBOLS # ENABLE_DEBUG_SYMBOLS
# This must be done after the toolchain is setup, since we're looking at objcopy. # This must be done after the toolchain is setup, since we're looking at objcopy.
# #
ENABLE_DEBUG_SYMBOLS=default
# default on macosx is no...
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=no
fi
AC_ARG_ENABLE([debug-symbols], AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])], [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
)
AC_MSG_CHECKING([if we should generate debug symbols]) AC_MSG_CHECKING([if we should generate debug symbols])
if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
# explicit enabling of enable-debug-symbols and can't find objcopy # explicit enabling of enable-debug-symbols and can't find objcopy
# this is an error # this is an error
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
fi fi
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then if test "x$enable_debug_symbols" = "xyes"; then
ENABLE_DEBUG_SYMBOLS=true
elif test "x$enable_debug_symbols" = "xno"; then
ENABLE_DEBUG_SYMBOLS=false
else
# default on macosx is false
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=false
# Default is on if objcopy is found, otherwise off # Default is on if objcopy is found, otherwise off
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=yes ENABLE_DEBUG_SYMBOLS=true
else else
ENABLE_DEBUG_SYMBOLS=no ENABLE_DEBUG_SYMBOLS=false
fi fi
fi fi
...@@ -466,22 +464,16 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) ...@@ -466,22 +464,16 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
# #
# ZIP_DEBUGINFO_FILES # ZIP_DEBUGINFO_FILES
# #
ZIP_DEBUGINFO_FILES=yes
AC_ARG_ENABLE([zip-debug-info], AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])], [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
)
AC_MSG_CHECKING([if we should zip debug-info files]) AC_MSG_CHECKING([if we should zip debug-info files])
AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES]) AC_MSG_RESULT([${enable_zip_debug_info}])
# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes if test "x${enable_zip_debug_info}" = "xno"; then
# use that... ZIP_DEBUGINFO_FILES=false
if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
ZIP_DEBUGINFO_FILES=1
else else
ZIP_DEBUGINFO_FILES=0 ZIP_DEBUGINFO_FILES=true
fi fi
AC_SUBST(ENABLE_DEBUG_SYMBOLS) AC_SUBST(ENABLE_DEBUG_SYMBOLS)
......
...@@ -302,7 +302,7 @@ define SetupNativeCompilation ...@@ -302,7 +302,7 @@ define SetupNativeCompilation
endif endif
ifneq (,$$($1_DEBUG_SYMBOLS)) ifneq (,$$($1_DEBUG_SYMBOLS))
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
# Programs don't get the debug symbols added in the old build. It's not clear if # Programs don't get the debug symbols added in the old build. It's not clear if
# this is intentional. # this is intentional.
ifeq ($$($1_PROGRAM),) ifeq ($$($1_PROGRAM),)
...@@ -394,7 +394,7 @@ define SetupNativeCompilation ...@@ -394,7 +394,7 @@ define SetupNativeCompilation
endif endif
ifneq (,$$($1_DEBUG_SYMBOLS)) ifneq (,$$($1_DEBUG_SYMBOLS))
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map" "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
...@@ -429,7 +429,7 @@ define SetupNativeCompilation ...@@ -429,7 +429,7 @@ define SetupNativeCompilation
endif # Touch to not retrigger rule on rebuild endif # Touch to not retrigger rule on rebuild
$(TOUCH) $$@ $(TOUCH) $$@
ifeq ($(ZIP_DEBUGINFO_FILES), 1) ifeq ($(ZIP_DEBUGINFO_FILES), true)
$1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
...@@ -472,7 +472,7 @@ define SetupNativeCompilation ...@@ -472,7 +472,7 @@ define SetupNativeCompilation
ifneq (,$$($1_PROGRAM)) ifneq (,$$($1_PROGRAM))
# A executable binary has been specified, setup the target for it. # A executable binary has been specified, setup the target for it.
ifneq (,$$($1_DEBUG_SYMBOLS)) ifneq (,$$($1_DEBUG_SYMBOLS))
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map" "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
...@@ -507,7 +507,7 @@ define SetupNativeCompilation ...@@ -507,7 +507,7 @@ define SetupNativeCompilation
endif endif
$(TOUCH) $$@ $(TOUCH) $$@
ifeq ($(ZIP_DEBUGINFO_FILES), 1) ifeq ($(ZIP_DEBUGINFO_FILES), true)
$1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册