Mercurial > hg > graal-compiler
comparison make/linux/makefiles/defs.make @ 6022:74c359c4a9e5
Merge
author | dcubed |
---|---|
date | Tue, 24 Apr 2012 15:20:40 -0700 |
parents | 3d7ea1dbe0de 744728c16316 |
children | a9fed06c01d2 |
comparison
equal
deleted
inserted
replaced
6019:f33c4d0f4c9e | 6022:74c359c4a9e5 |
---|---|
139 JDK6_OR_EARLIER=1 | 139 JDK6_OR_EARLIER=1 |
140 endif | 140 endif |
141 endif | 141 endif |
142 | 142 |
143 ifeq ($(JDK6_OR_EARLIER),0) | 143 ifeq ($(JDK6_OR_EARLIER),0) |
144 # Full Debug Symbols is supported on JDK7 or newer | 144 # Full Debug Symbols is supported on JDK7 or newer. |
145 | 145 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product |
146 # Default OBJCOPY comes from GNU Binutils on Linux: | 146 # builds is enabled with debug info files ZIP'ed to save space. For |
147 DEF_OBJCOPY=/usr/bin/objcopy | 147 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a |
148 ifdef CROSS_COMPILE_ARCH | 148 # debug build without debug info isn't very useful. |
149 # don't try to generate .debuginfo files when cross compiling | 149 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. |
150 _JUNK_ := $(shell \ | 150 # |
151 echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ | 151 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be |
152 "skipping .debuginfo generation.") | 152 # disabled for a BUILD_FLAVOR == product build. |
153 # | |
154 # Note: Use of a different variable name for the FDS override option | |
155 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS | |
156 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass | |
157 # in options via environment variables, use of distinct variables | |
158 # prevents strange behaviours. For example, in a BUILD_FLAVOR != | |
159 # product build, the FULL_DEBUG_SYMBOLS environment variable will be | |
160 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If | |
161 # the same variable name is used, then different values can be picked | |
162 # up by different parts of the build. Just to be clear, we only need | |
163 # two variable names because the incoming option value can be | |
164 # overridden in some situations, e.g., a BUILD_FLAVOR != product | |
165 # build. | |
166 | |
167 ifeq ($(BUILD_FLAVOR), product) | |
168 FULL_DEBUG_SYMBOLS ?= 1 | |
169 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) | |
170 else | |
171 # debug variants always get Full Debug Symbols (if available) | |
172 ENABLE_FULL_DEBUG_SYMBOLS = 1 | |
173 endif | |
174 _JUNK_ := $(shell \ | |
175 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
176 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later | |
177 | |
178 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
179 # Default OBJCOPY comes from GNU Binutils on Linux: | |
180 DEF_OBJCOPY=/usr/bin/objcopy | |
181 ifdef CROSS_COMPILE_ARCH | |
182 # don't try to generate .debuginfo files when cross compiling | |
183 _JUNK_ := $(shell \ | |
184 echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ | |
185 "skipping .debuginfo generation.") | |
186 OBJCOPY= | |
187 else | |
188 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) | |
189 ifneq ($(ALT_OBJCOPY),) | |
190 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") | |
191 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) | |
192 endif | |
193 endif | |
194 else | |
153 OBJCOPY= | 195 OBJCOPY= |
154 else | 196 endif |
155 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) | 197 |
156 ifneq ($(ALT_OBJCOPY),) | |
157 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") | |
158 # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path | |
159 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) | |
160 endif | |
161 endif | |
162 | |
163 ifeq ($(OBJCOPY),) | 198 ifeq ($(OBJCOPY),) |
164 _JUNK_ := $(shell \ | 199 _JUNK_ := $(shell \ |
165 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") | 200 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") |
201 ENABLE_FULL_DEBUG_SYMBOLS=0 | |
202 _JUNK_ := $(shell \ | |
203 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
166 else | 204 else |
167 _JUNK_ := $(shell \ | 205 _JUNK_ := $(shell \ |
168 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") | 206 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") |
169 | 207 |
170 # Library stripping policies for .debuginfo configs: | 208 # Library stripping policies for .debuginfo configs: |
171 # all_strip - strips everything from the library | 209 # all_strip - strips everything from the library |
172 # min_strip - strips most stuff from the library; leaves minimum symbols | 210 # min_strip - strips most stuff from the library; leaves minimum symbols |
173 # no_strip - does not strip the library at all | 211 # no_strip - does not strip the library at all |
174 # | 212 # |
175 # Oracle security policy requires "all_strip". A waiver was granted on | 213 # Oracle security policy requires "all_strip". A waiver was granted on |
176 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. | 214 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. |
177 # | 215 # |
178 DEF_STRIP_POLICY="min_strip" | 216 # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. |
179 ifeq ($(ALT_STRIP_POLICY),) | 217 # |
180 STRIP_POLICY=$(DEF_STRIP_POLICY) | 218 STRIP_POLICY ?= min_strip |
181 else | 219 |
182 STRIP_POLICY=$(ALT_STRIP_POLICY) | |
183 endif | |
184 | |
185 _JUNK_ := $(shell \ | 220 _JUNK_ := $(shell \ |
186 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") | 221 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") |
222 | |
223 ZIP_DEBUGINFO_FILES ?= 1 | |
224 | |
225 _JUNK_ := $(shell \ | |
226 echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") | |
187 endif | 227 endif |
188 endif | 228 endif |
189 | 229 |
190 JDK_INCLUDE_SUBDIR=linux | 230 JDK_INCLUDE_SUBDIR=linux |
191 | 231 |
197 | 237 |
198 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html | 238 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html |
199 | 239 |
200 # client and server subdirectories have symbolic links to ../libjsig.so | 240 # client and server subdirectories have symbolic links to ../libjsig.so |
201 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) | 241 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) |
202 ifneq ($(OBJCOPY),) | 242 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
203 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo | 243 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
244 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz | |
245 else | |
246 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo | |
247 endif | |
204 endif | 248 endif |
205 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server | 249 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server |
206 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client | 250 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client |
207 | 251 |
208 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar | 252 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar |
209 | 253 |
210 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) | 254 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) |
211 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt | 255 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt |
212 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) | 256 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) |
213 ifneq ($(OBJCOPY),) | 257 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
214 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo | 258 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
259 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz | |
260 else | |
261 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo | |
262 endif | |
215 endif | 263 endif |
216 endif | 264 endif |
217 | 265 |
218 ifeq ($(JVM_VARIANT_CLIENT),true) | 266 ifeq ($(JVM_VARIANT_CLIENT),true) |
219 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt | 267 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt |
220 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) | 268 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) |
221 ifneq ($(OBJCOPY),) | 269 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
222 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo | 270 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
271 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz | |
272 else | |
273 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo | |
274 endif | |
223 endif | 275 endif |
224 endif | 276 endif |
225 | 277 |
226 # Serviceability Binaries | 278 # Serviceability Binaries |
227 # No SA Support for PPC, IA64, ARM or zero | 279 # No SA Support for PPC, IA64, ARM or zero |
228 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ | 280 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ |
229 $(EXPORT_LIB_DIR)/sa-jdi.jar | 281 $(EXPORT_LIB_DIR)/sa-jdi.jar |
230 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ | 282 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ |
231 $(EXPORT_LIB_DIR)/sa-jdi.jar | 283 $(EXPORT_LIB_DIR)/sa-jdi.jar |
232 ifneq ($(OBJCOPY),) | 284 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
233 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | 285 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
234 ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | 286 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz |
287 ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz | |
288 else | |
289 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | |
290 ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | |
291 endif | |
235 endif | 292 endif |
236 ADD_SA_BINARIES/ppc = | 293 ADD_SA_BINARIES/ppc = |
237 ADD_SA_BINARIES/ia64 = | 294 ADD_SA_BINARIES/ia64 = |
238 ADD_SA_BINARIES/arm = | 295 ADD_SA_BINARIES/arm = |
239 ADD_SA_BINARIES/zero = | 296 ADD_SA_BINARIES/zero = |