--- old/common/autoconf/generated-configure.sh 2015-11-16 18:23:18.000261666 +0900 +++ new/common/autoconf/generated-configure.sh 2015-11-16 18:23:17.805775442 +0900 @@ -681,6 +681,7 @@ STATIC_CXX_SETTING FIXPATH GCOV_ENABLED +DEBUG_SYMBOL ZIP_DEBUGINFO_FILES ENABLE_DEBUG_SYMBOLS CFLAGS_WARNINGS_ARE_ERRORS @@ -1086,6 +1087,7 @@ enable_warnings_as_errors enable_debug_symbols enable_zip_debug_info +with_debug_symbols enable_native_coverage with_stdc__lib with_msvcr_dll @@ -1951,6 +1953,8 @@ dependent] --with-build-devkit Devkit to use for the build platform toolchain --with-jtreg Regression Test Harness [probed] + --with-debug-symbols set the debug symbol configuration (none, internal, + external, zipped) [zipped] --with-stdc++lib=,, force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as @@ -4610,7 +4614,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1446762265 +DATE_WHEN_GENERATED=1447665780 ############################################################################### # @@ -45365,6 +45369,32 @@ ZIP_DEBUGINFO_FILES=true fi + # + # DEBUG_SYMBOL + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of debug symbol" >&5 +$as_echo_n "checking type of debug symbol... " >&6; } + DEBUG_SYMBOL="zipped" + +# Check whether --with-debug-symbols was given. +if test "${with_debug_symbols+set}" = set; then : + withval=$with_debug_symbols; + DEBUG_SYMBOL="${withval}" + +fi + + + if test "x$DEBUG_SYMBOL" != xzipped && \ + test "x$DEBUG_SYMBOL" != xnone && \ + test "x$DEBUG_SYMBOL" != xinternal && \ + test "x$DEBUG_SYMBOL" != xexternal; then + as_fn_error $? "Allowed debug symbols are: none, internal, external, zipped" "$LINENO" 5 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_SYMBOL" >&5 +$as_echo "$DEBUG_SYMBOL" >&6; } + + --- old/common/autoconf/jdk-options.m4 2015-11-16 18:23:19.833269136 +0900 +++ new/common/autoconf/jdk-options.m4 2015-11-16 18:23:19.719398963 +0900 @@ -624,8 +624,29 @@ ZIP_DEBUGINFO_FILES=true fi + # + # DEBUG_SYMBOL + # + AC_MSG_CHECKING([type of debug symbol]) + DEBUG_SYMBOL="zipped" + AC_ARG_WITH([debug-symbols], [AS_HELP_STRING([--with-debug-symbols], + [set the debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])], + [ + DEBUG_SYMBOL="${withval}" + ]) + + if test "x$DEBUG_SYMBOL" != xzipped && \ + test "x$DEBUG_SYMBOL" != xnone && \ + test "x$DEBUG_SYMBOL" != xinternal && \ + test "x$DEBUG_SYMBOL" != xexternal; then + AC_MSG_ERROR([Allowed debug symbols are: none, internal, external, zipped]) + fi + + AC_MSG_RESULT([$DEBUG_SYMBOL]) + AC_SUBST(ENABLE_DEBUG_SYMBOLS) AC_SUBST(ZIP_DEBUGINFO_FILES) + AC_SUBST(DEBUG_SYMBOL) ]) ################################################################################ --- old/common/autoconf/spec.gmk.in 2015-11-16 18:23:20.328050151 +0900 +++ new/common/autoconf/spec.gmk.in 2015-11-16 18:23:20.213172278 +0900 @@ -392,6 +392,22 @@ CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@ CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@ ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@ +DEBUG_SYMBOL:=@DEBUG_SYMBOL@ + +ifeq ($(DEBUG_SYMBOL), none) + ENABLE_DEBUG_SYMBOLS := false +else ifeq ($(DEBUG_SYMBOL), internal) + ENABLE_DEBUG_SYMBOLS := false # -g option only. + DEBUG_BINARIES := true + STRIP_POLICY := no_strip + STRIP := +else ifeq ($(DEBUG_SYMBOL), external) + ENABLE_DEBUG_SYMBOLS := true + ZIP_DEBUGINFO_FILES := false +else ifeq ($(DEBUG_SYMBOL), zipped) + ENABLE_DEBUG_SYMBOLS := true + ZIP_DEBUGINFO_FILES := true +endif # # Compress (or not) jars --- old/make/common/NativeCompilation.gmk 2015-11-16 18:23:20.836783558 +0900 +++ new/make/common/NativeCompilation.gmk 2015-11-16 18:23:20.710976396 +0900 @@ -507,6 +507,10 @@ $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS) endif + ifeq ($(DEBUG_BINARIES), true) + $1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS) + $1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS) + endif ifeq ($$($1_DEBUG_SYMBOLS), true) ifeq ($(ENABLE_DEBUG_SYMBOLS), true) ifdef OPENJDK