Mercurial > hg > graal-compiler
comparison make/bsd/makefiles/defs.make @ 13086:096c224171c4
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 20 Nov 2013 00:10:38 +0100 |
parents | f509b8f4699b |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
12782:92b7ec34ddfa | 13086:096c224171c4 |
---|---|
134 JVM_VARIANTS:=server | 134 JVM_VARIANTS:=server |
135 JVM_VARIANT_SERVER:=true | 135 JVM_VARIANT_SERVER:=true |
136 endif | 136 endif |
137 endif | 137 endif |
138 | 138 |
139 OS_VENDOR:=$(shell uname -s) | |
140 | |
141 # determine if HotSpot is being built in JDK6 or earlier version | |
142 JDK6_OR_EARLIER=0 | |
143 ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1" | |
144 # if the longer variable names (newer build style) are set, then check those | |
145 ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1" | |
146 JDK6_OR_EARLIER=1 | |
147 endif | |
148 else | |
149 # the longer variables aren't set so check the shorter variable names | |
150 ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1" | |
151 JDK6_OR_EARLIER=1 | |
152 endif | |
153 endif | |
154 | |
155 ifeq ($(JDK6_OR_EARLIER),0) | |
156 # Full Debug Symbols is supported on JDK7 or newer. | |
157 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product | |
158 # builds is enabled with debug info files ZIP'ed to save space. For | |
159 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a | |
160 # debug build without debug info isn't very useful. | |
161 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. | |
162 # | |
163 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be | |
164 # disabled for a BUILD_FLAVOR == product build. | |
165 # | |
166 # Note: Use of a different variable name for the FDS override option | |
167 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS | |
168 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass | |
169 # in options via environment variables, use of distinct variables | |
170 # prevents strange behaviours. For example, in a BUILD_FLAVOR != | |
171 # product build, the FULL_DEBUG_SYMBOLS environment variable will be | |
172 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If | |
173 # the same variable name is used, then different values can be picked | |
174 # up by different parts of the build. Just to be clear, we only need | |
175 # two variable names because the incoming option value can be | |
176 # overridden in some situations, e.g., a BUILD_FLAVOR != product | |
177 # build. | |
178 | |
179 # Due to the multiple sub-make processes that occur this logic gets | |
180 # executed multiple times. We reduce the noise by at least checking that | |
181 # BUILD_FLAVOR has been set. | |
182 ifneq ($(BUILD_FLAVOR),) | |
183 ifeq ($(BUILD_FLAVOR), product) | |
184 FULL_DEBUG_SYMBOLS ?= 1 | |
185 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) | |
186 else | |
187 # debug variants always get Full Debug Symbols (if available) | |
188 ENABLE_FULL_DEBUG_SYMBOLS = 1 | |
189 endif | |
190 _JUNK_ := $(shell \ | |
191 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
192 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later | |
193 | |
194 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
195 ifeq ($(OS_VENDOR), Darwin) | |
196 # MacOS X doesn't use OBJCOPY or STRIP_POLICY | |
197 OBJCOPY= | |
198 STRIP_POLICY= | |
199 ZIP_DEBUGINFO_FILES ?= 1 | |
200 else | |
201 # Default OBJCOPY comes from GNU Binutils on BSD | |
202 ifeq ($(CROSS_COMPILE_ARCH),) | |
203 DEF_OBJCOPY=/usr/bin/objcopy | |
204 else | |
205 # Assume objcopy is part of the cross-compilation toolset | |
206 ifneq ($(ALT_COMPILER_PATH),) | |
207 DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy | |
208 endif | |
209 endif | |
210 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) | |
211 ifneq ($(ALT_OBJCOPY),) | |
212 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") | |
213 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) | |
214 endif | |
215 | |
216 ifeq ($(OBJCOPY),) | |
217 _JUNK_ := $(shell \ | |
218 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \ | |
219 "files. You may need to set ALT_OBJCOPY.") | |
220 ENABLE_FULL_DEBUG_SYMBOLS=0 | |
221 _JUNK_ := $(shell \ | |
222 echo >&2 "INFO:" \ | |
223 "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") | |
224 else | |
225 _JUNK_ := $(shell \ | |
226 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo" \ | |
227 "files.") | |
228 | |
229 # Library stripping policies for .debuginfo configs: | |
230 # all_strip - strips everything from the library | |
231 # min_strip - strips most stuff from the library; leaves | |
232 # minimum symbols | |
233 # no_strip - does not strip the library at all | |
234 # | |
235 # Oracle security policy requires "all_strip". A waiver was | |
236 # granted on 2011.09.01 that permits using "min_strip" in the | |
237 # Java JDK and Java JRE. | |
238 # | |
239 # Currently, STRIP_POLICY is only used when Full Debug Symbols | |
240 # is enabled. | |
241 # | |
242 STRIP_POLICY ?= min_strip | |
243 | |
244 _JUNK_ := $(shell \ | |
245 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") | |
246 | |
247 ZIP_DEBUGINFO_FILES ?= 1 | |
248 endif | |
249 | |
250 _JUNK_ := $(shell \ | |
251 echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") | |
252 endif | |
253 endif # ENABLE_FULL_DEBUG_SYMBOLS=1 | |
254 endif # BUILD_FLAVOR | |
255 endif # JDK_6_OR_EARLIER | |
256 | |
139 JDK_INCLUDE_SUBDIR=bsd | 257 JDK_INCLUDE_SUBDIR=bsd |
140 | 258 |
141 # Library suffix | 259 # Library suffix |
142 OS_VENDOR:=$(shell uname -s) | |
143 ifeq ($(OS_VENDOR),Darwin) | 260 ifeq ($(OS_VENDOR),Darwin) |
144 LIBRARY_SUFFIX=dylib | 261 LIBRARY_SUFFIX=dylib |
145 else | 262 else |
146 LIBRARY_SUFFIX=so | 263 LIBRARY_SUFFIX=so |
147 endif | 264 endif |
148 | 265 |
149 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html | 266 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html |
150 | 267 |
151 # client and server subdirectories have symbolic links to ../libjsig.so | 268 # client and server subdirectories have symbolic links to ../libjsig.so |
152 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) | 269 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) |
270 | |
271 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
272 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
273 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz | |
274 else | |
275 ifeq ($(OS_VENDOR), Darwin) | |
276 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM | |
277 else | |
278 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo | |
279 endif | |
280 endif | |
281 endif | |
282 | |
153 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server | 283 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server |
154 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client | 284 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client |
155 EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal | 285 EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal |
156 | 286 |
157 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) | 287 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) |
158 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt | 288 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt |
159 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) | 289 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) |
290 | |
291 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
292 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
293 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz | |
294 else | |
295 ifeq ($(OS_VENDOR), Darwin) | |
296 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM | |
297 else | |
298 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo | |
299 endif | |
300 endif | |
301 endif | |
160 endif | 302 endif |
161 | 303 |
162 ifeq ($(JVM_VARIANT_CLIENT),true) | 304 ifeq ($(JVM_VARIANT_CLIENT),true) |
163 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt | 305 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt |
164 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) | 306 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) |
307 | |
308 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
309 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
310 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz | |
311 else | |
312 ifeq ($(OS_VENDOR), Darwin) | |
313 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM | |
314 else | |
315 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo | |
316 endif | |
317 endif | |
318 endif | |
165 endif | 319 endif |
166 | 320 |
167 ifeq ($(JVM_VARIANT_MINIMAL1),true) | 321 ifeq ($(JVM_VARIANT_MINIMAL1),true) |
168 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt | 322 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt |
169 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) | 323 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX) |
170 | |
171 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
172 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
173 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz | |
174 else | |
175 EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo | |
176 endif | |
177 endif | |
178 endif | 324 endif |
179 | 325 |
180 # Serviceability Binaries | 326 # Serviceability Binaries |
181 # No SA Support for PPC, IA64, ARM or zero | 327 # No SA Support for PPC, IA64, ARM or zero |
182 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ | 328 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ |
183 $(EXPORT_LIB_DIR)/sa-jdi.jar | 329 $(EXPORT_LIB_DIR)/sa-jdi.jar |
330 | |
331 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
332 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
333 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz | |
334 else | |
335 ifeq ($(OS_VENDOR), Darwin) | |
336 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM | |
337 else | |
338 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | |
339 endif | |
340 endif | |
341 endif | |
342 | |
184 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ | 343 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ |
185 $(EXPORT_LIB_DIR)/sa-jdi.jar | 344 $(EXPORT_LIB_DIR)/sa-jdi.jar |
186 ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ | 345 ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ |
187 $(EXPORT_LIB_DIR)/sa-jdi.jar | 346 $(EXPORT_LIB_DIR)/sa-jdi.jar |
347 | |
348 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) | |
349 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
350 ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz | |
351 else | |
352 ifeq ($(OS_VENDOR), Darwin) | |
353 ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM | |
354 else | |
355 ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo | |
356 endif | |
357 endif | |
358 endif | |
359 | |
188 ADD_SA_BINARIES/ppc = | 360 ADD_SA_BINARIES/ppc = |
189 ADD_SA_BINARIES/ia64 = | 361 ADD_SA_BINARIES/ia64 = |
190 ADD_SA_BINARIES/arm = | 362 ADD_SA_BINARIES/arm = |
191 ADD_SA_BINARIES/zero = | 363 ADD_SA_BINARIES/zero = |
192 | 364 |
223 UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX) | 395 UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX) |
224 | 396 |
225 # Files to simply copy in place | 397 # Files to simply copy in place |
226 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/Xusage.txt | 398 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/Xusage.txt |
227 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/Xusage.txt | 399 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/Xusage.txt |
228 | 400 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
229 endif | 401 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
230 endif | 402 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.diz |
403 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.diz | |
404 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.diz | |
405 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.diz | |
406 else | |
407 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX).dSYM | |
408 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX).dSYM | |
409 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM | |
410 UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM | |
411 endif | |
412 endif | |
413 | |
414 endif | |
415 endif |