common/autoconf/jdk-options.m4

changeset 542
6b93e7a4401d
parent 533
e175ecff1391
child 560
2d9bb72b4e34
equal deleted inserted replaced
540:6ee8080a6efe 542:6b93e7a4401d
58 # 58 #
59 # Check which variants of the JVM that we want to build. 59 # Check which variants of the JVM that we want to build.
60 # Currently we have: 60 # Currently we have:
61 # server: normal interpreter and a tiered C1/C2 compiler 61 # server: normal interpreter and a tiered C1/C2 compiler
62 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 62 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
63 # minimal1: reduced form of client with optional VM services and features stripped out
63 # kernel: kernel footprint JVM that passes the TCK without major performance problems, 64 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
64 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc 65 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
65 # zero: no machine code interpreter, no compiler 66 # zero: no machine code interpreter, no compiler
66 # zeroshark: zero interpreter and shark/llvm compiler backend 67 # zeroshark: zero interpreter and shark/llvm compiler backend
67 AC_MSG_CHECKING([which variants of the JVM to build]) 68 AC_MSG_CHECKING([which variants of the JVM to build])
68 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], 69 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
69 [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])]) 70 [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
70 71
71 if test "x$with_jvm_variants" = x; then 72 if test "x$with_jvm_variants" = x; then
72 with_jvm_variants="server" 73 with_jvm_variants="server"
73 fi 74 fi
74 75
75 JVM_VARIANTS=",$with_jvm_variants," 76 JVM_VARIANTS=",$with_jvm_variants,"
76 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 77 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
77 78
78 if test "x$TEST_VARIANTS" != "x,"; then 79 if test "x$TEST_VARIANTS" != "x,"; then
79 AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark]) 80 AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
80 fi 81 fi
81 AC_MSG_RESULT([$with_jvm_variants]) 82 AC_MSG_RESULT([$with_jvm_variants])
82 83
83 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 84 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
84 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 85 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
86 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
85 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 87 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
86 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 88 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
87 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 89 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
88 90
89 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 91 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
94 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 96 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
95 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 97 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
96 AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) 98 AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
97 fi 99 fi
98 fi 100 fi
101 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
102 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
103 AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
104 fi
105 fi
99 106
100 # Replace the commas with AND for use in the build directory name. 107 # Replace the commas with AND for use in the build directory name.
101 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 108 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
102 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` 109 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
103 if test "x$COUNT_VARIANTS" != "x,1"; then 110 if test "x$COUNT_VARIANTS" != "x,1"; then
104 BUILDING_MULTIPLE_JVM_VARIANTS=yes 111 BUILDING_MULTIPLE_JVM_VARIANTS=yes
105 else 112 else
106 BUILDING_MULTIPLE_JVM_VARIANTS=no 113 BUILDING_MULTIPLE_JVM_VARIANTS=no
107 fi 114 fi
108 115
109 AC_SUBST(JVM_VARIANTS) 116 AC_SUBST(JVM_VARIANTS)
110 AC_SUBST(JVM_VARIANT_SERVER) 117 AC_SUBST(JVM_VARIANT_SERVER)
111 AC_SUBST(JVM_VARIANT_CLIENT) 118 AC_SUBST(JVM_VARIANT_CLIENT)
119 AC_SUBST(JVM_VARIANT_MINIMAL1)
112 AC_SUBST(JVM_VARIANT_KERNEL) 120 AC_SUBST(JVM_VARIANT_KERNEL)
113 AC_SUBST(JVM_VARIANT_ZERO) 121 AC_SUBST(JVM_VARIANT_ZERO)
114 AC_SUBST(JVM_VARIANT_ZEROSHARK) 122 AC_SUBST(JVM_VARIANT_ZEROSHARK)
115 123
116 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 124 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
189 esac 197 esac
190 198
191 ##### 199 #####
192 # Generate the legacy makefile targets for hotspot. 200 # Generate the legacy makefile targets for hotspot.
193 # The hotspot api for selecting the build artifacts, really, needs to be improved. 201 # The hotspot api for selecting the build artifacts, really, needs to be improved.
194 # 202 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
203 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
204 # But until then ...
195 HOTSPOT_TARGET="" 205 HOTSPOT_TARGET=""
196 206
197 if test "x$JVM_VARIANT_SERVER" = xtrue; then 207 if test "x$JVM_VARIANT_SERVER" = xtrue; then
198 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 208 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
199 fi 209 fi
200 210
201 if test "x$JVM_VARIANT_CLIENT" = xtrue; then 211 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
202 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 212 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
213 fi
214
215 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
216 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
203 fi 217 fi
204 218
205 if test "x$JVM_VARIANT_KERNEL" = xtrue; then 219 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
206 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 220 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
207 fi 221 fi

mercurial