8036079: --with-boot-jdk-jvmargs configure options are ignored
Reviewed-by: erikj
This commit is contained in:
parent
a6354ef8f2
commit
97dd276d1c
common/autoconf
@ -341,39 +341,45 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
# Specify jvm options for anything that is run with the Boot JDK.
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
#
|
||||
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
|
||||
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
|
||||
[specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
|
||||
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
|
||||
|
||||
if test "x$with_boot_jdk_jvmargs" = x; then
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
|
||||
# since 64-bit pointers are pushed on the stach. Apparently, we need
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
JVM_MAX_HEAP=1100M
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||
# pointers are used. Apparently, we need to increase the heap and stack
|
||||
# space for the jvm. More specifically, when running javac to build huge
|
||||
# jdk batch
|
||||
JVM_MAX_HEAP=1600M
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Apply user provided options.
|
||||
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)
|
||||
])
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_INIT(OpenJDK, jdk9, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/common/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
|
||||
# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
|
||||
#
|
||||
# Report bugs to <build-dev@openjdk.java.net>.
|
||||
#
|
||||
@ -586,8 +586,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='OpenJDK'
|
||||
PACKAGE_TARNAME='openjdk'
|
||||
PACKAGE_VERSION='jdk8'
|
||||
PACKAGE_STRING='OpenJDK jdk8'
|
||||
PACKAGE_VERSION='jdk9'
|
||||
PACKAGE_STRING='OpenJDK jdk9'
|
||||
PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
|
||||
PACKAGE_URL='http://openjdk.java.net'
|
||||
|
||||
@ -793,6 +793,7 @@ JAXWS_TOPDIR
|
||||
JAXP_TOPDIR
|
||||
CORBA_TOPDIR
|
||||
LANGTOOLS_TOPDIR
|
||||
JAVA_FLAGS
|
||||
BOOT_JDK_JVMARGS
|
||||
JAVAC_FLAGS
|
||||
BOOT_JDK_SOURCETARGET
|
||||
@ -1725,7 +1726,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
|
||||
\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1795,7 +1796,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of OpenJDK jdk8:";;
|
||||
short | recursive ) echo "Configuration of OpenJDK jdk9:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1871,8 +1872,8 @@ Optional Packages:
|
||||
number is not set.[username_builddateb00]
|
||||
--with-build-number Set build number value for build [b00]
|
||||
--with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
|
||||
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all
|
||||
invocations of the Boot JDK, overriding the default
|
||||
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
|
||||
invocations of boot JDK, overriding the default
|
||||
values, e.g --with-boot-jdk-jvmargs="-Xmx8G
|
||||
-enableassertions"
|
||||
--with-add-source-root for each and every source directory, look in this
|
||||
@ -2116,7 +2117,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
OpenJDK configure jdk8
|
||||
OpenJDK configure jdk9
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@ -2812,7 +2813,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by OpenJDK $as_me jdk8, which was
|
||||
It was created by OpenJDK $as_me jdk9, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -4220,7 +4221,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1393490405
|
||||
DATE_WHEN_GENERATED=1393867368
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -25842,7 +25843,8 @@ $as_echo "$tool_specified" >&6; }
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
# Specify jvm options for anything that is run with the Boot JDK.
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
#
|
||||
|
||||
# Check whether --with-boot-jdk-jvmargs was given.
|
||||
@ -25851,20 +25853,10 @@ if test "${with_boot_jdk_jvmargs+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
if test "x$with_boot_jdk_jvmargs" = x; then
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
|
||||
# since 64-bit pointers are pushed on the stach. Apparently, we need
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
|
||||
$as_echo_n "checking flags for boot jdk java command ... " >&6; }
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
# Starting amount of heap memory.
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -Xms64M" >&5
|
||||
$ECHO "Command: $JAVA -Xms64M -version" >&5
|
||||
@ -25880,16 +25872,28 @@ fi
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
|
||||
$ECHO "Command: $JAVA -Xmx1600M -version" >&5
|
||||
OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
JVM_MAX_HEAP=1100M
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||
# pointers are used. Apparently, we need to increase the heap and stack
|
||||
# space for the jvm. More specifically, when running javac to build huge
|
||||
# jdk batch
|
||||
JVM_MAX_HEAP=1600M
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
|
||||
$ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
|
||||
OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
|
||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx$JVM_MAX_HEAP"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&5
|
||||
@ -25897,25 +25901,6 @@ fi
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
|
||||
$ECHO "Command: $JAVA -Xmx1100M -version" >&5
|
||||
OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&5
|
||||
$ECHO "$OUTPUT" >&5
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
|
||||
$ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
|
||||
@ -25931,7 +25916,8 @@ fi
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
|
||||
$ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
|
||||
$ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
|
||||
@ -25947,10 +25933,34 @@ fi
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
|
||||
# Apply user provided options.
|
||||
|
||||
$ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
|
||||
$ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
|
||||
OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&5
|
||||
$ECHO "$OUTPUT" >&5
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
|
||||
$as_echo "$boot_jdk_jvmargs" >&6; }
|
||||
|
||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||
|
||||
BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
|
||||
|
||||
JAVA_FLAGS=$JAVA_FLAGS
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
@ -49138,7 +49148,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by OpenJDK $as_me jdk8, which was
|
||||
This file was extended by OpenJDK $as_me jdk9, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -49201,7 +49211,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
OpenJDK config.status jdk8
|
||||
OpenJDK config.status jdk9
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -441,7 +441,7 @@ OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
JAVA_FLAGS:=@JAVA_FLAGS@
|
||||
|
||||
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user