Print this page
rev 6896 : 8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
8034005: cannot debug in synchronizer.o or objectMonitor.o on Solaris X86
Summary: Solaris needs objcopy version of 2.21.1 or newer is needed to create valid .debuginfo files.
Reviewed-by: dsamersoff, sspitsyn, dholmes, ihse

Split Split Close
Expand all
Collapse all
          --- old/hotspot/make/solaris/makefiles/defs.make
          +++ new/hotspot/make/solaris/makefiles/defs.make
   1    1  #
   2      -# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
        2 +# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
   3    3  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4  #
   5    5  # This code is free software; you can redistribute it and/or modify it
   6    6  # under the terms of the GNU General Public License version 2 only, as
   7    7  # published by the Free Software Foundation.
   8    8  #
   9    9  # This code is distributed in the hope that it will be useful, but WITHOUT
  10   10  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11  # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12  # version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 113 lines elided ↑ open up ↑
 126  126  
 127  127      ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 128  128        # Default OBJCOPY comes from the SUNWbinutils package:
 129  129        DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
 130  130        OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
 131  131        ifneq ($(ALT_OBJCOPY),)
 132  132          _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
 133  133          OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
 134  134        endif
 135  135  
      136 +      ifneq ($(OBJCOPY),)
      137 +        # OBJCOPY version check:
      138 +        # - version number is last blank separate word on first line
      139 +        # - version number formats that have been seen:
      140 +        #   - <major>.<minor>
      141 +        #   - <major>.<minor>.<micro>
      142 +        #
      143 +        # Full Debug Symbols on Solaris needs version 2.21.1 or newer.
      144 +        #
      145 +        OBJCOPY_VERS_CHK := $(shell \
      146 +          $(OBJCOPY) --version \
      147 +            | sed -n \
      148 +                  -e 's/.* //' \
      149 +                  -e '/^[01]\./b bad' \
      150 +                  -e '/^2\./{' \
      151 +                  -e '  s/^2\.//' \
      152 +                  -e '  /^[0-9]$$/b bad' \
      153 +                  -e '  /^[0-9]\./b bad' \
      154 +                  -e '  /^1[0-9]$$/b bad' \
      155 +                  -e '  /^1[0-9]\./b bad' \
      156 +                  -e '  /^20\./b bad' \
      157 +                  -e '  /^21\.0$$/b bad' \
      158 +                  -e '  /^21\.0\./b bad' \
      159 +                  -e '}' \
      160 +                  -e ':good' \
      161 +                  -e 's/.*/VALID_VERSION/p' \
      162 +                  -e 'q' \
      163 +                  -e ':bad' \
      164 +                  -e 's/.*/BAD_VERSION/p' \
      165 +                  -e 'q' \
      166 +          )
      167 +        ifeq ($(OBJCOPY_VERS_CHK),BAD_VERSION)
      168 +          _JUNK_ := $(shell \
      169 +            echo >&2 "WARNING: $(OBJCOPY) --version info:"; \
      170 +            $(OBJCOPY) --version | sed -n -e 's/^/WARNING: /p' -e 'q' >&2; \
      171 +            echo >&2 "WARNING: an objcopy version of 2.21.1 or newer" \
      172 +              "is needed to create valid .debuginfo files."; \
      173 +            echo >&2 "WARNING: ignoring above objcopy command."; \
      174 +            echo >&2 "WARNING: patch 149063-01 or newer contains the" \
      175 +              "correct Solaris 10 SPARC version."; \
      176 +            echo >&2 "WARNING: patch 149064-01 or newer contains the" \
      177 +              "correct Solaris 10 X86 version."; \
      178 +            echo >&2 "WARNING: Solaris 11 Update 1 contains the" \
      179 +              "correct version."; \
      180 +            )
      181 +          OBJCOPY=
      182 +        endif
      183 +      endif
      184 +
 136  185        ifeq ($(OBJCOPY),)
 137  186          _JUNK_ := $(shell \
 138  187            echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
 139  188          ENABLE_FULL_DEBUG_SYMBOLS=0
 140  189          _JUNK_ := $(shell \
 141  190            echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
 142  191        else
 143  192          _JUNK_ := $(shell \
 144  193            echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 145  194  
↓ open down ↓ 112 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX