make/common/Defs-solaris.gmk

Print this page

        

@@ -97,10 +97,13 @@
 # variable name is used, then different values can be picked up by
 # different parts of the build. Just to be clear, we only need two
 # variable names because the incoming option value can be overridden
 # in some situations, e.g., a VARIANT != OPT build.
 
+ADD_GNU_DEBUGLINK = $(ABS_BUILDTOOLBINDIR)/add_gnu_debuglink
+FIX_EMPTY_SEC_HDR_FLAGS = $(ABS_BUILDTOOLBINDIR)/fix_empty_sec_hdr_flags
+
 ifeq ($(VARIANT), OPT)
   FULL_DEBUG_SYMBOLS ?= 1
   ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 else
   # debug variants always get Full Debug Symbols (if available)

@@ -111,31 +114,16 @@
 # 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=<lib>.debuginfo <lib>.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
 
   # 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