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
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)
|
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 graal 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
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 AC_MSG_CHECKING([if jdk.vm.compiler should be built])
267 if HOTSPOT_CHECK_JVM_FEATURE(graal); then
268 AC_MSG_RESULT([yes, forced])
269 if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
270 AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
271 fi
272 INCLUDE_GRAAL="true"
273 else
274 # By default enable graal build on linux-X64 and when JVMCI is available
275 if test "x$JVM_FEATURES_jvmci" = "xjvmci" && test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
276 AC_MSG_RESULT([yes])
277 JVM_FEATURES_graal="graal"
278 INCLUDE_GRAAL="true"
279 else
280 AC_MSG_RESULT([no])
281 JVM_FEATURES_graal=""
282 INCLUDE_GRAAL="false"
283 fi
284 fi
285
286 AC_SUBST(INCLUDE_GRAAL)
287
288 # All variants but minimal (and custom) get these features
289 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
290
291 # Enable features depending on variant.
292 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_graal"
293 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
294 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
295 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
296 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
297 JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
298 JVM_FEATURES_custom="$JVM_FEATURES"
299
300 AC_SUBST(JVM_FEATURES_server)
301 AC_SUBST(JVM_FEATURES_client)
302 AC_SUBST(JVM_FEATURES_core)
303 AC_SUBST(JVM_FEATURES_minimal)
304 AC_SUBST(JVM_FEATURES_zero)
305 AC_SUBST(JVM_FEATURES_zeroshark)
306 AC_SUBST(JVM_FEATURES_custom)
307
308 # Used for verification of Makefiles by check-jvm-feature
309 AC_SUBST(VALID_JVM_FEATURES)
310
311 # We don't support --with-jvm-interpreter anymore, use zero instead.
312 BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
|