8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
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"
32
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.
39
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 " ]] ] ])
44
45 ###############################################################################
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
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 #
67 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
68 [
69 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
70 [JVM variants (separated by commas) to build (server,client,minimal,core,zero,zeroshark,custom) @<:@server@:>@])])
71
72 if test "x$with_jvm_variants" = x; then
73 with_jvm_variants="server"
74 fi
75 JVM_VARIANTS_OPT="$with_jvm_variants"
76
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])
187 AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
188 fi
189 AC_SUBST(INCLUDE_DTRACE)
190 ])
191
192 ###############################################################################
193 # Set up all JVM features for each JVM variant.
194 #
195 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
196 [
197 # The user can in some cases supply additional jvm features. For the custom
198 # variant, this defines the entire variant.
199 AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
200 [additional JVM features to enable (separated by comma), use '--help' to show possible values @<:@none@:>@])])
201 if test "x$with_jvm_features" != x; then
202 AC_MSG_CHECKING([additional JVM features])
203 JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
204 AC_MSG_RESULT([$JVM_FEATURES])
205 fi
206
207 # Verify that dependencies are met for explicitly set features.
208 if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
209 AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
210 fi
211
212 if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
213 AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
214 fi
215
216 if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
217 AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
218 fi
219
220 if HOTSPOT_CHECK_JVM_FEATURE(compiler2) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
221 AC_MSG_ERROR([Specified JVM feature 'compiler2' requires feature 'all-gcs'])
222 fi
223
224 if HOTSPOT_CHECK_JVM_FEATURE(vm-structs) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
225 AC_MSG_ERROR([Specified JVM feature 'vm-structs' requires feature 'all-gcs'])
226 fi
246 if HOTSPOT_CHECK_JVM_FEATURE(zero); then
247 AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
248 fi
249 fi
250
251 if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
252 if HOTSPOT_CHECK_JVM_FEATURE(shark); then
253 AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
254 fi
255 fi
256
257 # Only enable jvmci on x86_64, sparcv9 and aarch64.
258 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
259 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
260 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
261 JVM_FEATURES_jvmci="jvmci"
262 else
263 JVM_FEATURES_jvmci=""
264 fi
265
266 # All variants but minimal (and custom) get these features
267 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
268
269 # Enable features depending on variant.
270 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
271 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
272 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
273 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
274 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
275 JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
276 JVM_FEATURES_custom="$JVM_FEATURES"
277
278 AC_SUBST(JVM_FEATURES_server)
279 AC_SUBST(JVM_FEATURES_client)
280 AC_SUBST(JVM_FEATURES_core)
281 AC_SUBST(JVM_FEATURES_minimal)
282 AC_SUBST(JVM_FEATURES_zero)
283 AC_SUBST(JVM_FEATURES_zeroshark)
284 AC_SUBST(JVM_FEATURES_custom)
285
286 # Used for verification of Makefiles by check-jvm-feature
287 AC_SUBST(VALID_JVM_FEATURES)
288
289 # We don't support --with-jvm-interpreter anymore, use zero instead.
290 BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
291 ])
292
293 ###############################################################################
301 JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
302 JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
303 JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
304 JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
305 JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
306
307 # Validate features
308 for variant in $JVM_VARIANTS; do
309 AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
310 features_var_name=JVM_FEATURES_$variant
311 JVM_FEATURES_TO_TEST=${!features_var_name}
312 AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
313 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
314 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
315 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
316 if test "x$INVALID_FEATURES" != x; then
317 AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
318 fi
319 done
320 ])
321
322 ################################################################################
323 # Check if gtest should be built
324 #
325 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
326 [
327 AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
328 [Disables building of the Hotspot unit tests])])
329
330 if test -e "$HOTSPOT_TOPDIR/test/native"; then
331 GTEST_DIR_EXISTS="true"
332 else
333 GTEST_DIR_EXISTS="false"
334 fi
335
336 AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
337 if test "x$enable_hotspot_gtest" = "xyes"; then
338 if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
339 AC_MSG_RESULT([yes, forced])
340 BUILD_GTEST="true"
|
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
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 \
29 static-build link-time-opt"
30
31 # All valid JVM variants
32 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
33
34 ###############################################################################
35 # Check if the specified JVM variant should be built. To be used in shell if
36 # constructs, like this:
37 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
38 #
39 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
40
41 # Definition kept in one line to allow inlining in if statements.
42 # Additional [] needed to keep m4 from mangling shell constructs.
43 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
44 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
45
46 ###############################################################################
47 # Check if the specified JVM features are explicitly enabled. To be used in
48 # shell if constructs, like this:
49 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
53 # Definition kept in one line to allow inlining in if statements.
54 # Additional [] needed to keep m4 from mangling shell constructs.
55 AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
56 [ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
57
58 ###############################################################################
59 # Check which variants of the JVM that we want to build. Available variants are:
60 # server: normal interpreter, and a tiered C1/C2 compiler
61 # client: normal interpreter, and C1 (no C2 compiler)
62 # minimal: reduced form of client with optional features stripped out
63 # core: normal interpreter only, no compiler
64 # zero: C++ based interpreter only, no compiler
65 # zeroshark: C++ based interpreter, and a llvm-based compiler
66 # custom: baseline JVM with no default features
67 #
68 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
69 [
70 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
71 [JVM variants (separated by commas) to build (server,client,minimal,core,zero,zeroshark,custom) @<:@server@:>@])])
72
73 SETUP_HOTSPOT_TARGET_CPU_PORT
74
75 if test "x$with_jvm_variants" = x; then
76 with_jvm_variants="server"
77 fi
78 JVM_VARIANTS_OPT="$with_jvm_variants"
79
80 # Has the user listed more than one variant?
81 # Additional [] needed to keep m4 from mangling shell constructs.
82 if [ [[ "$JVM_VARIANTS_OPT" =~ "," ]] ]; then
83 BUILDING_MULTIPLE_JVM_VARIANTS=true
84 else
85 BUILDING_MULTIPLE_JVM_VARIANTS=false
86 fi
87 # Replace the commas with AND for use in the build directory name.
88 JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
89
90 AC_MSG_CHECKING([which variants of the JVM to build])
91 # JVM_VARIANTS is a space-separated list.
92 # Also use minimal, not minimal1 (which is kept for backwards compatibility).
93 JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
94 AC_MSG_RESULT([$JVM_VARIANTS])
190 AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
191 fi
192 AC_SUBST(INCLUDE_DTRACE)
193 ])
194
195 ###############################################################################
196 # Set up all JVM features for each JVM variant.
197 #
198 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
199 [
200 # The user can in some cases supply additional jvm features. For the custom
201 # variant, this defines the entire variant.
202 AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
203 [additional JVM features to enable (separated by comma), use '--help' to show possible values @<:@none@:>@])])
204 if test "x$with_jvm_features" != x; then
205 AC_MSG_CHECKING([additional JVM features])
206 JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
207 AC_MSG_RESULT([$JVM_FEATURES])
208 fi
209
210 # Override hotspot cpu definitions for ARM platforms
211 if test "x$OPENJDK_TARGET_CPU" = xarm; then
212 HOTSPOT_TARGET_CPU=arm_32
213 HOTSPOT_TARGET_CPU_DEFINE="ARM32"
214 JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
215 JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
216 elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$with_cpu_port" = xarm64; then
217 HOTSPOT_TARGET_CPU=arm_64
218 HOTSPOT_TARGET_CPU_ARCH=arm
219 JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
220 JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
221 fi
222
223 # Verify that dependencies are met for explicitly set features.
224 if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
225 AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
226 fi
227
228 if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
229 AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
230 fi
231
232 if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
233 AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
234 fi
235
236 if HOTSPOT_CHECK_JVM_FEATURE(compiler2) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
237 AC_MSG_ERROR([Specified JVM feature 'compiler2' requires feature 'all-gcs'])
238 fi
239
240 if HOTSPOT_CHECK_JVM_FEATURE(vm-structs) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
241 AC_MSG_ERROR([Specified JVM feature 'vm-structs' requires feature 'all-gcs'])
242 fi
262 if HOTSPOT_CHECK_JVM_FEATURE(zero); then
263 AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
264 fi
265 fi
266
267 if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
268 if HOTSPOT_CHECK_JVM_FEATURE(shark); then
269 AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
270 fi
271 fi
272
273 # Only enable jvmci on x86_64, sparcv9 and aarch64.
274 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
275 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
276 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
277 JVM_FEATURES_jvmci="jvmci"
278 else
279 JVM_FEATURES_jvmci=""
280 fi
281
282 if test "x$OPENJDK_TARGET_CPU" = xarm ; then
283 # Default to use link time optimizations on minimal on arm
284 JVM_FEATURES_link_time_opt="link-time-opt"
285 else
286 JVM_FEATURES_link_time_opt=""
287 fi
288
289 # All variants but minimal (and custom) get these features
290 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
291
292 # Enable features depending on variant.
293 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
294 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
295 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
296 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
297 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
298 JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
299 JVM_FEATURES_custom="$JVM_FEATURES"
300
301 AC_SUBST(JVM_FEATURES_server)
302 AC_SUBST(JVM_FEATURES_client)
303 AC_SUBST(JVM_FEATURES_core)
304 AC_SUBST(JVM_FEATURES_minimal)
305 AC_SUBST(JVM_FEATURES_zero)
306 AC_SUBST(JVM_FEATURES_zeroshark)
307 AC_SUBST(JVM_FEATURES_custom)
308
309 # Used for verification of Makefiles by check-jvm-feature
310 AC_SUBST(VALID_JVM_FEATURES)
311
312 # We don't support --with-jvm-interpreter anymore, use zero instead.
313 BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
314 ])
315
316 ###############################################################################
324 JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
325 JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
326 JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
327 JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
328 JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
329
330 # Validate features
331 for variant in $JVM_VARIANTS; do
332 AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
333 features_var_name=JVM_FEATURES_$variant
334 JVM_FEATURES_TO_TEST=${!features_var_name}
335 AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
336 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
337 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
338 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
339 if test "x$INVALID_FEATURES" != x; then
340 AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
341 fi
342 done
343 ])
344
345 ################################################################################
346 #
347 # Specify which sources will be used to build the 64-bit ARM port
348 #
349 # --with-cpu-port=arm64 will use hotspot/src/cpu/arm
350 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
351 #
352 AC_DEFUN([SETUP_HOTSPOT_TARGET_CPU_PORT],
353 [
354 AC_ARG_WITH(cpu-port, [AS_HELP_STRING([--with-cpu-port],
355 [specify sources to use for Hotspot 64-bit ARM port (arm64,aarch64) @<:@aarch64@:>@ ])])
356
357 if test "x$with_cpu_port" != x; then
358 if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
359 AC_MSG_ERROR([--with-cpu-port only available on aarch64])
360 fi
361
362 if test "x$with_cpu_port" != x; then
363 if test "x$with_cpu_port" != xarm64 && \
364 test "x$with_cpu_port" != xaarch64; then
365 AC_MSG_ERROR([--with-cpu-port must specify arm64 or aarch64])
366 fi
367 fi
368 fi
369 ])
370
371
372 ################################################################################
373 # Check if gtest should be built
374 #
375 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
376 [
377 AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
378 [Disables building of the Hotspot unit tests])])
379
380 if test -e "$HOTSPOT_TOPDIR/test/native"; then
381 GTEST_DIR_EXISTS="true"
382 else
383 GTEST_DIR_EXISTS="false"
384 fi
385
386 AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
387 if test "x$enable_hotspot_gtest" = "xyes"; then
388 if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
389 AC_MSG_RESULT([yes, forced])
390 BUILD_GTEST="true"
|