jdk/make/common/Defs-linux.gmk
changeset 10603 c315c8424ce2
parent 9371 ac4c4dd63f1a
child 10700 31c24f40f614
equal deleted inserted replaced
10602:ab8c1e3b237b 10603:c315c8424ce2
    71 # The suffix applied to scripts (.bat for windows, nothing for unix)
    71 # The suffix applied to scripts (.bat for windows, nothing for unix)
    72 SCRIPT_SUFFIX =
    72 SCRIPT_SUFFIX =
    73 # CC compiler object code output directive flag value
    73 # CC compiler object code output directive flag value
    74 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
    74 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
    75 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
    75 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
       
    76 
       
    77 # Default OBJCOPY comes from GNU Binutils on Linux:
       
    78 DEF_OBJCOPY=/usr/bin/objcopy
       
    79 ifdef CROSS_COMPILE_ARCH
       
    80   # don't try to generate .debuginfo files when cross compiling
       
    81   _JUNK_ := $(shell \
       
    82     echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
       
    83       "skipping .debuginfo generation.")
       
    84   OBJCOPY=
       
    85 else
       
    86   OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
       
    87   ifneq ($(ALT_OBJCOPY),)
       
    88     _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
       
    89     # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
       
    90     OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
       
    91   endif
       
    92 endif
       
    93 
       
    94 ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
       
    95 # The setting of OBJCOPY above enables the JDK build to import
       
    96 # .debuginfo files from the HotSpot build. However, adding FDS
       
    97 # support to the JDK build will occur in phases so a different
       
    98 # make variable is used to indicate that a particular library
       
    99 # supports FDS.
       
   100 
       
   101 ifeq ($(OBJCOPY),)
       
   102   _JUNK_ := $(shell \
       
   103     echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
       
   104 else
       
   105   _JUNK_ := $(shell \
       
   106     echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
       
   107 
       
   108   # Library stripping policies for .debuginfo configs:
       
   109   #   all_strip - strips everything from the library
       
   110   #   min_strip - strips most stuff from the library; leaves minimum symbols
       
   111   #   no_strip  - does not strip the library at all
       
   112   #
       
   113   # Oracle security policy requires "all_strip". A waiver was granted on
       
   114   # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
       
   115   #
       
   116   DEF_STRIP_POLICY="min_strip"
       
   117   ifeq ($(ALT_STRIP_POLICY),)
       
   118     STRIP_POLICY=$(DEF_STRIP_POLICY)
       
   119   else
       
   120     STRIP_POLICY=$(ALT_STRIP_POLICY)
       
   121   endif
       
   122 
       
   123   _JUNK_ := $(shell \
       
   124     echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
       
   125 endif
       
   126 endif
    76 
   127 
    77 #
   128 #
    78 # Default optimization
   129 # Default optimization
    79 #
   130 #
    80 
   131 
   357 JA_TARGET_ENCODINGS = UTF-8
   408 JA_TARGET_ENCODINGS = UTF-8
   358 
   409 
   359 # Settings for the JDI - Serviceability Agent binding.
   410 # Settings for the JDI - Serviceability Agent binding.
   360 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
   411 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
   361 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
   412 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
       
   413 SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
   362 
   414 
   363 # The JDI - Serviceability Agent binding is not currently supported
   415 # The JDI - Serviceability Agent binding is not currently supported
   364 # on Linux-ia64.
   416 # on Linux-ia64.
   365 ifeq ($(ARCH), ia64)
   417 ifeq ($(ARCH), ia64)
   366   INCLUDE_SA = false
   418   INCLUDE_SA = false