Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001756

Hotspot makefiles report missing OBJCOPY command in the wrong circumstances

XMLWordPrintable

    • b09

        The Full Debug Symbol (FDS) makefile logic is as follows (<os>/makefiles/defs.make):

         ifeq ($(BUILD_FLAVOR), product)
            FULL_DEBUG_SYMBOLS ?= 1
            ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
          else
            # debug variants always get Full Debug Symbols (if available)
            ENABLE_FULL_DEBUG_SYMBOLS = 1
          endif
          _JUNK_ := $(shell \
            echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
          # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later

          ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
           ...
          else
            OBJCOPY=
          endif

        So if we have explicitly disabled FDS then OBJCOPY will be cleared by the above. However we then have:

          ifeq ($(OBJCOPY),)
            _JUNK_ := $(shell \
              echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
            ENABLE_FULL_DEBUG_SYMBOLS=0
            _JUNK_ := $(shell \
              echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")

        So we then erroneously (and noisily) report that OBJCOPY could not be found when in fact we never looked for it, and didn't need to.

        The OBJCOPY logic should be folded into the preceding " ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)" block.

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: