make/linux/makefiles/defs.make
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot-emb Sdiff make/linux/makefiles

make/linux/makefiles/defs.make

Print this page




 153   # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
 154   # debug build without debug info isn't very useful.
 155   # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
 156   #
 157   # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
 158   # disabled for a BUILD_FLAVOR == product build.
 159   #
 160   # Note: Use of a different variable name for the FDS override option
 161   # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
 162   # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
 163   # in options via environment variables, use of distinct variables
 164   # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
 165   # product build, the FULL_DEBUG_SYMBOLS environment variable will be
 166   # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
 167   # the same variable name is used, then different values can be picked
 168   # up by different parts of the build. Just to be clear, we only need
 169   # two variable names because the incoming option value can be
 170   # overridden in some situations, e.g., a BUILD_FLAVOR != product
 171   # build.
 172 




 173   ifeq ($(BUILD_FLAVOR), product)
 174     FULL_DEBUG_SYMBOLS ?= 1
 175     ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 176   else
 177     # debug variants always get Full Debug Symbols (if available)
 178     ENABLE_FULL_DEBUG_SYMBOLS = 1
 179   endif
 180   _JUNK_ := $(shell \
 181     echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
 182   # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 183 
 184   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 185     # Default OBJCOPY comes from GNU Binutils on Linux:

 186     DEF_OBJCOPY=/usr/bin/objcopy
 187     ifdef CROSS_COMPILE_ARCH
 188       # don't try to generate .debuginfo files when cross compiling
 189       _JUNK_ := $(shell \
 190         echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
 191           "skipping .debuginfo generation.")
 192       OBJCOPY=
 193     else
 194       OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))

 195       ifneq ($(ALT_OBJCOPY),)
 196         _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
 197         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
 198       endif
 199     endif
 200   else
 201     OBJCOPY=
 202   endif
 203 
 204   ifeq ($(OBJCOPY),)
 205     _JUNK_ := $(shell \
 206       echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
 207     ENABLE_FULL_DEBUG_SYMBOLS=0
 208     _JUNK_ := $(shell \
 209       echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
 210   else
 211     _JUNK_ := $(shell \
 212       echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 213 
 214     # Library stripping policies for .debuginfo configs:
 215     #   all_strip - strips everything from the library
 216     #   min_strip - strips most stuff from the library; leaves minimum symbols
 217     #   no_strip  - does not strip the library at all
 218     #
 219     # Oracle security policy requires "all_strip". A waiver was granted on
 220     # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 221     #
 222     # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
 223     #
 224     STRIP_POLICY ?= min_strip
 225 
 226     _JUNK_ := $(shell \
 227       echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
 228 
 229     ZIP_DEBUGINFO_FILES ?= 1
 230 
 231     _JUNK_ := $(shell \
 232       echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
 233   endif
 234 endif


 235 
 236 JDK_INCLUDE_SUBDIR=linux
 237 
 238 # Library suffix
 239 LIBRARY_SUFFIX=so
 240 
 241 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
 242 VM_DEBUG=jvmg
 243 
 244 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
 245 
 246 # client and server subdirectories have symbolic links to ../libjsig.so
 247 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
 248 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 249   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 250     EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
 251   else
 252     EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
 253   endif
 254 endif




 153   # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
 154   # debug build without debug info isn't very useful.
 155   # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
 156   #
 157   # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
 158   # disabled for a BUILD_FLAVOR == product build.
 159   #
 160   # Note: Use of a different variable name for the FDS override option
 161   # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
 162   # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
 163   # in options via environment variables, use of distinct variables
 164   # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
 165   # product build, the FULL_DEBUG_SYMBOLS environment variable will be
 166   # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
 167   # the same variable name is used, then different values can be picked
 168   # up by different parts of the build. Just to be clear, we only need
 169   # two variable names because the incoming option value can be
 170   # overridden in some situations, e.g., a BUILD_FLAVOR != product
 171   # build.
 172 
 173   # Due to the multiple sub-make processes that occur this logic gets
 174   # executed multiple times.We reduce the noise by at least checking that
 175   # BUILD_FLAVOR has been set.
 176   ifneq ($(BUILD_FLAVOR),)
 177     ifeq ($(BUILD_FLAVOR), product)
 178       FULL_DEBUG_SYMBOLS ?= 1
 179       ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
 180     else
 181       # debug variants always get Full Debug Symbols (if available)
 182       ENABLE_FULL_DEBUG_SYMBOLS = 1
 183     endif
 184     _JUNK_ := $(shell \
 185       echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
 186     # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
 187 
 188     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 189       # Default OBJCOPY comes from GNU Binutils on Linux:
 190       ifeq ($(CROSS_COMPILE_ARCH),)
 191         DEF_OBJCOPY=/usr/bin/objcopy







 192         OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
 193       endif
 194       ifneq ($(ALT_OBJCOPY),)
 195         _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
 196         OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
 197       endif




 198 
 199       ifeq ($(OBJCOPY),)
 200         _JUNK_ := $(shell \
 201           echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
 202         ENABLE_FULL_DEBUG_SYMBOLS=0
 203         _JUNK_ := $(shell \
 204           echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
 205       else
 206         _JUNK_ := $(shell \
 207           echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
 208 
 209         # Library stripping policies for .debuginfo configs:
 210         #   all_strip - strips everything from the library
 211         #   min_strip - strips most stuff from the library; leaves minimum symbols
 212         #   no_strip  - does not strip the library at all
 213         #
 214         # Oracle security policy requires "all_strip". A waiver was granted on
 215         # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
 216         #
 217         # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
 218         #
 219         STRIP_POLICY ?= min_strip
 220 
 221         _JUNK_ := $(shell \
 222           echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
 223 
 224         ZIP_DEBUGINFO_FILES ?= 1
 225 
 226         _JUNK_ := $(shell \
 227           echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
 228       endif
 229     endif # ENABLE_FULL_DEBUG_SYMBOLS=1
 230   endif # BUILD_FLAVOR
 231 endif # JDK_6_OR_EARLIER
 232 
 233 JDK_INCLUDE_SUBDIR=linux
 234 
 235 # Library suffix
 236 LIBRARY_SUFFIX=so
 237 
 238 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
 239 VM_DEBUG=jvmg
 240 
 241 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
 242 
 243 # client and server subdirectories have symbolic links to ../libjsig.so
 244 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
 245 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 246   ifeq ($(ZIP_DEBUGINFO_FILES),1)
 247     EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
 248   else
 249     EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
 250   endif
 251 endif


make/linux/makefiles/defs.make
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File