author | duke |
Wed, 05 Jul 2017 18:40:16 +0200 | |
changeset 15571 | 6cc003462a1e |
parent 14111 | 2a82ecb35fc7 |
child 20363 | fa7663fc5d50 |
child 22460 | 0273c023680c |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
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 |
|
13697 | 26 |
# Execute the check given as argument, and verify the result |
27 |
# If the Boot JDK was previously found, do nothing |
|
28 |
# $1 A command line (typically autoconf macro) to execute |
|
29 |
AC_DEFUN([BOOTJDK_DO_CHECK], |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
30 |
[ |
13697 | 31 |
if test "x$BOOT_JDK_FOUND" = xno; then |
32 |
# Now execute the test |
|
33 |
$1 |
|
34 |
||
35 |
# If previous step claimed to have found a JDK, check it to see if it seems to be valid. |
|
36 |
if test "x$BOOT_JDK_FOUND" = xmaybe; then |
|
37 |
# Do we have a bin/java? |
|
38 |
if test ! -x "$BOOT_JDK/bin/java"; then |
|
39 |
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring]) |
|
40 |
BOOT_JDK_FOUND=no |
|
41 |
else |
|
42 |
# Do we have a bin/javac? |
|
43 |
if test ! -x "$BOOT_JDK/bin/javac"; then |
|
44 |
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring]) |
|
45 |
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)]) |
|
46 |
BOOT_JDK_FOUND=no |
|
47 |
else |
|
48 |
# Do we have an rt.jar? (On MacOSX it is called classes.jar) |
|
49 |
if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then |
|
50 |
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring]) |
|
51 |
BOOT_JDK_FOUND=no |
|
52 |
else |
|
53 |
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version? |
|
54 |
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1` |
|
55 |
||
56 |
# Extra M4 quote needed to protect [] in grep expression. |
|
57 |
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`] |
|
58 |
if test "x$FOUND_VERSION_78" = x; then |
|
59 |
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring]) |
|
60 |
AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)]) |
|
61 |
BOOT_JDK_FOUND=no |
|
62 |
else |
|
63 |
# We're done! :-) |
|
64 |
BOOT_JDK_FOUND=yes |
|
14111 | 65 |
BASIC_FIXUP_PATH(BOOT_JDK) |
13697 | 66 |
AC_MSG_CHECKING([for Boot JDK]) |
14111 | 67 |
AC_MSG_RESULT([$BOOT_JDK]) |
68 |
AC_MSG_CHECKING([Boot JDK version]) |
|
69 |
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '` |
|
70 |
AC_MSG_RESULT([$BOOT_JDK_VERSION]) |
|
13697 | 71 |
fi # end check jdk version |
72 |
fi # end check rt.jar |
|
73 |
fi # end check javac |
|
74 |
fi # end check java |
|
75 |
fi # end check boot jdk found |
|
76 |
fi |
|
77 |
]) |
|
78 |
||
79 |
# Test: Is bootjdk explicitely set by command line arguments? |
|
80 |
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS], |
|
81 |
[ |
|
82 |
if test "x$with_boot_jdk" != x; then |
|
83 |
BOOT_JDK=$with_boot_jdk |
|
84 |
BOOT_JDK_FOUND=maybe |
|
85 |
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments]) |
|
86 |
fi |
|
87 |
]) |
|
88 |
||
89 |
# Test: Is bootjdk available from builddeps? |
|
90 |
AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS], |
|
91 |
[ |
|
92 |
BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no]) |
|
93 |
]) |
|
94 |
||
95 |
# Test: Is $JAVA_HOME set? |
|
96 |
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME], |
|
97 |
[ |
|
98 |
if test "x$JAVA_HOME" != x; then |
|
14111 | 99 |
JAVA_HOME_PROCESSED="$JAVA_HOME" |
100 |
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED) |
|
13697 | 101 |
if test ! -d "$JAVA_HOME_PROCESSED"; then |
102 |
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!]) |
|
103 |
else |
|
104 |
# Aha, the user has set a JAVA_HOME |
|
105 |
# let us use that as the Boot JDK. |
|
106 |
BOOT_JDK="$JAVA_HOME_PROCESSED" |
|
107 |
BOOT_JDK_FOUND=maybe |
|
108 |
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME]) |
|
109 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
110 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
111 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
112 |
|
13697 | 113 |
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? |
114 |
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK], |
|
115 |
[ |
|
116 |
AC_PATH_PROG(JAVAC_CHECK, javac) |
|
117 |
AC_PATH_PROG(JAVA_CHECK, java) |
|
118 |
BINARY="$JAVAC_CHECK" |
|
119 |
if test "x$JAVAC_CHECK" = x; then |
|
120 |
BINARY="$JAVA_CHECK" |
|
121 |
fi |
|
122 |
if test "x$BINARY" != x; then |
|
123 |
# So there is a java(c) binary, it might be part of a JDK. |
|
124 |
# Lets find the JDK/JRE directory by following symbolic links. |
|
125 |
# Linux/GNU systems often have links from /usr/bin/java to |
|
126 |
# /etc/alternatives/java to the real JDK binary. |
|
14111 | 127 |
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY) |
13697 | 128 |
BOOT_JDK=`dirname "$BINARY"` |
129 |
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` |
|
130 |
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then |
|
131 |
# Looks like we found ourselves an JDK |
|
132 |
BOOT_JDK_FOUND=maybe |
|
133 |
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH]) |
|
134 |
fi |
|
135 |
fi |
|
136 |
]) |
|
137 |
||
138 |
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) |
|
139 |
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME], |
|
140 |
[ |
|
141 |
if test -x /usr/libexec/java_home; then |
|
142 |
BOOT_JDK=`/usr/libexec/java_home` |
|
143 |
BOOT_JDK_FOUND=maybe |
|
144 |
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home]) |
|
145 |
fi |
|
146 |
]) |
|
147 |
||
148 |
# Look for a jdk in the given path. If there are multiple, try to select the newest. |
|
149 |
# If found, set BOOT_JDK and BOOT_JDK_FOUND. |
|
150 |
# $1 = Path to directory containing jdk installations. |
|
151 |
# $2 = String to append to the found JDK directory to get the proper JDK home |
|
152 |
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY], |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
153 |
[ |
13697 | 154 |
BOOT_JDK_PREFIX="$1" |
155 |
BOOT_JDK_SUFFIX="$2" |
|
14111 | 156 |
ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r` |
157 |
if test "x$ALL_JDKS_FOUND" != x; then |
|
158 |
for JDK_TO_TRY in $ALL_JDKS_FOUND ; do |
|
159 |
BOOTJDK_DO_CHECK([ |
|
160 |
BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}" |
|
161 |
if test -d "$BOOT_JDK"; then |
|
162 |
BOOT_JDK_FOUND=maybe |
|
163 |
AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)]) |
|
164 |
fi |
|
165 |
]) |
|
166 |
done |
|
13697 | 167 |
fi |
168 |
]) |
|
169 |
||
170 |
# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given |
|
171 |
# environmental variable as base for where to look. |
|
172 |
# $1 Name of an environmal variable, assumed to point to the Program Files directory. |
|
173 |
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY], |
|
174 |
[ |
|
175 |
if test "x[$]$1" != x; then |
|
14111 | 176 |
VIRTUAL_DIR="[$]$1/Java" |
177 |
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR) |
|
178 |
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR) |
|
13697 | 179 |
fi |
180 |
]) |
|
181 |
||
182 |
# Test: Is there a JDK installed in default, well-known locations? |
|
183 |
AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS], |
|
184 |
[ |
|
185 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
186 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramW6432])]) |
|
187 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMW6432])]) |
|
188 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMFILES])]) |
|
189 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramFiles])]) |
|
190 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/cygdrive/c/Program Files/Java])]) |
|
191 |
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
192 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])]) |
|
193 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])]) |
|
14111 | 194 |
elif test "x$OPENJDK_TARGET_OS" = xlinux; then |
195 |
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])]) |
|
13697 | 196 |
fi |
197 |
]) |
|
198 |
||
199 |
# Check that a command-line tool in the Boot JDK is correct |
|
200 |
# $1 = name of variable to assign |
|
201 |
# $2 = name of binary |
|
202 |
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK], |
|
203 |
[ |
|
204 |
AC_MSG_CHECKING([for $2 in Boot JDK]) |
|
205 |
$1=$BOOT_JDK/bin/$2 |
|
206 |
if test ! -x [$]$1; then |
|
207 |
AC_MSG_RESULT(not found) |
|
208 |
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk]) |
|
209 |
AC_MSG_ERROR([Could not find $2 in the Boot JDK]) |
|
210 |
fi |
|
211 |
AC_MSG_RESULT(ok) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
212 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
213 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
214 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
215 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
216 |
# We need a Boot JDK to bootstrap the build. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
217 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
218 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
219 |
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
220 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
221 |
BOOT_JDK_FOUND=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
222 |
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
223 |
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
224 |
|
13697 | 225 |
# We look for the Boot JDK through various means, going from more certain to |
226 |
# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if |
|
227 |
# we detected something (if so, the path to the jdk is in BOOT_JDK). But we |
|
228 |
# must check if this is indeed valid; otherwise we'll continue looking. |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
229 |
|
13697 | 230 |
# Test: Is bootjdk explicitely set by command line arguments? |
231 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS]) |
|
232 |
if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then |
|
233 |
# Having specified an argument which is incorrect will produce an instant failure; |
|
234 |
# we should not go on looking |
|
235 |
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
236 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
237 |
|
13697 | 238 |
# Test: Is bootjdk available from builddeps? |
239 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS]) |
|
240 |
||
241 |
# Test: Is $JAVA_HOME set? |
|
242 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME]) |
|
243 |
||
244 |
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) |
|
245 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME]) |
|
246 |
||
247 |
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? |
|
248 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK]) |
|
249 |
||
250 |
# Test: Is there a JDK installed in default, well-known locations? |
|
251 |
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS]) |
|
252 |
||
253 |
# If we haven't found anything yet, we've truly lost. Give up. |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
254 |
if test "x$BOOT_JDK_FOUND" = xno; then |
13697 | 255 |
HELP_MSG_MISSING_DEPENDENCY([openjdk]) |
256 |
AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG]) |
|
257 |
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) |
|
258 |
AC_MSG_ERROR([Cannot continue]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
259 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
260 |
|
13697 | 261 |
# Setup proper paths for what we found |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
262 |
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" |
13697 | 263 |
if test ! -f "$BOOT_RTJAR"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
264 |
# On MacOSX it is called classes.jar |
13697 | 265 |
BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" |
266 |
if test -f "$BOOT_RTJAR"; then |
|
267 |
# Remove the .. |
|
268 |
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
269 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
270 |
fi |
13697 | 271 |
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" |
272 |
BOOT_JDK="$BOOT_JDK" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
273 |
AC_SUBST(BOOT_RTJAR) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
274 |
AC_SUBST(BOOT_TOOLSJAR) |
13697 | 275 |
AC_SUBST(BOOT_JDK) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
276 |
|
13697 | 277 |
# Setup tools from the Boot JDK. |
278 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java) |
|
279 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac) |
|
280 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah) |
|
281 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap) |
|
282 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar) |
|
283 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic) |
|
284 |
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
285 |
|
13697 | 286 |
# Finally, set some other options... |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
287 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
288 |
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
289 |
BOOT_JDK_SOURCETARGET="-source 7 -target 7" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
290 |
AC_SUBST(BOOT_JDK_SOURCETARGET) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
291 |
AC_SUBST(JAVAC_FLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
292 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
293 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
294 |
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
295 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
296 |
############################################################################## |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
297 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
298 |
# Specify options for anything that is run with the Boot JDK. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
299 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
300 |
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
301 |
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
302 |
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
303 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
304 |
if test "x$with_boot_jdk_jvmargs" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
305 |
# Not all JVM:s accept the same arguments on the command line. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
306 |
# OpenJDK specific increase in thread stack for JDK build, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
307 |
# well more specifically, when running javac. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
308 |
if test "x$BUILD_NUM_BITS" = x32; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
309 |
STACK_SIZE=768 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
310 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
311 |
# Running Javac on a JVM on a 64-bit machine, the stack takes more space |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
312 |
# since 64-bit pointers are pushed on the stach. Apparently, we need |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
313 |
# to increase the stack space when javacing the JDK.... |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
314 |
STACK_SIZE=1536 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
315 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
316 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
317 |
# Minimum amount of heap memory. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
318 |
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
319 |
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
320 |
# Why does macosx need more heap? Its the huge JDK batch. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
321 |
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
322 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
323 |
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
324 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
325 |
# When is adding -client something that speeds up the JVM? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
326 |
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
327 |
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
328 |
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
329 |
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
330 |
# Disable special log output when a debug build is used as Boot JDK... |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
331 |
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
332 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
333 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
334 |
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
335 |
]) |