--- old/make/solaris/makefiles/defs.make 2016-03-07 12:29:09.530160172 +0900 +++ new/make/solaris/makefiles/defs.make 2016-03-07 12:29:09.339162421 +0900 @@ -122,80 +122,83 @@ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) endif - ifneq ($(OBJCOPY),) - # OBJCOPY version check: - # - version number is last blank separate word on first line - # - version number formats that have been seen: - # - . - # - .. - # - # Full Debug Symbols on Solaris needs version 2.21.1 or newer. - # - OBJCOPY_VERS_CHK := $(shell \ - $(OBJCOPY) --version \ - | sed -n \ - -e 's/.* //' \ - -e '/^[01]\./b bad' \ - -e '/^2\./{' \ - -e ' s/^2\.//' \ - -e ' /^[0-9]$$/b bad' \ - -e ' /^[0-9]\./b bad' \ - -e ' /^1[0-9]$$/b bad' \ - -e ' /^1[0-9]\./b bad' \ - -e ' /^20\./b bad' \ - -e ' /^21\.0$$/b bad' \ - -e ' /^21\.0\./b bad' \ - -e '}' \ - -e ':good' \ - -e 's/.*/VALID_VERSION/p' \ - -e 'q' \ - -e ':bad' \ - -e 's/.*/BAD_VERSION/p' \ - -e 'q' \ - ) - ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION) - _JUNK_ := $(shell \ - echo >&2 "WARNING: $(OBJCOPY) --version info:"; \ - $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \ - echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \ - "is needed to create valid .debuginfo files."; \ - echo >&2 "WARNING: ignoring above objcopy command."; \ - echo >&2 "WARNING: patch 149063-01 or newer contains the" \ - "correct Solaris 10 SPARC version."; \ - echo >&2 "WARNING: patch 149064-01 or newer contains the" \ - "correct Solaris 10 X86 version."; \ - echo >&2 "WARNING: Solaris 11 Update 1 contains the" \ - "correct version."; \ + ifeq ($(COPY_DEBUG_SYMBOLS), true) + ifneq ($(OBJCOPY),) + # OBJCOPY version check: + # - version number is last blank separate word on first line + # - version number formats that have been seen: + # - . + # - .. + # + # Full Debug Symbols on Solaris needs version 2.21.1 or newer. + # + OBJCOPY_VERS_CHK := $(shell \ + $(OBJCOPY) --version \ + | sed -n \ + -e 's/.* //' \ + -e '/^[01]\./b bad' \ + -e '/^2\./{' \ + -e ' s/^2\.//' \ + -e ' /^[0-9]$$/b bad' \ + -e ' /^[0-9]\./b bad' \ + -e ' /^1[0-9]$$/b bad' \ + -e ' /^1[0-9]\./b bad' \ + -e ' /^20\./b bad' \ + -e ' /^21\.0$$/b bad' \ + -e ' /^21\.0\./b bad' \ + -e '}' \ + -e ':good' \ + -e 's/.*/VALID_VERSION/p' \ + -e 'q' \ + -e ':bad' \ + -e 's/.*/BAD_VERSION/p' \ + -e 'q' \ ) - OBJCOPY= + ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION) + _JUNK_ := $(shell \ + echo >&2 "WARNING: $(OBJCOPY) --version info:"; \ + $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \ + echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \ + "is needed to create valid .debuginfo files."; \ + echo >&2 "WARNING: ignoring above objcopy command."; \ + echo >&2 "WARNING: patch 149063-01 or newer contains the" \ + "correct Solaris 10 SPARC version."; \ + echo >&2 "WARNING: patch 149064-01 or newer contains the" \ + "correct Solaris 10 X86 version."; \ + echo >&2 "WARNING: Solaris 11 Update 1 contains the" \ + "correct version."; \ + ) + OBJCOPY= + endif endif - endif - - ifeq ($(OBJCOPY),) - $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files.")) - ENABLE_FULL_DEBUG_SYMBOLS=0 - $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) - else - $(eval $(call print_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 + ifeq ($(OBJCOPY),) + $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files.")) + ENABLE_FULL_DEBUG_SYMBOLS=0 + COPY_DEBUG_SYMBOLS=false + $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) + else + $(eval $(call print_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 - $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) + $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) - ZIP_DEBUGINFO_FILES ?= 1 + ZIP_DEBUGINFO_FILES ?= 1 - $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) - endif + $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) + endif + endif # COPY_DEBUG_SYMBOLS=true endif # ENABLE_FULL_DEBUG_SYMBOLS=1 endif # BUILD_FLAVOR @@ -208,7 +211,7 @@ # client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX) EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) -ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) +ifeq ($(COPY_DEBUG_SYMBOLS),true) ifeq ($(ZIP_DEBUGINFO_FILES),1) EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.diz else @@ -228,7 +231,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) endif - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(COPY_DEBUG_SYMBOLS),true) ifeq ($(ZIP_DEBUGINFO_FILES),1) EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.diz @@ -257,7 +260,7 @@ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) endif - ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) + ifeq ($(COPY_DEBUG_SYMBOLS),true) ifeq ($(ZIP_DEBUGINFO_FILES),1) EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.diz