--- old/common/autoconf/generated-configure.sh 2015-11-17 12:28:48.847092516 +0900 +++ new/common/autoconf/generated-configure.sh 2015-11-17 12:28:48.657796783 +0900 @@ -681,6 +681,7 @@ STATIC_CXX_SETTING FIXPATH GCOV_ENABLED +DEBUG_SYMBOLS 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=1447730912 ############################################################################### # @@ -45365,6 +45369,31 @@ ZIP_DEBUGINFO_FILES=true fi + # + # DEBUG_SYMBOLS + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of debug symbols to use" >&5 +$as_echo_n "checking what type of debug symbols to use... " >&6; } + DEBUG_SYMBOLS="zipped" + +# Check whether --with-debug-symbols was given. +if test "${with_debug_symbols+set}" = set; then : + withval=$with_debug_symbols; + DEBUG_SYMBOLS="${withval}" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_SYMBOLS" >&5 +$as_echo "$DEBUG_SYMBOLS" >&6; } + + if test "x$DEBUG_SYMBOLS" != xzipped && \ + test "x$DEBUG_SYMBOLS" != xnone && \ + test "x$DEBUG_SYMBOLS" != xinternal && \ + test "x$DEBUG_SYMBOLS" != xexternal; then + as_fn_error $? "Allowed debug symbols are: none, internal, external, zipped" "$LINENO" 5 + fi + + --- old/common/autoconf/jdk-options.m4 2015-11-17 12:28:50.714009166 +0900 +++ new/common/autoconf/jdk-options.m4 2015-11-17 12:28:50.598829223 +0900 @@ -624,8 +624,28 @@ ZIP_DEBUGINFO_FILES=true fi + # + # DEBUG_SYMBOLS + # + AC_MSG_CHECKING([what type of debug symbols to use]) + DEBUG_SYMBOLS="zipped" + AC_ARG_WITH([debug-symbols], [AS_HELP_STRING([--with-debug-symbols], + [set the debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])], + [ + DEBUG_SYMBOLS="${withval}" + ]) + AC_MSG_RESULT([$DEBUG_SYMBOLS]) + + if test "x$DEBUG_SYMBOLS" != xzipped && \ + test "x$DEBUG_SYMBOLS" != xnone && \ + test "x$DEBUG_SYMBOLS" != xinternal && \ + test "x$DEBUG_SYMBOLS" != xexternal; then + AC_MSG_ERROR([Allowed debug symbols are: none, internal, external, zipped]) + fi + AC_SUBST(ENABLE_DEBUG_SYMBOLS) AC_SUBST(ZIP_DEBUGINFO_FILES) + AC_SUBST(DEBUG_SYMBOLS) ]) ################################################################################ --- old/common/autoconf/spec.gmk.in 2015-11-17 12:28:51.204775882 +0900 +++ new/common/autoconf/spec.gmk.in 2015-11-17 12:28:51.092600633 +0900 @@ -392,6 +392,22 @@ CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@ CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@ ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@ +DEBUG_SYMBOLS:=@DEBUG_SYMBOLS@ + +ifeq ($(DEBUG_SYMBOLS), none) + ENABLE_DEBUG_SYMBOLS := false +else ifeq ($(DEBUG_SYMBOLS), internal) + ENABLE_DEBUG_SYMBOLS := false # -g option only. + DEBUG_BINARIES := true + STRIP_POLICY := no_strip + STRIP := +else ifeq ($(DEBUG_SYMBOLS), external) + ENABLE_DEBUG_SYMBOLS := true + ZIP_DEBUGINFO_FILES := false +else ifeq ($(DEBUG_SYMBOLS), zipped) + ENABLE_DEBUG_SYMBOLS := true + ZIP_DEBUGINFO_FILES := true +endif # # Compress (or not) jars --- old/make/common/NativeCompilation.gmk 2015-11-17 12:28:51.690534775 +0900 +++ new/make/common/NativeCompilation.gmk 2015-11-17 12:28:51.578359525 +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