Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/bsd/makefiles/defs.make
32285 views
1
#
2
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.
8
#
9
# This code is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
# version 2 for more details (a copy is included in the LICENSE file that
13
# accompanied this code).
14
#
15
# You should have received a copy of the GNU General Public License version
16
# 2 along with this work; if not, write to the Free Software Foundation,
17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
#
19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
# or visit www.oracle.com if you need additional information or have any
21
# questions.
22
#
23
#
24
25
# The common definitions for hotspot bsd builds.
26
# Include the top level defs.make under make directory instead of this one.
27
# This file is included into make/defs.make.
28
29
SLASH_JAVA ?= /java
30
31
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
32
33
ifndef ARCH
34
ARCH := $(shell uname -m)
35
endif
36
37
PATH_SEP = :
38
ifeq ($(LP64), 1)
39
ARCH_DATA_MODEL ?= 64
40
else
41
ARCH_DATA_MODEL ?= 32
42
endif
43
44
# zero
45
ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
46
ifeq ($(ARCH_DATA_MODEL), 64)
47
MAKE_ARGS += LP64=1
48
endif
49
PLATFORM = bsd-zero
50
VM_PLATFORM = bsd_$(subst i386,i486,$(ZERO_LIBARCH))
51
HS_ARCH = zero
52
ARCH = zero
53
endif
54
55
# ia64
56
ifeq ($(ARCH), ia64)
57
ARCH_DATA_MODEL = 64
58
MAKE_ARGS += LP64=1
59
PLATFORM = bsd-ia64
60
VM_PLATFORM = bsd_ia64
61
HS_ARCH = ia64
62
endif
63
64
# sparc
65
ifeq ($(ARCH), sparc64)
66
ifeq ($(ARCH_DATA_MODEL), 64)
67
ARCH_DATA_MODEL = 64
68
MAKE_ARGS += LP64=1
69
PLATFORM = bsd-sparcv9
70
VM_PLATFORM = bsd_sparcv9
71
else
72
ARCH_DATA_MODEL = 32
73
PLATFORM = bsd-sparc
74
VM_PLATFORM = bsd_sparc
75
endif
76
HS_ARCH = sparc
77
endif
78
79
# amd64
80
ifneq (,$(findstring $(ARCH), amd64 x86_64))
81
ifeq ($(ARCH_DATA_MODEL), 64)
82
ARCH_DATA_MODEL = 64
83
MAKE_ARGS += LP64=1
84
PLATFORM = bsd-amd64
85
VM_PLATFORM = bsd_amd64
86
HS_ARCH = x86
87
else
88
ARCH_DATA_MODEL = 32
89
PLATFORM = bsd-i586
90
VM_PLATFORM = bsd_i486
91
HS_ARCH = x86
92
# We have to reset ARCH to i386 since SRCARCH relies on it
93
ARCH = i386
94
endif
95
endif
96
97
# i386
98
ifeq ($(ARCH), i386)
99
ifeq ($(ARCH_DATA_MODEL), 64)
100
ARCH_DATA_MODEL = 64
101
MAKE_ARGS += LP64=1
102
PLATFORM = bsd-amd64
103
VM_PLATFORM = bsd_amd64
104
HS_ARCH = x86
105
# We have to reset ARCH to amd64 since SRCARCH relies on it
106
ARCH = amd64
107
else
108
ARCH_DATA_MODEL = 32
109
PLATFORM = bsd-i586
110
VM_PLATFORM = bsd_i486
111
HS_ARCH = x86
112
endif
113
endif
114
115
# ARM
116
ifeq ($(ARCH), arm)
117
ARCH_DATA_MODEL = 32
118
PLATFORM = bsd-arm
119
VM_PLATFORM = bsd_arm
120
HS_ARCH = arm
121
endif
122
123
# AArch64
124
ifeq ($(ARCH), aarch64)
125
ARCH_DATA_MODEL = 64
126
MAKE_ARGS += LP64=1
127
PLATFORM = bsd-aarch64
128
VM_PLATFORM = bsd_aarch64
129
HS_ARCH = aarch64
130
endif
131
132
# PPC
133
ifeq ($(ARCH), ppc)
134
ARCH_DATA_MODEL = 32
135
PLATFORM = bsd-ppc
136
VM_PLATFORM = bsd_ppc
137
HS_ARCH = ppc
138
endif
139
140
# On 32 bit bsd we build server and client, on 64 bit just server.
141
ifeq ($(JVM_VARIANTS),)
142
ifeq ($(ARCH_DATA_MODEL), 32)
143
JVM_VARIANTS:=client,server
144
JVM_VARIANT_CLIENT:=true
145
JVM_VARIANT_SERVER:=true
146
else
147
JVM_VARIANTS:=server
148
JVM_VARIANT_SERVER:=true
149
endif
150
endif
151
152
OS_VENDOR:=$(shell uname -s)
153
154
# determine if HotSpot is being built in JDK6 or earlier version
155
JDK6_OR_EARLIER=0
156
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
157
# if the longer variable names (newer build style) are set, then check those
158
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
159
JDK6_OR_EARLIER=1
160
endif
161
else
162
# the longer variables aren't set so check the shorter variable names
163
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
164
JDK6_OR_EARLIER=1
165
endif
166
endif
167
168
ifeq ($(JDK6_OR_EARLIER),0)
169
# Full Debug Symbols is supported on JDK7 or newer.
170
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
171
# builds is enabled with debug info files ZIP'ed to save space. For
172
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
173
# debug build without debug info isn't very useful.
174
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
175
#
176
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
177
# disabled for a BUILD_FLAVOR == product build.
178
#
179
# Note: Use of a different variable name for the FDS override option
180
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
181
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
182
# in options via environment variables, use of distinct variables
183
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
184
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
185
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
186
# the same variable name is used, then different values can be picked
187
# up by different parts of the build. Just to be clear, we only need
188
# two variable names because the incoming option value can be
189
# overridden in some situations, e.g., a BUILD_FLAVOR != product
190
# build.
191
192
# Due to the multiple sub-make processes that occur this logic gets
193
# executed multiple times. We reduce the noise by at least checking that
194
# BUILD_FLAVOR has been set.
195
ifneq ($(BUILD_FLAVOR),)
196
ifeq ($(BUILD_FLAVOR), product)
197
FULL_DEBUG_SYMBOLS ?= 1
198
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
199
else
200
# debug variants always get Full Debug Symbols (if available)
201
ENABLE_FULL_DEBUG_SYMBOLS = 1
202
endif
203
_JUNK_ := $(shell \
204
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
205
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
206
207
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
208
ifeq ($(OS_VENDOR), Darwin)
209
# MacOS X doesn't use OBJCOPY or STRIP_POLICY
210
OBJCOPY=
211
STRIP_POLICY=
212
ZIP_DEBUGINFO_FILES ?= 1
213
else
214
# Default OBJCOPY comes from GNU Binutils on BSD
215
ifeq ($(CROSS_COMPILE_ARCH),)
216
DEF_OBJCOPY=/usr/bin/objcopy
217
else
218
# Assume objcopy is part of the cross-compilation toolset
219
ifneq ($(ALT_COMPILER_PATH),)
220
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
221
endif
222
endif
223
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
224
ifneq ($(ALT_OBJCOPY),)
225
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
226
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
227
endif
228
229
ifeq ($(OBJCOPY),)
230
_JUNK_ := $(shell \
231
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo" \
232
"files. You may need to set ALT_OBJCOPY.")
233
ENABLE_FULL_DEBUG_SYMBOLS=0
234
_JUNK_ := $(shell \
235
echo >&2 "INFO:" \
236
"ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
237
else
238
_JUNK_ := $(shell \
239
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo" \
240
"files.")
241
242
# Library stripping policies for .debuginfo configs:
243
# all_strip - strips everything from the library
244
# min_strip - strips most stuff from the library; leaves
245
# minimum symbols
246
# no_strip - does not strip the library at all
247
#
248
# Oracle security policy requires "all_strip". A waiver was
249
# granted on 2011.09.01 that permits using "min_strip" in the
250
# Java JDK and Java JRE.
251
#
252
# Currently, STRIP_POLICY is only used when Full Debug Symbols
253
# is enabled.
254
#
255
STRIP_POLICY ?= min_strip
256
257
_JUNK_ := $(shell \
258
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
259
260
ZIP_DEBUGINFO_FILES ?= 1
261
endif
262
263
_JUNK_ := $(shell \
264
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
265
endif
266
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
267
endif # BUILD_FLAVOR
268
endif # JDK_6_OR_EARLIER
269
270
JDK_INCLUDE_SUBDIR=bsd
271
272
# Library suffix
273
ifeq ($(OS_VENDOR),Darwin)
274
LIBRARY_SUFFIX=dylib
275
else
276
LIBRARY_SUFFIX=so
277
endif
278
279
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
280
281
# client and server subdirectories have symbolic links to ../libjsig.so
282
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
283
284
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
285
ifeq ($(ZIP_DEBUGINFO_FILES),1)
286
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
287
else
288
ifeq ($(OS_VENDOR), Darwin)
289
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM
290
else
291
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
292
endif
293
endif
294
endif
295
296
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
297
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
298
EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
299
300
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
301
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
302
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
303
304
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
305
ifeq ($(ZIP_DEBUGINFO_FILES),1)
306
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
307
else
308
ifeq ($(OS_VENDOR), Darwin)
309
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM
310
else
311
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
312
endif
313
endif
314
endif
315
endif
316
317
ifeq ($(JVM_VARIANT_CLIENT),true)
318
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
319
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
320
321
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
322
ifeq ($(ZIP_DEBUGINFO_FILES),1)
323
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
324
else
325
ifeq ($(OS_VENDOR), Darwin)
326
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX).dSYM
327
else
328
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
329
endif
330
endif
331
endif
332
endif
333
334
ifeq ($(JVM_VARIANT_MINIMAL1),true)
335
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt
336
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
337
endif
338
339
# Serviceability Binaries
340
# No SA Support for PPC, IA64, ARM or zero
341
ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
342
$(EXPORT_LIB_DIR)/sa-jdi.jar
343
344
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
345
ifeq ($(ZIP_DEBUGINFO_FILES),1)
346
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
347
else
348
ifeq ($(OS_VENDOR), Darwin)
349
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM
350
else
351
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
352
endif
353
endif
354
endif
355
356
ADD_SA_BINARIES/aarch64 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
357
$(EXPORT_LIB_DIR)/sa-jdi.jar
358
ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
359
$(EXPORT_LIB_DIR)/sa-jdi.jar
360
ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
361
$(EXPORT_LIB_DIR)/sa-jdi.jar
362
363
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
364
ifeq ($(ZIP_DEBUGINFO_FILES),1)
365
ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
366
else
367
ifeq ($(OS_VENDOR), Darwin)
368
ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM
369
else
370
ADD_SA_BINARIES/universal += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
371
endif
372
endif
373
endif
374
375
ADD_SA_BINARIES/ppc =
376
ADD_SA_BINARIES/ia64 =
377
ADD_SA_BINARIES/arm =
378
ADD_SA_BINARIES/zero =
379
380
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
381
382
# Universal build settings
383
ifeq ($(OS_VENDOR), Darwin)
384
# Build universal binaries by default on Mac OS X
385
MACOSX_UNIVERSAL = true
386
ifneq ($(ALT_MACOSX_UNIVERSAL),)
387
MACOSX_UNIVERSAL = $(ALT_MACOSX_UNIVERSAL)
388
endif
389
MAKE_ARGS += MACOSX_UNIVERSAL=$(MACOSX_UNIVERSAL)
390
391
# Universal settings
392
ifeq ($(MACOSX_UNIVERSAL), true)
393
394
# Set universal export path but avoid using ARCH or PLATFORM subdirs
395
EXPORT_PATH=$(OUTPUTDIR)/export-universal$(EXPORT_SUBDIR)
396
ifneq ($(ALT_EXPORT_PATH),)
397
EXPORT_PATH=$(ALT_EXPORT_PATH)
398
endif
399
400
# Set universal image dir
401
JDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-universal$(EXPORT_SUBDIR)
402
ifneq ($(ALT_JDK_IMAGE_DIR),)
403
JDK_IMAGE_DIR=$(ALT_JDK_IMAGE_DIR)
404
endif
405
406
# Binaries to 'universalize' if built
407
UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX)
408
UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX)
409
UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX)
410
UNIVERSAL_LIPO_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX)
411
412
# Files to simply copy in place
413
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/Xusage.txt
414
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/Xusage.txt
415
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
416
ifeq ($(ZIP_DEBUGINFO_FILES),1)
417
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.diz
418
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.diz
419
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.diz
420
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.diz
421
else
422
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX).dSYM
423
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX).dSYM
424
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX).dSYM
425
UNIVERSAL_COPY_LIST += $(EXPORT_JRE_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX).dSYM
426
endif
427
endif
428
429
endif
430
endif
431
432