diff --git a/make/common/Defs-linux.gmk b/make/common/Defs-linux.gmk index 499bcff8bb0e64b253f2f23c35e0a0939d6b3521..0acdd222a7cf77286469fcbeeabaaa8815d3bc00 100644 --- a/make/common/Defs-linux.gmk +++ b/make/common/Defs-linux.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -73,55 +73,60 @@ SCRIPT_SUFFIX = # CC compiler object code output directive flag value CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! -# Default OBJCOPY comes from GNU Binutils on Linux: -DEF_OBJCOPY=/usr/bin/objcopy -ifdef CROSS_COMPILE_ARCH - # don't try to generate .debuginfo files when cross compiling - _JUNK_ := $(shell \ - echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ - "skipping .debuginfo generation.") - OBJCOPY= -else - OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) - ifneq ($(ALT_OBJCOPY),) - _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") - # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path - OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) +ENABLE_FULL_DEBUG_SYMBOLS ?= 1 +# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later + +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + # Default OBJCOPY comes from GNU Binutils on Linux: + DEF_OBJCOPY=/usr/bin/objcopy + ifdef CROSS_COMPILE_ARCH + # don't try to generate .debuginfo files when cross compiling + _JUNK_ := $(shell \ + echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ + "skipping .debuginfo generation.") + OBJCOPY= + else + OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) + ifneq ($(ALT_OBJCOPY),) + _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") + # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path + OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) + endif endif -endif -ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS -# The setting of OBJCOPY above enables the JDK build to import -# .debuginfo files from the HotSpot build. However, adding FDS -# support to the JDK build will occur in phases so a different -# make variable is used to indicate that a particular library -# supports FDS. + # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the + # JDK build to import .debuginfo or .diz files from the HotSpot build. + # However, adding FDS support to the JDK build will occur in phases + # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS) + # is used to indicate that a particular library supports FDS. -ifeq ($(OBJCOPY),) - _JUNK_ := $(shell \ - echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") -else - _JUNK_ := $(shell \ - echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") - - # Library stripping policies for .debuginfo configs: - # all_strip - strips everything from the library - # min_strip - strips most stuff from the library; leaves minimum symbols - # no_strip - does not strip the library at all - # - # Oracle security policy requires "all_strip". A waiver was granted on - # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. - # - DEF_STRIP_POLICY="min_strip" - ifeq ($(ALT_STRIP_POLICY),) - STRIP_POLICY=$(DEF_STRIP_POLICY) + ifeq ($(OBJCOPY),) + _JUNK_ := $(shell \ + echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") + ENABLE_FULL_DEBUG_SYMBOLS=0 else - STRIP_POLICY=$(ALT_STRIP_POLICY) + _JUNK_ := $(shell \ + echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") + + # Library stripping policies for .debuginfo configs: + # all_strip - strips everything from the library + # min_strip - strips most stuff from the library; leaves minimum symbols + # no_strip - does not strip the library at all + # + # Oracle security policy requires "all_strip". A waiver was granted on + # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. + # + # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. + STRIP_POLICY ?= min_strip + + _JUNK_ := $(shell \ + echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") + + ZIP_DEBUGINFO_FILES ?= 1 + + _JUNK_ := $(shell \ + echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") endif - - _JUNK_ := $(shell \ - echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") -endif endif # @@ -412,6 +417,7 @@ JA_TARGET_ENCODINGS = UTF-8 HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo +SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz # The JDI - Serviceability Agent binding is not currently supported # on Linux-ia64. diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk index 9826b61a6f88bf4d2286e20610b624ddef1cae62..c72f1f40fad6c2b57f7aee179112dc55dd00d80f 100644 --- a/make/common/Defs-solaris.gmk +++ b/make/common/Defs-solaris.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -73,67 +73,68 @@ SCRIPT_SUFFIX = # CC compiler object code output directive flag value CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! -ifdef ENABLE_FULL_DEBUG_SYMBOLS -# Only check for Full Debug Symbols support on Solaris if it is -# specifically enabled. Hopefully, it can be enabled by default -# once the .debuginfo size issues are worked out. - -# Default OBJCOPY comes from the SUNWbinutils package: -DEF_OBJCOPY=/usr/sfw/bin/gobjcopy -ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64) - # On Solaris AMD64/X64, gobjcopy is not happy and fails: - # - # usr/sfw/bin/gobjcopy --add-gnu-debuglink=.debuginfo .so - # BFD: stKPaiop: Not enough room for program headers, try linking with -N - # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value - # BFD: stKPaiop: Not enough room for program headers, try linking with -N - # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value - # BFD: stKPaiop: Not enough room for program headers, try linking with -N - # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value - _JUNK_ := $(shell \ - echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64") - OBJCOPY= -else - OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) - ifneq ($(ALT_OBJCOPY),) - _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") - # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path - OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) +ENABLE_FULL_DEBUG_SYMBOLS ?= 1 +# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later + +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + # Default OBJCOPY comes from the SUNWbinutils package: + DEF_OBJCOPY=/usr/sfw/bin/gobjcopy + ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64) + # On Solaris AMD64/X64, gobjcopy is not happy and fails: + # + # usr/sfw/bin/gobjcopy --add-gnu-debuglink=.debuginfo .so + # BFD: stKPaiop: Not enough room for program headers, try linking with -N + # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value + # BFD: stKPaiop: Not enough room for program headers, try linking with -N + # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value + # BFD: stKPaiop: Not enough room for program headers, try linking with -N + # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value + _JUNK_ := $(shell \ + echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64") + OBJCOPY= + else + OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) + ifneq ($(ALT_OBJCOPY),) + _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") + # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path + OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) + endif endif -endif -ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS -# The setting of OBJCOPY above enables the JDK build to import -# .debuginfo files from the HotSpot build. However, adding FDS -# support to the JDK build will occur in phases so a different -# make variable is used to indicate that a particular library -# supports FDS. + # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the + # JDK build to import .debuginfo or .diz files from the HotSpot build. + # However, adding FDS support to the JDK build will occur in phases + # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS) + # is used to indicate that a particular library supports FDS. -ifeq ($(OBJCOPY),) - _JUNK_ := $(shell \ - echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") -else - _JUNK_ := $(shell \ - echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") - - # Library stripping policies for .debuginfo configs: - # all_strip - strips everything from the library - # min_strip - strips most stuff from the library; leaves minimum symbols - # no_strip - does not strip the library at all - # - # Oracle security policy requires "all_strip". A waiver was granted on - # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. - # - DEF_STRIP_POLICY="min_strip" - ifeq ($(ALT_STRIP_POLICY),) - STRIP_POLICY=$(DEF_STRIP_POLICY) + ifeq ($(OBJCOPY),) + _JUNK_ := $(shell \ + echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") + ENABLE_FULL_DEBUG_SYMBOLS=0 else - STRIP_POLICY=$(ALT_STRIP_POLICY) + _JUNK_ := $(shell \ + echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") + + # Library stripping policies for .debuginfo configs: + # all_strip - strips everything from the library + # min_strip - strips most stuff from the library; leaves minimum symbols + # no_strip - does not strip the library at all + # + # Oracle security policy requires "all_strip". A waiver was granted on + # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. + # + # + # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. + STRIP_POLICY ?= min_strip + + _JUNK_ := $(shell \ + echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") + + ZIP_DEBUGINFO_FILES ?= 1 + + _JUNK_ := $(shell \ + echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") endif - _JUNK_ := $(shell \ - echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") -endif -endif endif # @@ -753,5 +754,6 @@ JA_TARGET_ENCODINGS = eucJP UTF-8 PCK HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo +SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz INCLUDE_SA=true diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk index c23d0244906fba2a2da10638bcd43cef5640a813..3550e9c64af349ba5afb0e6eabc2508d9d409eea 100644 --- a/make/common/Defs-windows.gmk +++ b/make/common/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -75,6 +75,17 @@ endif EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH) +# Full Debug Symbols has been enabled on Windows since JDK1.4.1. +# Default is enabled with debug info files ZIP'ed to save space. + +ENABLE_FULL_DEBUG_SYMBOLS ?= 1 + +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ZIP_DEBUGINFO_FILES ?= 1 +else + ZIP_DEBUGINFO_FILES=0 +endif + # C Compiler flag definitions # @@ -201,7 +212,10 @@ ifeq ($(CC_VERSION),msvc) # /D _STATIC_CPPLIB # Use static link for the C++ runtime (so msvcpnn.dll not needed) # - CFLAGS_COMMON += -Zi -nologo + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + CFLAGS_COMMON += -Zi + endif + CFLAGS_COMMON += -nologo CFLAGS_OPT = $(CC_OPT) CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION) @@ -305,6 +319,7 @@ HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/bin SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX) SAMAP_NAME = $(LIB_PREFIX)sawindbg.map SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb +SA_DIZ_NAME = $(LIB_PREFIX)sawindbg.diz ifeq ($(ARCH), ia64) # SA will never be supported here. diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk index 27af4fa2e6699681c730c6b25a62657d85a3e53e..b6c340cfe9184ab2071f23dd5eb049ba3ba9132e 100644 --- a/make/common/shared/Sanity.gmk +++ b/make/common/shared/Sanity.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -1037,11 +1037,22 @@ ifeq ($(PLATFORM), windows) " and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \ "" >> $(ERROR_FILE) ; \ fi + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) @# @# Check for the .map files - its OK if they are not there.. @# - ifeq ($(ARCH_DATA_MODEL), 32) + ifeq ($(ARCH_DATA_MODEL), 32) @# There is no 64-bit HotSpot client VM + ifeq ($(ZIP_DEBUGINFO_FILES),1) + @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.diz ]; then \ + $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .diz files. \n" \ + " These files are optional and aid in the debugging of the JVM. \n" \ + " Please check your access to \n" \ + " $(HOTSPOT_CLIENT_PATH)/jvm.diz \n" \ + " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ + "" >> $(WARNING_FILE) ; \ + fi + else @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \ $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \ " These files are optional and aid in the debugging of the JVM. \n" \ @@ -1058,7 +1069,18 @@ ifeq ($(PLATFORM), windows) " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ "" >> $(WARNING_FILE) ; \ fi - endif + endif + endif + ifeq ($(ZIP_DEBUGINFO_FILES),1) + @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.diz ]; then \ + $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .diz files. \n" \ + " These files are optional and aid in the debugging of the JVM. \n" \ + " Please check your access to \n" \ + " $(HOTSPOT_SERVER_PATH)/jvm.diz \n" \ + " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ + "" >> $(WARNING_FILE) ; \ + fi + else @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \ $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \ " These files are optional and aid in the debugging of the JVM. \n" \ @@ -1075,6 +1097,8 @@ ifeq ($(PLATFORM), windows) " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ "" >> $(WARNING_FILE) ; \ fi + endif + endif endif diff --git a/make/java/redist/Makefile b/make/java/redist/Makefile index d265ea39c355b2457746f51c86c8a9e3fe534530..f72ad57333b5f6dbeff7ec239b1065195eaaec4c 100644 --- a/make/java/redist/Makefile +++ b/make/java/redist/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -61,9 +61,13 @@ JVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX) JVMDTRACE_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX) JVM_DEBUGINFO_NAME = $(LIB_PREFIX)jvm.debuginfo +JVM_DIZ_NAME = $(LIB_PREFIX)jvm.diz LIBJSIG_DEBUGINFO_NAME = $(LIB_PREFIX)jsig.debuginfo +LIBJSIG_DIZ_NAME = $(LIB_PREFIX)jsig.diz JVMDB_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo +JVMDB_DIZ_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).diz JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo +JVMDTRACE_DIZ_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).diz CLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing @@ -86,10 +90,17 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist ifndef BUILD_CLIENT_ONLY IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \ $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME) + endif endif endif else @@ -101,10 +112,17 @@ ifneq ($(ZERO_BUILD), true) ifeq ($(ARCH_DATA_MODEL), 32) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME) + endif endif endif endif @@ -121,20 +139,56 @@ $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) # Get the hotspot .map and .pdb files for client and server ifndef BUILD_CLIENT_ONLY -IMPORT_LIST += \ - $(LIBDIR)/$(JVMLIB_NAME) \ - $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \ - $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME) + IMPORT_LIST += $(LIBDIR)/$(JVMLIB_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME) + endif + else + # the import JDK may not contain .pdb files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME)),) + # assume .map file is present if .pdb file is preset + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \ + $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME) + endif + endif + endif endif # Add .map and .pdb files to the import path for client and kernel VMs. # These are only available on 32-bit windows builds. ifeq ($(ARCH_DATA_MODEL), 32) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \ - $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME) - ifeq ($(DO_KERNEL), true) - IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \ - $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME) + endif + else + # the import JDK may not contain .pdb files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)),) + # assume .map file is present if .pdb file is preset + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \ + $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME) + endif + endif + ifeq ($(DO_KERNEL), true) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME) + endif + else + # the import JDK may not contain .pdb files + ifneq ($(wildcard $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)),) + # assume .map file is present if .pdb file is preset + IMPORT_LIST += $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME) \ + $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME) + endif + endif + endif endif endif @@ -165,10 +219,22 @@ $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME): @$(prep-target) -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME) $@ +$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): + @$(prep-target) + -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME) $@ + +$(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_DIZ_NAME): + @$(prep-target) + -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVM_DIZ_NAME) $@ + ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): @$(prep-target) -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@ + +$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): + @$(prep-target) + -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME) $@ endif # Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows @@ -176,18 +242,33 @@ else # PLATFORM # NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) -ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + endif endif endif ifndef BUILD_CLIENT_ONLY IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain the target of the symlink - ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain the target of the symlink + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) + # check for the .diz file, but create the .debuginfo link + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + endif + else + # the import JDK may not contain the target of the symlink + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + endif endif endif endif @@ -195,19 +276,33 @@ endif ifeq ($(PLATFORM), solaris) ifndef BUILD_CLIENT_ONLY IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME) + endif endif endif # The conditional can be removed when import JDKs contain these files. ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) + endif endif endif else @@ -220,10 +315,18 @@ ifneq ($(ZERO_BUILD), true) ifeq ($(ARCH_DATA_MODEL), 32) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) -ifneq ($(OBJCOPY),) - # the import JDK may not contain the target of the symlink - ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain the target of the symlink + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME)),) + # check for the .diz file, but create the .debuginfo link + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + endif + else + # the import JDK may not contain the target of the symlink + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) + endif endif endif @@ -231,10 +334,17 @@ ifeq ($(PLATFORM), solaris) # solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME) -ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME) + endif endif endif @@ -243,13 +353,22 @@ ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) - endif + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) + endif + endif endif else $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!) @@ -259,10 +378,17 @@ ifndef BUILD_CLIENT_ONLY # The conditional can be removed when import JDKs contain these files. ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME) + endif endif endif else @@ -272,10 +398,17 @@ ifndef BUILD_CLIENT_ONLY # The conditional can be removed when import JDKs contain these files. ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),) IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME) - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME) + endif endif endif else @@ -304,9 +437,14 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAM $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME) $(install-import-file) + endif endif $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME) @@ -317,9 +455,14 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(LIBJSIG_DIZ_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME) $(install-import-file) + endif endif ifndef BUILD_CLIENT_ONLY @@ -328,22 +471,24 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME): @$(prep-target) $(call install-sym-link, ../$(LIBJSIG_NAME)) -ifneq ($(OBJCOPY),) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) +# we don't create a symlink to a libjsig.diz file $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): @$(prep-target) $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME)) -endif + endif else $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME): @$(prep-target) $(call install-sym-link, ../$(LIBJSIG_NAME)) -ifneq ($(OBJCOPY),) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) +# we don't create a symlink to a libjsig.diz file $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): @$(prep-target) $(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME)) -endif + endif endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME) @@ -354,12 +499,20 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$ $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DIZ_NAME) + $(install-import-file) + +$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME) $(install-import-file) $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME) $(install-import-file) + endif endif ifndef BUILD_CLIENT_ONLY @@ -371,13 +524,21 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$ $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DIZ_NAME) + $(install-import-file) + +$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME) $(install-import-file) $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME) $(install-import-file) -endif + endif + endif endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) @@ -388,12 +549,20 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/ $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DIZ_NAME) + $(install-import-file) + +$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME) $(install-import-file) $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME) $(install-import-file) + endif endif ifndef BUILD_CLIENT_ONLY @@ -409,7 +578,17 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAM $(install-import-file) @$(call binary_file_verification,$@) -ifneq ($(OBJCOPY),) +ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DIZ_NAME) + $(install-import-file) + +$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DIZ_NAME) + $(install-import-file) + +$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DIZ_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DIZ_NAME) + $(install-import-file) + else $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME) $(install-import-file) @@ -418,6 +597,7 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SER $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME) $(install-import-file) + endif endif $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt diff --git a/make/java/redist/sajdi/Makefile b/make/java/redist/sajdi/Makefile index 1e1e818772d95a7f5fa1c3de03624f524a08fc50..6bec18ce9d0adc263d62c1c38c053b157cd9ab9f 100644 --- a/make/java/redist/sajdi/Makefile +++ b/make/java/redist/sajdi/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -54,14 +54,26 @@ IMPORT_LIST = ifeq ($(INCLUDE_SA), true) IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \ $(LIB_LOCATION)/$(SALIB_NAME) - ifeq ($(PLATFORM), windows) - IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \ - $(LIB_LOCATION)/$(SAPDB_NAME) - endif - ifneq ($(OBJCOPY),) - # the import JDK may not contain .debuginfo files - ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) + # the import JDK may not contain .diz files + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DIZ_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SA_DIZ_NAME) + endif + else + ifeq ($(PLATFORM), windows) + # the import JDK may not contain .pdb files + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SAPDB_NAME)),) + # assume .map file is present if .pdb is present + IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \ + $(LIB_LOCATION)/$(SAPDB_NAME) + endif + else + # the import JDK may not contain .debuginfo files + ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME) + endif + endif endif endif endif # INCLUDE_SA @@ -80,17 +92,22 @@ $(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar $(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME) $(install-import-file) -ifeq ($(PLATFORM), windows) + ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(ZIP_DEBUGINFO_FILES),1) +$(LIB_LOCATION)/$(SA_DIZ_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DIZ_NAME) + $(install-import-file) + else + ifeq ($(PLATFORM), windows) $(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME) $(install-import-file) $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME) $(install-import-file) -endif # windows - - ifneq ($(OBJCOPY),) + else $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME) $(install-import-file) + endif + endif endif endif # INCLUDE_SA diff --git a/make/jprt.gmk b/make/jprt.gmk index cf79b8242d825eda275112b2c8c561fdf52734fb..117e934d44a3b3875d18696684f2aa373e1638af 100644 --- a/make/jprt.gmk +++ b/make/jprt.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,17 +27,24 @@ JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip +ifeq ($(PLATFORM),windows) + ZIPFLAGS=-q +else + # store symbolic links as the link + ZIPFLAGS=-q -y +endif + jprt_build_product: all images ( $(CD) $(OUTPUTDIR)/j2sdk-image && \ - $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . ) + $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . ) jprt_build_fastdebug: fastdebug images ( $(CD) $(OUTPUTDIR)/j2sdk-image && \ - $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . ) + $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . ) jprt_build_debug: debug images ( $(CD) $(OUTPUTDIR)/j2sdk-image && \ - $(ZIPEXE) -q -r $(JPRT_ARCHIVE_BUNDLE) . ) + $(ZIPEXE) $(ZIPFLAGS) -r $(JPRT_ARCHIVE_BUNDLE) . ) # # Phonies to avoid accidents.