jdk/make/common/Defs-solaris.gmk
changeset 12853 7bdaa5aefd3d
parent 12445 9df4dd548612
child 12876 e1e6355c440a
equal deleted inserted replaced
12852:1582fa1cfa04 12853:7bdaa5aefd3d
    97 # variable name is used, then different values can be picked up by
    97 # variable name is used, then different values can be picked up by
    98 # different parts of the build. Just to be clear, we only need two
    98 # different parts of the build. Just to be clear, we only need two
    99 # variable names because the incoming option value can be overridden
    99 # variable names because the incoming option value can be overridden
   100 # in some situations, e.g., a VARIANT != OPT build.
   100 # in some situations, e.g., a VARIANT != OPT build.
   101 
   101 
       
   102 ADD_GNU_DEBUGLINK = $(ABS_BUILDTOOLBINDIR)/add_gnu_debuglink
       
   103 FIX_EMPTY_SEC_HDR_FLAGS = $(ABS_BUILDTOOLBINDIR)/fix_empty_sec_hdr_flags
       
   104 
   102 ifeq ($(VARIANT), OPT)
   105 ifeq ($(VARIANT), OPT)
   103   FULL_DEBUG_SYMBOLS ?= 1
   106   FULL_DEBUG_SYMBOLS ?= 1
   104   ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
   107   ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
   105 else
   108 else
   106   # debug variants always get Full Debug Symbols (if available)
   109   # debug variants always get Full Debug Symbols (if available)
   111 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
   114 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
   112 
   115 
   113 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   116 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   114   # Default OBJCOPY comes from the SUNWbinutils package:
   117   # Default OBJCOPY comes from the SUNWbinutils package:
   115   DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
   118   DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
   116   ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
   119   OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
   117     # On Solaris AMD64/X64, gobjcopy is not happy and fails:
   120   ifneq ($(ALT_OBJCOPY),)
   118     #
   121     _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
   119     # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
   122     # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
   120     # BFD: stKPaiop: Not enough room for program headers, try linking with -N
   123     OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   121     # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
       
   122     # BFD: stKPaiop: Not enough room for program headers, try linking with -N
       
   123     # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
       
   124     # BFD: stKPaiop: Not enough room for program headers, try linking with -N
       
   125     # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
       
   126     _JUNK_ := $(shell \
       
   127       echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
       
   128     OBJCOPY=
       
   129   else
       
   130     OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
       
   131     ifneq ($(ALT_OBJCOPY),)
       
   132       _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
       
   133       # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
       
   134       OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
       
   135     endif
       
   136   endif
   124   endif
   137 
   125 
   138   # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
   126   # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
   139   # JDK build to import .debuginfo or .diz files from the HotSpot build.
   127   # JDK build to import .debuginfo or .diz files from the HotSpot build.
   140   # However, adding FDS support to the JDK build will occur in phases
   128   # However, adding FDS support to the JDK build will occur in phases