author | never |
Tue, 10 May 2016 21:55:27 +0000 | |
changeset 38664 | 50bf5760d483 |
parent 37402 | 62b5f067032e |
child 37953 | 195cce402934 |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
35747 | 2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
4 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
10 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
16 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
20 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
23 |
# questions. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
24 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
25 |
|
37402 | 26 |
# All valid JVM features, regardless of platform |
27 |
VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \ |
|
28 |
fprof vm-structs jni-check services management all-gcs nmt cds static-build" |
|
29 |
||
30 |
# All valid JVM variants |
|
31 |
VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom" |
|
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
17819
diff
changeset
|
32 |
|
37402 | 33 |
############################################################################### |
34 |
# Check if the specified JVM variant should be built. To be used in shell if |
|
35 |
# constructs, like this: |
|
36 |
# if HOTSPOT_CHECK_JVM_VARIANT(server); then |
|
37 |
# |
|
38 |
# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants. |
|
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
17819
diff
changeset
|
39 |
|
37402 | 40 |
# Definition kept in one line to allow inlining in if statements. |
41 |
# Additional [] needed to keep m4 from mangling shell constructs. |
|
42 |
AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT], |
|
43 |
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ]) |
|
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
17819
diff
changeset
|
44 |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34495
diff
changeset
|
45 |
############################################################################### |
37402 | 46 |
# Check if the specified JVM features are explicitly enabled. To be used in |
47 |
# shell if constructs, like this: |
|
48 |
# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then |
|
49 |
# |
|
50 |
# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features. |
|
51 |
||
52 |
# Definition kept in one line to allow inlining in if statements. |
|
53 |
# Additional [] needed to keep m4 from mangling shell constructs. |
|
54 |
AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE], |
|
55 |
[ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ]) |
|
56 |
||
57 |
############################################################################### |
|
58 |
# Check which variants of the JVM that we want to build. Available variants are: |
|
59 |
# server: normal interpreter, and a tiered C1/C2 compiler |
|
60 |
# client: normal interpreter, and C1 (no C2 compiler) |
|
61 |
# minimal: reduced form of client with optional features stripped out |
|
62 |
# core: normal interpreter only, no compiler |
|
63 |
# zero: C++ based interpreter only, no compiler |
|
64 |
# zeroshark: C++ based interpreter, and a llvm-based compiler |
|
65 |
# custom: baseline JVM with no default features |
|
66 |
# |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34495
diff
changeset
|
67 |
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
68 |
[ |
20363 | 69 |
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], |
37402 | 70 |
[JVM variants (separated by commas) to build (server,client,minimal,core,zero,zeroshark,custom) @<:@server@:>@])]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
71 |
|
20363 | 72 |
if test "x$with_jvm_variants" = x; then |
73 |
with_jvm_variants="server" |
|
74 |
fi |
|
37402 | 75 |
JVM_VARIANTS_OPT="$with_jvm_variants" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
76 |
|
37402 | 77 |
# Has the user listed more than one variant? |
78 |
# Additional [] needed to keep m4 from mangling shell constructs. |
|
79 |
if [ [[ "$JVM_VARIANTS_OPT" =~ "," ]] ]; then |
|
80 |
BUILDING_MULTIPLE_JVM_VARIANTS=true |
|
81 |
else |
|
82 |
BUILDING_MULTIPLE_JVM_VARIANTS=false |
|
83 |
fi |
|
84 |
# Replace the commas with AND for use in the build directory name. |
|
85 |
JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'` |
|
86 |
||
87 |
AC_MSG_CHECKING([which variants of the JVM to build]) |
|
88 |
# JVM_VARIANTS is a space-separated list. |
|
89 |
# Also use minimal, not minimal1 (which is kept for backwards compatibility). |
|
90 |
JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'` |
|
91 |
AC_MSG_RESULT([$JVM_VARIANTS]) |
|
92 |
||
93 |
# Check that the selected variants are valid |
|
94 |
||
95 |
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326 |
|
96 |
INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` |
|
97 |
if test "x$INVALID_VARIANTS" != x; then |
|
98 |
AC_MSG_NOTICE([Unknown variant(s) specified: $INVALID_VARIANTS]) |
|
99 |
AC_MSG_ERROR([The available JVM variants are: $VALID_JVM_VARIANTS]) |
|
100 |
fi |
|
101 |
||
102 |
# All "special" variants share the same output directory ("server") |
|
103 |
VALID_MULTIPLE_JVM_VARIANTS="server client minimal" |
|
104 |
INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"` |
|
105 |
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then |
|
106 |
AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.]) |
|
107 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
108 |
|
37402 | 109 |
AC_SUBST(JVM_VARIANTS) |
110 |
AC_SUBST(VALID_JVM_VARIANTS) |
|
111 |
||
112 |
if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then |
|
113 |
# zero behaves as a platform and rewrites these values. This is really weird. :( |
|
114 |
# We are guaranteed that we do not build any other variants when building zero. |
|
115 |
HOTSPOT_TARGET_CPU=zero |
|
116 |
HOTSPOT_TARGET_CPU_ARCH=zero |
|
20363 | 117 |
fi |
37402 | 118 |
]) |
119 |
||
120 |
############################################################################### |
|
121 |
# Check if dtrace should be enabled and has all prerequisites present. |
|
122 |
# |
|
123 |
AC_DEFUN_ONCE([HOTSPOT_SETUP_DTRACE], |
|
124 |
[ |
|
125 |
# Test for dtrace dependencies |
|
126 |
AC_ARG_ENABLE([dtrace], [AS_HELP_STRING([--enable-dtrace@<:@=yes/no/auto@:>@], |
|
127 |
[enable dtrace. Default is auto, where dtrace is enabled if all dependencies |
|
128 |
are present.])]) |
|
129 |
||
130 |
DTRACE_DEP_MISSING=false |
|
131 |
||
132 |
AC_MSG_CHECKING([for dtrace tool]) |
|
133 |
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then |
|
134 |
AC_MSG_RESULT([$DTRACE]) |
|
135 |
else |
|
136 |
AC_MSG_RESULT([not found, cannot build dtrace]) |
|
137 |
DTRACE_DEP_MISSING=true |
|
138 |
fi |
|
139 |
||
140 |
AC_CHECK_HEADERS([sys/sdt.h], [DTRACE_HEADERS_OK=yes],[DTRACE_HEADERS_OK=no]) |
|
141 |
if test "x$DTRACE_HEADERS_OK" != "xyes"; then |
|
142 |
DTRACE_DEP_MISSING=true |
|
143 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
144 |
|
37402 | 145 |
AC_MSG_CHECKING([if dtrace should be built]) |
146 |
if test "x$enable_dtrace" = "xyes"; then |
|
147 |
if test "x$DTRACE_DEP_MISSING" = "xtrue"; then |
|
148 |
AC_MSG_RESULT([no, missing dependencies]) |
|
149 |
HELP_MSG_MISSING_DEPENDENCY([dtrace]) |
|
150 |
AC_MSG_ERROR([Cannot enable dtrace with missing dependencies. See above. $HELP_MSG]) |
|
151 |
else |
|
152 |
INCLUDE_DTRACE=true |
|
153 |
AC_MSG_RESULT([yes, forced]) |
|
154 |
fi |
|
155 |
elif test "x$enable_dtrace" = "xno"; then |
|
156 |
INCLUDE_DTRACE=false |
|
157 |
AC_MSG_RESULT([no, forced]) |
|
158 |
elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then |
|
159 |
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then |
|
160 |
INCLUDE_DTRACE=false |
|
161 |
AC_MSG_RESULT([no, non-open linux build]) |
|
162 |
elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then |
|
163 |
INCLUDE_DTRACE=false |
|
164 |
AC_MSG_RESULT([no, missing dependencies]) |
|
165 |
else |
|
166 |
INCLUDE_DTRACE=true |
|
167 |
AC_MSG_RESULT([yes, dependencies present]) |
|
168 |
fi |
|
169 |
else |
|
170 |
AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace]) |
|
171 |
fi |
|
172 |
AC_SUBST(INCLUDE_DTRACE) |
|
173 |
]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
174 |
|
37402 | 175 |
############################################################################### |
176 |
# Set up all JVM features for each JVM variant. |
|
177 |
# |
|
178 |
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES], |
|
179 |
[ |
|
180 |
# The user can in some cases supply additional jvm features. For the custom |
|
181 |
# variant, this defines the entire variant. |
|
182 |
AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features], |
|
183 |
[additional JVM features to enable (separated by comma), use '--help' to show possible values @<:@none@:>@])]) |
|
184 |
if test "x$with_jvm_features" != x; then |
|
185 |
AC_MSG_CHECKING([additional JVM features]) |
|
186 |
JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'` |
|
187 |
AC_MSG_RESULT([$JVM_FEATURES]) |
|
188 |
fi |
|
189 |
||
190 |
# Verify that dependencies are met for explicitly set features. |
|
191 |
if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then |
|
192 |
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services']) |
|
20363 | 193 |
fi |
37402 | 194 |
|
195 |
if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then |
|
196 |
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt']) |
|
197 |
fi |
|
198 |
||
199 |
if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! HOTSPOT_CHECK_JVM_FEATURE(compiler2); then |
|
200 |
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2']) |
|
201 |
fi |
|
202 |
||
203 |
if HOTSPOT_CHECK_JVM_FEATURE(compiler2) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then |
|
204 |
AC_MSG_ERROR([Specified JVM feature 'compiler2' requires feature 'all-gcs']) |
|
205 |
fi |
|
206 |
||
207 |
if HOTSPOT_CHECK_JVM_FEATURE(vm-structs) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then |
|
208 |
AC_MSG_ERROR([Specified JVM feature 'vm-structs' requires feature 'all-gcs']) |
|
209 |
fi |
|
210 |
||
211 |
# Turn on additional features based on other parts of configure |
|
212 |
if test "x$INCLUDE_DTRACE" = "xtrue"; then |
|
213 |
JVM_FEATURES="$JVM_FEATURES dtrace" |
|
214 |
else |
|
215 |
if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then |
|
216 |
AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace]) |
|
14810 | 217 |
fi |
20363 | 218 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
219 |
|
37402 | 220 |
if test "x$STATIC_BUILD" = "xtrue"; then |
221 |
JVM_FEATURES="$JVM_FEATURES static-build" |
|
20363 | 222 |
else |
37402 | 223 |
if HOTSPOT_CHECK_JVM_FEATURE(static-build); then |
224 |
AC_MSG_ERROR([To enable static-build, you must use --enable-static-build]) |
|
225 |
fi |
|
226 |
fi |
|
227 |
||
228 |
if ! HOTSPOT_CHECK_JVM_VARIANT(zero) && ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then |
|
229 |
if HOTSPOT_CHECK_JVM_FEATURE(zero); then |
|
230 |
AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark]) |
|
231 |
fi |
|
232 |
fi |
|
233 |
||
234 |
if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then |
|
235 |
if HOTSPOT_CHECK_JVM_FEATURE(shark); then |
|
236 |
AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark]) |
|
237 |
fi |
|
238 |
fi |
|
239 |
||
240 |
# Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server. |
|
241 |
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ |
|
242 |
test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \ |
|
243 |
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then |
|
244 |
JVM_FEATURES_jvmci="jvmci" |
|
245 |
else |
|
246 |
JVM_FEATURES_jvmci="" |
|
20363 | 247 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
248 |
|
37402 | 249 |
# All variants but minimal (and custom) get these features |
250 |
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds" |
|
251 |
||
252 |
# Enable features depending on variant. |
|
253 |
JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci" |
|
254 |
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES" |
|
255 |
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES" |
|
256 |
JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES" |
|
257 |
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES" |
|
258 |
JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES" |
|
259 |
JVM_FEATURES_custom="$JVM_FEATURES" |
|
260 |
||
261 |
AC_SUBST(JVM_FEATURES_server) |
|
262 |
AC_SUBST(JVM_FEATURES_client) |
|
263 |
AC_SUBST(JVM_FEATURES_core) |
|
264 |
AC_SUBST(JVM_FEATURES_minimal) |
|
265 |
AC_SUBST(JVM_FEATURES_zero) |
|
266 |
AC_SUBST(JVM_FEATURES_zeroshark) |
|
267 |
AC_SUBST(JVM_FEATURES_custom) |
|
268 |
||
269 |
# Used for verification of Makefiles by check-jvm-feature |
|
270 |
AC_SUBST(VALID_JVM_FEATURES) |
|
271 |
||
272 |
# We don't support --with-jvm-interpreter anymore, use zero instead. |
|
273 |
BASIC_DEPRECATED_ARG_WITH(jvm-interpreter) |
|
274 |
]) |
|
275 |
||
276 |
############################################################################### |
|
277 |
# Validate JVM features once all setup is complete, including custom setup. |
|
278 |
# |
|
279 |
AC_DEFUN_ONCE([HOTSPOT_VALIDATE_JVM_FEATURES], |
|
280 |
[ |
|
281 |
# Keep feature lists sorted and free of duplicates |
|
282 |
JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))" |
|
283 |
JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))" |
|
284 |
JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))" |
|
285 |
JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))" |
|
286 |
JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))" |
|
287 |
JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))" |
|
288 |
JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))" |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34495
diff
changeset
|
289 |
|
37402 | 290 |
# Validate features |
291 |
for variant in $JVM_VARIANTS; do |
|
292 |
AC_MSG_CHECKING([JVM features for JVM variant '$variant']) |
|
293 |
features_var_name=JVM_FEATURES_$variant |
|
294 |
JVM_FEATURES_TO_TEST=${!features_var_name} |
|
295 |
AC_MSG_RESULT([$JVM_FEATURES_TO_TEST]) |
|
296 |
INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"` |
|
297 |
if test "x$INVALID_FEATURES" != x; then |
|
298 |
AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES]) |
|
299 |
fi |
|
300 |
done |
|
301 |
]) |
|
302 |
||
303 |
############################################################################### |
|
304 |
# Support for old hotspot build. Remove once new hotspot build has proven |
|
305 |
# to work satisfactory. |
|
306 |
# |
|
307 |
AC_DEFUN_ONCE([HOTSPOT_SETUP_LEGACY_BUILD], |
|
308 |
[ |
|
309 |
AC_ARG_ENABLE(new-hotspot-build, [AS_HELP_STRING([--disable-new-hotspot-build], |
|
310 |
[disable the new hotspot build system (use the old) @<:@enabled@:>@])]) |
|
311 |
||
312 |
if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then |
|
313 |
USE_NEW_HOTSPOT_BUILD=true |
|
314 |
else |
|
315 |
USE_NEW_HOTSPOT_BUILD=false |
|
316 |
fi |
|
317 |
AC_SUBST(USE_NEW_HOTSPOT_BUILD) |
|
318 |
||
319 |
case $HOTSPOT_DEBUG_LEVEL in |
|
320 |
product ) |
|
321 |
VARIANT="OPT" |
|
322 |
FASTDEBUG="false" |
|
323 |
DEBUG_CLASSFILES="false" |
|
324 |
;; |
|
325 |
fastdebug ) |
|
326 |
VARIANT="DBG" |
|
327 |
FASTDEBUG="true" |
|
328 |
DEBUG_CLASSFILES="true" |
|
329 |
;; |
|
330 |
debug ) |
|
331 |
VARIANT="DBG" |
|
332 |
FASTDEBUG="false" |
|
333 |
DEBUG_CLASSFILES="true" |
|
334 |
;; |
|
335 |
optimized ) |
|
336 |
VARIANT="OPT" |
|
337 |
FASTDEBUG="false" |
|
338 |
DEBUG_CLASSFILES="false" |
|
339 |
;; |
|
340 |
esac |
|
341 |
AC_SUBST(VARIANT) |
|
342 |
AC_SUBST(FASTDEBUG) |
|
343 |
AC_SUBST(DEBUG_CLASSFILES) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
344 |
|
20363 | 345 |
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
346 |
MACOSX_UNIVERSAL="true" |
|
347 |
fi |
|
13697 | 348 |
|
20363 | 349 |
AC_SUBST(MACOSX_UNIVERSAL) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
350 |
|
37402 | 351 |
# Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility |
352 |
JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'` |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
34495
diff
changeset
|
353 |
|
37402 | 354 |
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` |
355 |
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` |
|
356 |
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'` |
|
357 |
JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` |
|
358 |
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` |
|
359 |
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` |
|
360 |
JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'` |
|
23424
65039fb99fda
8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents:
22721
diff
changeset
|
361 |
|
20363 | 362 |
##### |
363 |
# Generate the legacy makefile targets for hotspot. |
|
364 |
HOTSPOT_TARGET="" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
365 |
|
20363 | 366 |
if test "x$JVM_VARIANT_SERVER" = xtrue; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
367 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " |
20363 | 368 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
369 |
|
20363 | 370 |
if test "x$JVM_VARIANT_CLIENT" = xtrue; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
371 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " |
20363 | 372 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
373 |
|
20363 | 374 |
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then |
14810 | 375 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " |
20363 | 376 |
fi |
14810 | 377 |
|
20363 | 378 |
if test "x$JVM_VARIANT_ZERO" = xtrue; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
379 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " |
20363 | 380 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
381 |
|
20363 | 382 |
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
383 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " |
20363 | 384 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
385 |
|
22467 | 386 |
if test "x$JVM_VARIANT_CORE" = xtrue; then |
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
17819
diff
changeset
|
387 |
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core " |
22467 | 388 |
fi |
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
17819
diff
changeset
|
389 |
|
37402 | 390 |
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
391 |
|
20363 | 392 |
# On Macosx universal binaries are produced, but they only contain |
393 |
# 64 bit intel. This invalidates control of which jvms are built |
|
394 |
# from configure, but only server is valid anyway. Fix this |
|
395 |
# when hotspot makefiles are rewritten. |
|
396 |
if test "x$MACOSX_UNIVERSAL" = xtrue; then |
|
37402 | 397 |
HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL} |
20363 | 398 |
fi |
13697 | 399 |
|
37402 | 400 |
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" |
401 |
AC_SUBST(HOTSPOT_MAKE_ARGS) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
402 |
|
20363 | 403 |
# Control wether Hotspot runs Queens test after build. |
404 |
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], |
|
405 |
[run the Queens test after Hotspot build @<:@disabled@:>@])],, |
|
406 |
[enable_hotspot_test_in_build=no]) |
|
407 |
if test "x$enable_hotspot_test_in_build" = "xyes"; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
408 |
TEST_IN_BUILD=true |
20363 | 409 |
else |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
410 |
TEST_IN_BUILD=false |
20363 | 411 |
fi |
412 |
AC_SUBST(TEST_IN_BUILD) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
413 |
|
37402 | 414 |
if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then |
415 |
if test "x$JVM_VARIANT_CLIENT" = xtrue; then |
|
416 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
417 |
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) |
|
418 |
fi |
|
419 |
fi |
|
420 |
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then |
|
421 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
422 |
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) |
|
423 |
fi |
|
424 |
fi |
|
425 |
if test "x$JVM_VARIANT_CUSTOM" = xtrue; then |
|
426 |
AC_MSG_ERROR([You cannot build a custom JVM using the old hotspot build system.]) |
|
427 |
fi |
|
428 |
fi |
|
429 |
||
430 |
AC_SUBST(JVM_VARIANTS_COMMA) |
|
431 |
AC_SUBST(JVM_VARIANT_SERVER) |
|
432 |
AC_SUBST(JVM_VARIANT_CLIENT) |
|
433 |
AC_SUBST(JVM_VARIANT_MINIMAL1) |
|
434 |
AC_SUBST(JVM_VARIANT_HOTSPOT) |
|
435 |
AC_SUBST(JVM_VARIANT_ZERO) |
|
436 |
AC_SUBST(JVM_VARIANT_ZEROSHARK) |
|
437 |
AC_SUBST(JVM_VARIANT_CORE) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
438 |
]) |