This commit is contained in:
Lana Steuck 2018-02-09 02:23:34 +00:00
commit 845f7823de
1200 changed files with 35255 additions and 79887 deletions

View File

@ -1,4 +1,5 @@
^build/
^.build/
^dist/
^.idea/
nbproject/private/

View File

@ -460,7 +460,8 @@ a2008587c13fa05fa2dbfcb09fe987576fbedfd1 jdk-10+32
bbd692ad4fa300ecca7939ffbe3b1d5e52a28cc6 jdk-10+33
89deac44e51517841491ba86ff44aa82a5ca96b3 jdk-10+34
d8c634b016c628622c9abbdc6bf50509e5dedbec jdk-10+35
cb54a299aa91419cb7caef3992592e7b22488163 jdk-10+36
0ee20aad71c4f33c426372b4c8bcc1235ce2ec08 jdk-11+0
959f2f7cbaa6d2ee45d50029744efb219721576c jdk-10+36
4f830b447edf04fb4a52151a5ad44d9bb60723cd jdk-10+37
e569e83139fdfbecfeb3cd9014d560917787f158 jdk-10+38
5b834ec962366e00d4445352a999a3ac14e26f64 jdk-10+39

View File

@ -30,9 +30,10 @@ usage() {
}
SCRIPT_DIR=`dirname $0`
PWD=`pwd`
#assume TOP is the dir from which the script has been called
TOP=`pwd`
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
cd ../; TOP=`pwd`; cd $PWD
cd $TOP;
IDEA_OUTPUT=$TOP/.idea
VERBOSE="false"
@ -66,30 +67,42 @@ done
mkdir $IDEA_OUTPUT || exit 1
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
IDEA_MAKE="$TOP/make/idea"
MAKE_DIR="$SCRIPT_DIR/../make"
IDEA_MAKE="$MAKE_DIR/idea"
IDEA_TEMPLATE="$IDEA_MAKE/template"
IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml"
ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml"
MISC_TEMPLATE="$IDEA_TEMPLATE/misc.xml"
IDEA_IML="$IDEA_OUTPUT/jdk.iml"
IDEA_ANT="$IDEA_OUTPUT/ant.xml"
IDEA_MISC="$IDEA_OUTPUT/misc.xml"
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
#init template variables
for file in `ls -p $IDEA_TEMPLATE | grep -v /`; do
VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
eval "$VAR_SUFFIX"_TEMPLATE="$IDEA_TEMPLATE"/$file
eval IDEA_"$VAR_SUFFIX"="$IDEA_OUTPUT"/$file
done
#override template variables
if [ -d "$TEMPLATES_OVERRIDE" ] ; then
for file in `ls -p "$TEMPLATES_OVERRIDE" | grep -v /`; do
cp "$TEMPLATES_OVERRIDE"/$file "$IDEA_OUTPUT"/
VAR_SUFFIX=`echo $file | cut -d'.' -f1 | tr [:lower:] [:upper:]`
eval "$VAR_SUFFIX"_TEMPLATE="$TEMPLATES_OVERRIDE"/$file
done
fi
if [ "$VERBOSE" = "true" ] ; then
echo "output dir: $IDEA_OUTPUT"
echo "idea template dir: $IDEA_TEMPLATE"
fi
if [ ! -f "$IML_TEMPLATE" ] ; then
echo "FATAL: cannot find $IML_TEMPLATE" >&2; exit 1
if [ ! -f "$JDK_TEMPLATE" ] ; then
echo "FATAL: cannot find $JDK_TEMPLATE" >&2; exit 1
fi
if [ ! -f "$ANT_TEMPLATE" ] ; then
echo "FATAL: cannot find $ANT_TEMPLATE" >&2; exit 1
fi
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I make/common idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
cd $SCRIPT_DIR
. $IDEA_OUTPUT/env.cfg
@ -118,11 +131,12 @@ addSourceFolder() {
root=$@
relativePath="`echo "$root" | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`"
printf "%s\n" "$folder" >> $IDEA_IML
printf "%s\n" "$folder" >> $IDEA_JDK
}
### Generate project iml
rm -f $IDEA_IML
rm -f $IDEA_JDK
while IFS= read -r line
do
if echo "$line" | egrep "^ .* <sourceFolder.*####" > /dev/null ; then
@ -133,9 +147,9 @@ do
done
fi
else
printf "%s\n" "$line" >> $IDEA_IML
printf "%s\n" "$line" >> $IDEA_JDK
fi
done < "$IML_TEMPLATE"
done < "$JDK_TEMPLATE"
MODULE_NAME=" <property name=\"module.name\" value=\"####\" />"

View File

@ -56,10 +56,10 @@
<li><a href="#alsa">ALSA</a></li>
<li><a href="#libffi">libffi</a></li>
</ul></li>
<li><a href="#other-tooling-requirements">Other Tooling Requirements</a><ul>
<li><a href="#build-tools-requirements">Build Tools Requirements</a><ul>
<li><a href="#autoconf">Autoconf</a></li>
<li><a href="#gnu-make">GNU Make</a></li>
<li><a href="#gnu-bash">GNU Bash</a></li>
<li><a href="#autoconf">Autoconf</a></li>
</ul></li>
<li><a href="#running-configure">Running Configure</a><ul>
<li><a href="#common-configure-arguments">Common Configure Arguments</a></li>
@ -116,10 +116,10 @@
<p>If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build.</p>
<ol type="1">
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
<code>hg clone http://hg.openjdk.java.net/jdk10/master</code></p></li>
<code>hg clone http://hg.openjdk.java.net/jdk/jdk</code></p></li>
<li><p><a href="#running-configure">Run configure</a>:<br />
<code>bash configure</code></p>
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
<li><p><a href="#running-make">Run make</a>:<br />
<code>make images</code></p></li>
<li><p>Verify your newly built JDK:<br />
@ -201,12 +201,13 @@
<p>OpenJDK requires GNU Make 4.0 or greater on Windows. This is usually not a problem, since Cygwin currently only distributes GNU Make at a version above 4.0.</p>
<p>Apart from the basic Cygwin installation, the following packages must also be installed:</p>
<ul>
<li><code>autoconf</code></li>
<li><code>make</code></li>
<li><code>zip</code></li>
<li><code>unzip</code></li>
</ul>
<p>Often, you can install these packages using the following command line:</p>
<pre><code>&lt;path to Cygwin setup&gt;/setup-x86_64 -q -P make -P unzip -P zip</code></pre>
<pre><code>&lt;path to Cygwin setup&gt;/setup-x86_64 -q -P autoconf -P make -P unzip -P zip</code></pre>
<p>Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the <a href="https://cygwin.com/faq/faq.html#faq.using.bloda">&quot;BLODA&quot; list</a> and the section on <a href="https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures">fork() failures</a>.</p>
<h3 id="solaris">Solaris</h3>
<p>See <code>make/devkit/solaris11.1-package-list.txt</code> for a list of recommended packages to install when building on Solaris. The versions specified in this list is the versions used by the daily builds at Oracle, and is likely to work properly.</p>
@ -424,7 +425,17 @@ tar -xzf freetype-2.5.3.tar.gz</code></pre>
<li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
</ul>
<p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>
<h2 id="other-tooling-requirements">Other Tooling Requirements</h2>
<h2 id="build-tools-requirements">Build Tools Requirements</h2>
<h3 id="autoconf">Autoconf</h3>
<p>OpenJDK requires <a href="http://www.gnu.org/software/autoconf">Autoconf</a> on all platforms. At least version 2.69 is required.</p>
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install autoconf</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install autoconf</code>.</li>
<li>To install on macOS, try running <code>brew install autoconf</code>.</li>
<li>To install on Windows, try running <code>&lt;path to Cygwin setup&gt;/setup-x86_64 -q -P autoconf</code>.</li>
</ul>
<p>If <code>configure</code> has problems locating your installation of autoconf, you can specify it using the <code>AUTOCONF</code> environment variable, like this:</p>
<pre><code>AUTOCONF=&lt;path to autoconf&gt; configure ...</code></pre>
<h3 id="gnu-make">GNU Make</h3>
<p>OpenJDK requires <a href="http://www.gnu.org/software/make">GNU Make</a>. No other flavors of make are supported.</p>
<p>At least version 3.81 of GNU Make must be used. For distributions supporting GNU Make 4.0 or above, we strongly recommend it. GNU Make 4.0 contains useful functionality to handle parallel building (supported by <code>--with-output-sync</code>) and speed and stability improvements.</p>
@ -434,10 +445,6 @@ tar -xzf freetype-2.5.3.tar.gz</code></pre>
<h3 id="gnu-bash">GNU Bash</h3>
<p>OpenJDK requires <a href="http://www.gnu.org/software/bash">GNU Bash</a>. No other shells are supported.</p>
<p>At least version 3.2 of GNU Bash must be used.</p>
<h3 id="autoconf">Autoconf</h3>
<p>If you want to modify the build system itself, you need to install <a href="http://www.gnu.org/software/autoconf">Autoconf</a>.</p>
<p>However, if you only need to build OpenJDK or if you only edit the actual OpenJDK source files, there is no dependency on autoconf, since the source distribution includes a pre-generated <code>configure</code> shell script.</p>
<p>See the section on <a href="#autoconf-details">Autoconf Details</a> for details on how OpenJDK uses autoconf. This is especially important if you plan to contribute changes to OpenJDK that modifies the build system.</p>
<h2 id="running-configure">Running Configure</h2>
<p>To build OpenJDK, you need a &quot;configuration&quot;, which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how OpenJDK is built.</p>
<p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
@ -751,7 +758,12 @@ cannot create ... Permission denied
spawn failed</code></pre>
<p>This can be a sign of a Cygwin problem. See the information about solving problems in the <a href="#cygwin">Cygwin</a> section. Rebooting the computer might help temporarily.</p>
<h3 id="getting-help">Getting Help</h3>
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <script type="text/javascript">
<!--
h='&#x6f;&#112;&#x65;&#110;&#106;&#100;&#x6b;&#46;&#106;&#x61;&#118;&#x61;&#46;&#110;&#x65;&#116;';a='&#64;';n='&#98;&#x75;&#x69;&#108;&#100;&#x2d;&#100;&#x65;&#118;';e=n+a+h;
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
// -->
</script><noscript>&#98;&#x75;&#x69;&#108;&#100;&#x2d;&#100;&#x65;&#118;&#32;&#x61;&#116;&#32;&#x6f;&#112;&#x65;&#110;&#106;&#100;&#x6b;&#32;&#100;&#x6f;&#116;&#32;&#106;&#x61;&#118;&#x61;&#32;&#100;&#x6f;&#116;&#32;&#110;&#x65;&#116;</noscript>. Please include the relevant parts of the configure and/or build log.</p>
<p>If you need general help or advice about developing for OpenJDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
<h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
@ -871,15 +883,9 @@ test-support/</code></pre>
<p>When building for distribution, <code>zipped</code> is a good solution. Binaries built with <code>internal</code> is suitable for use by developers, since they facilitate debugging, but should be stripped before distributed to end users.</p>
<h3 id="autoconf-details">Autoconf Details</h3>
<p>The <code>configure</code> script is based on the autoconf framework, but in some details deviate from a normal autoconf <code>configure</code> script.</p>
<p>The <code>configure</code> script in the top level directory of OpenJDK is just a thin wrapper that calls <code>make/autoconf/configure</code>. This in turn provides functionality that is not easily expressed in the normal Autoconf framework, and then calls into the core of the <code>configure</code> script, which is the <code>make/autoconf/generated-configure.sh</code> file.</p>
<p>As the name implies, this file is generated by Autoconf. It is checked in after regeneration, to alleviate the common user to have to install Autoconf.</p>
<p>The build system will detect if the Autoconf source files have changed, and will trigger a regeneration of <code>make/autoconf/generated-configure.sh</code> if needed. You can also manually request such an update by <code>bash make/autoconf/autogen.sh</code>.</p>
<p>If you make changes to the build system that requires a re-generation, note the following:</p>
<ul>
<li><p>You must use <em>exactly</em> version 2.69 of autoconf for your patch to be accepted. This is to avoid spurious changes in the generated file. Note that Ubuntu 16.04 ships a patched version of autoconf which claims to be 2.69, but is not.</p></li>
<li><p>You do not need to include the generated file in reviews.</p></li>
<li><p>If the generated file needs updating, the Oracle JDK closed counter-part will also need to be updated. It is very much appreciated if you ask for an Oracle engineer to sponsor your push so this can be made in tandem.</p></li>
</ul>
<p>The <code>configure</code> script in the top level directory of OpenJDK is just a thin wrapper that calls <code>make/autoconf/configure</code>. This in turn will run <code>autoconf</code> to create the runnable (generated) configure script, as <code>.build/generated-configure.sh</code>. Apart from being responsible for the generation of the runnable script, the <code>configure</code> script also provides functionality that is not easily expressed in the normal Autoconf framework. As part of this functionality, the generated script is called.</p>
<p>The build system will detect if the Autoconf source files have changed, and will trigger a regeneration of the generated script if needed. You can also manually request such an update by <code>bash configure autogen</code>.</p>
<p>In previous versions of the OpenJDK, the generated script was checked in at <code>make/autoconf/generated-configure.sh</code>. This is no longer the case.</p>
<h3 id="developing-the-build-system-itself">Developing the Build System Itself</h3>
<p>This section contains a few remarks about how to develop for the build system itself. It is not relevant if you are only making changes in the product source code.</p>
<p>While technically using <code>make</code>, the make source files of the OpenJDK does not resemble most other Makefiles. Instead of listing specific targets and actions (perhaps using patterns), the basic modus operandi is to call a high-level function (or properly, macro) from the API in <code>make/common</code>. For instance, to compile all classes in the <code>jdk.internal.foo</code> package in the <code>jdk.foo</code> module, a call like this would be made:</p>
@ -897,7 +903,7 @@ test-support/</code></pre>
<pre><code>make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot</code></pre>
<p>See <code>make/InitSupport.gmk</code> for details on how to use <code>COMPARE_BUILD</code>.</p>
<p>To analyze build performance, run with <code>LOG=trace</code> and check <code>$BUILD/build-trace-time.log</code>. Use <code>JOBS=1</code> to avoid parallelism.</p>
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches. Also see the section in <a href="#autoconf-details">Autoconf Details</a> about the generated configure script.</p>
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
<h2 id="contributing-to-openjdk">Contributing to OpenJDK</h2>
<p>So, now you've build your OpenJDK, and made your first patch, and want to contribute it back to the OpenJDK community.</p>
<p>First of all: Thank you! We gladly welcome your contribution to the OpenJDK. However, please bear in mind that OpenJDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.</p>

View File

@ -7,13 +7,14 @@ the time. They assume that you have installed Mercurial (and Cygwin if running
on Windows) and cloned the top-level OpenJDK repository that you want to build.
1. [Get the complete source code](#getting-the-source-code): \
`hg clone http://hg.openjdk.java.net/jdk10/master`
`hg clone http://hg.openjdk.java.net/jdk/jdk`
2. [Run configure](#running-configure): \
`bash configure`
If `configure` fails due to missing dependencies (to either the
[toolchain](#native-compiler-toolchain-requirements), [external libraries](
[toolchain](#native-compiler-toolchain-requirements), [build tools](
#build-tools-requirements), [external libraries](
#external-library-requirements) or the [boot JDK](#boot-jdk-requirements)),
most of the time it prints a suggestion on how to resolve the situation on
your platform. Follow the instructions, and try running `bash configure`
@ -195,13 +196,14 @@ problem, since Cygwin currently only distributes GNU Make at a version above
Apart from the basic Cygwin installation, the following packages must also be
installed:
* `autoconf`
* `make`
* `zip`
* `unzip`
Often, you can install these packages using the following command line:
```
<path to Cygwin setup>/setup-x86_64 -q -P make -P unzip -P zip
<path to Cygwin setup>/setup-x86_64 -q -P autoconf -P make -P unzip -P zip
```
Unfortunately, Cygwin can be unreliable in certain circumstances. If you
@ -552,7 +554,27 @@ Hotspot.
Use `--with-libffi=<path>` if `configure` does not properly locate your libffi
files.
## Other Tooling Requirements
## Build Tools Requirements
### Autoconf
OpenJDK requires [Autoconf](http://www.gnu.org/software/autoconf) on all
platforms. At least version 2.69 is required.
* To install on an apt-based Linux, try running `sudo apt-get install
autoconf`.
* To install on an rpm-based Linux, try running `sudo yum install
autoconf`.
* To install on macOS, try running `brew install autoconf`.
* To install on Windows, try running `<path to Cygwin setup>/setup-x86_64 -q
-P autoconf`.
If `configure` has problems locating your installation of autoconf, you can
specify it using the `AUTOCONF` environment variable, like this:
```
AUTOCONF=<path to autoconf> configure ...
```
### GNU Make
@ -585,19 +607,6 @@ are supported.
At least version 3.2 of GNU Bash must be used.
### Autoconf
If you want to modify the build system itself, you need to install [Autoconf](
http://www.gnu.org/software/autoconf).
However, if you only need to build OpenJDK or if you only edit the actual
OpenJDK source files, there is no dependency on autoconf, since the source
distribution includes a pre-generated `configure` shell script.
See the section on [Autoconf Details](#autoconf-details) for details on how
OpenJDK uses autoconf. This is especially important if you plan to contribute
changes to OpenJDK that modifies the build system.
## Running Configure
To build OpenJDK, you need a "configuration", which consists of a directory
@ -1660,32 +1669,19 @@ The `configure` script is based on the autoconf framework, but in some details
deviate from a normal autoconf `configure` script.
The `configure` script in the top level directory of OpenJDK is just a thin
wrapper that calls `make/autoconf/configure`. This in turn provides
functionality that is not easily expressed in the normal Autoconf framework,
and then calls into the core of the `configure` script, which is the
`make/autoconf/generated-configure.sh` file.
As the name implies, this file is generated by Autoconf. It is checked in after
regeneration, to alleviate the common user to have to install Autoconf.
wrapper that calls `make/autoconf/configure`. This in turn will run `autoconf`
to create the runnable (generated) configure script, as
`.build/generated-configure.sh`. Apart from being responsible for the
generation of the runnable script, the `configure` script also provides
functionality that is not easily expressed in the normal Autoconf framework. As
part of this functionality, the generated script is called.
The build system will detect if the Autoconf source files have changed, and
will trigger a regeneration of `make/autoconf/generated-configure.sh` if
needed. You can also manually request such an update by `bash
make/autoconf/autogen.sh`.
will trigger a regeneration of the generated script if needed. You can also
manually request such an update by `bash configure autogen`.
If you make changes to the build system that requires a re-generation, note the
following:
* You must use *exactly* version 2.69 of autoconf for your patch to be
accepted. This is to avoid spurious changes in the generated file. Note
that Ubuntu 16.04 ships a patched version of autoconf which claims to be
2.69, but is not.
* You do not need to include the generated file in reviews.
* If the generated file needs updating, the Oracle JDK closed counter-part
will also need to be updated. It is very much appreciated if you ask for an
Oracle engineer to sponsor your push so this can be made in tandem.
In previous versions of the OpenJDK, the generated script was checked in at
`make/autoconf/generated-configure.sh`. This is no longer the case.
### Developing the Build System Itself
@ -1736,8 +1732,7 @@ Use `JOBS=1` to avoid parallelism.
Please check that you adhere to the [Code Conventions for the Build System](
http://openjdk.java.net/groups/build/doc/code-conventions.html) before
submitting patches. Also see the section in [Autoconf Details](
#autoconf-details) about the generated configure script.
submitting patches.
## Contributing to OpenJDK

View File

@ -1,4 +1,4 @@
# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -200,7 +200,7 @@ JAVASE_LONG_NAME := Java<sup>&reg;</sup> Platform, Standard Edition
#
define setup_gengraph_dot_to_png
$1_$2_DOT_SRC := $$($1_GENGRAPHS_DIR)/$2.dot
$1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2-graph.png
$1_$2_PNG_TARGET := $$($1_TARGET_DIR)/$2/module-graph.png
# For each module needing a graph, create a png file from the dot file
# generated by the GenGraphs tool and store it in the target dir.

View File

@ -637,7 +637,7 @@ else
# Declare dependencies between hotspot-<variant>* targets
$(foreach v, $(JVM_VARIANTS), \
$(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
$(eval hotspot-$v-libs: hotspot-$v-gensrc) \
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
)
hotspot-ide-project: hotspot exploded-image
@ -691,8 +691,9 @@ else
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
# The swing beans need to have java base properly generated to avoid errors
# in javadoc.
java.desktop-gensrc-src: java.base-gensrc
# in javadoc. The X11 wrappers need the java.base include files to have been
# copied and processed.
java.desktop-gensrc-src: java.base-gensrc java.base-copy
# The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
# needs classes from the current JDK.

View File

@ -1,81 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
generate_configure_script() {
# First create a header
cat > $1 << EOT
#!/bin/bash
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
EOT
# Then replace "magic" variables in configure.ac and append the output
# from autoconf. $2 is either cat (just a no-op) or a filter.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
eval $2 | ${AUTOCONF} -W all -I$script_dir - >> $1
rm -rf autom4te.cache
}
script_dir=`dirname $0`
# Create a timestamp as seconds since epoch
if test "x`uname -s`" = "xSunOS"; then
TIMESTAMP=`date +%s`
if test "x$TIMESTAMP" = "x%s"; then
# date +%s not available on this Solaris, use workaround from nawk(1):
TIMESTAMP=`nawk 'BEGIN{print srand()}'`
fi
else
TIMESTAMP=`date +%s`
fi
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
if test "x${AUTOCONF}" = x; then
echo "You need autoconf installed to be able to regenerate the configure script"
echo "Error: Cannot find autoconf" 1>&2
exit 1
fi
autoconf_version=`$AUTOCONF --version | head -1`
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
echo "Generating generated-configure.sh"
generate_configure_script "$script_dir/generated-configure.sh" 'cat'
if test "x$CUSTOM_CONFIG_DIR" != "x"; then
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
if test ! -e $custom_hook; then
echo "CUSTOM_CONFIG_DIR set but $CUSTOM_CONFIG_DIR/custom-hook.m4 not present"
echo "Error: Cannot continue" 1>&2
exit 1
fi
# We have custom sources available; also generate configure script
# with custom hooks compiled in.
echo "Generating custom generated-configure.sh"
generate_configure_script "$CUSTOM_CONFIG_DIR/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
fi

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -336,7 +336,6 @@ AC_DEFUN_ONCE([BASIC_INIT],
DATE_WHEN_CONFIGURED=`LANG=C date`
AC_SUBST(DATE_WHEN_CONFIGURED)
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
])
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
@ -586,69 +585,71 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this devkit for compilers, tools and resources])],
[
BASIC_FIXUP_PATH([with_devkit])
DEVKIT_ROOT="$with_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$DEVKIT_ROOT/devkit.info"; then
. $DEVKIT_ROOT/devkit.info
# This potentially sets the following:
# A descriptive name of the devkit
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
# Corresponds to --with-extra-path
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
# Corresponds to --with-toolchain-path
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
# Corresponds to --with-sysroot
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
[use this devkit for compilers, tools and resources])])
# Identifies the Visual Studio version in the devkit
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
# The Visual Studio include environment variable
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
# The Visual Studio lib environment variable
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
# Corresponds to --with-msvcr-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
# Corresponds to --with-msvcp-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
fi
if test "x$with_devkit" = xyes; then
AC_MSG_ERROR([--with-devkit must have a value])
elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
BASIC_FIXUP_PATH([with_devkit])
DEVKIT_ROOT="$with_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$DEVKIT_ROOT/devkit.info"; then
. $DEVKIT_ROOT/devkit.info
# This potentially sets the following:
# A descriptive name of the devkit
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
# Corresponds to --with-extra-path
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
# Corresponds to --with-toolchain-path
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
# Corresponds to --with-sysroot
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
AC_MSG_CHECKING([for devkit])
if test "x$DEVKIT_NAME" != x; then
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
else
AC_MSG_RESULT([$DEVKIT_ROOT])
fi
# Identifies the Visual Studio version in the devkit
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
# The Visual Studio include environment variable
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
# The Visual Studio lib environment variable
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
# Corresponds to --with-msvcr-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
# Corresponds to --with-msvcp-dll
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
fi
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
AC_MSG_CHECKING([for devkit])
if test "x$DEVKIT_NAME" != x; then
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
else
AC_MSG_RESULT([$DEVKIT_ROOT])
fi
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
fi
BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
# places for backwards compatiblity.
if test "x$DEVKIT_SYSROOT" != x; then
SYSROOT="$DEVKIT_SYSROOT"
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
fi
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
fi
BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
if test "x$DEVKIT_ROOT" != x; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
fi
AC_SUBST(DEVKIT_LIB_DIR)
fi
]
)
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
# places for backwards compatiblity.
if test "x$DEVKIT_SYSROOT" != x; then
SYSROOT="$DEVKIT_SYSROOT"
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
fi
if test "x$DEVKIT_ROOT" != x; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
fi
AC_SUBST(DEVKIT_LIB_DIR)
fi
fi
# You can force the sysroot if the sysroot encoded into the compiler tools
# is not correct.
@ -1185,9 +1186,6 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[
# Did user specify any unknown variables?
BASIC_CHECK_LEFTOVER_OVERRIDDEN
AC_MSG_CHECKING([if build directory is on local disk])
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUTDIR,
[OUTPUT_DIR_IS_LOCAL="yes"],

View File

@ -55,6 +55,7 @@ OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
OPENJDK_TARGET_OS_INCLUDE_SUBDIR := @OPENJDK_BUILD_OS_INCLUDE_SUBDIR@
HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -43,82 +43,131 @@ fi
export CONFIG_SHELL=$BASH
export _as_can_reexec=no
conf_script_dir="$TOPDIR/make/autoconf"
if test "x$CUSTOM_CONFIG_DIR" != x; then
if test ! -e $CUSTOM_CONFIG_DIR/generated-configure.sh; then
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
if test ! -e $custom_hook; then
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
echo "Error: Cannot continue" 1>&2
exit 1
fi
build_support_dir="$CUSTOM_ROOT/.build"
else
build_support_dir="$TOPDIR/.build"
fi
conf_script_dir="$TOPDIR/make/autoconf"
generated_script="$build_support_dir/generated-configure.sh"
###
### Test that the generated configure is up-to-date
### Use autoconf to create a runnable configure script, if needed
###
run_autogen_or_fail() {
if test "x`which autoconf 2> /dev/null | grep -v '^no autoconf in'`" = x; then
echo "Cannot locate autoconf, unable to correct situation."
echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
echo "Error: Cannot continue" 1>&2
exit 1
else
echo "Running autogen.sh to correct the situation"
bash $conf_script_dir/autogen.sh
autoconf_missing_help() {
APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
if test "x$APT_GET" != x; then
PKGHANDLER_COMMAND="sudo apt-get install autoconf"
elif test "x$YUM" != x; then
PKGHANDLER_COMMAND="sudo yum install autoconf"
elif test "x$BREW" != x; then
PKGHANDLER_COMMAND="brew install autoconf"
elif test "x$CYGWIN" != x; then
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
fi
if test "x$PKGHANDLER_COMMAND" != x; then
echo "You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi
}
check_autoconf_timestamps() {
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
if test $file -nt $conf_script_dir/generated-configure.sh; then
echo "Warning: The configure source files is newer than the generated files."
run_autogen_or_fail
generate_configure_script() {
if test "x$AUTOCONF" != x; then
if test ! -x "$AUTOCONF"; then
echo
echo "The specified AUTOCONF variable does not point to a valid autoconf executable:"
echo "AUTOCONF=$AUTOCONF"
echo "Error: Cannot continue" 1>&2
exit 1
fi
done
else
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
if test "x$AUTOCONF" = x; then
echo
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
echo "You need autoconf to be able to generate a runnable configure script."
autoconf_missing_help
echo "Error: Cannot find autoconf" 1>&2
exit 1
fi
fi
autoconf_version=`$AUTOCONF --version | head -1`
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
if test "x$CUSTOM_CONFIG_DIR" != x; then
# If custom source configure is available, make sure it is up-to-date as well.
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $CUSTOM_CONFIG_DIR/*.m4; do
if test $file -nt $CUSTOM_CONFIG_DIR/generated-configure.sh; then
echo "Warning: The configure source files is newer than the custom generated files."
run_autogen_or_fail
fi
done
# Generate configure script with custom hooks compiled in.
custom_patcher='sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
else
custom_patcher='cat'
fi
mkdir -p `dirname $generated_script`
# Call autoconf but replace the "magic" variable in configure.ac if requested.
cat $conf_script_dir/configure.ac | eval $custom_patcher | \
${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
rm -rf autom4te.cache
# Sanity check
if test ! -s $generated_script; then
echo "Error: Failed to generate runnable configure script" 1>&2
rm -f $generated_script
exit 1
fi
}
check_hg_updates() {
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard . 2> /dev/null`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
elif test "x$CUSTOM_CONFIG_DIR" != x; then
# If custom source configure is available, make sure it is up-to-date as well.
conf_custom_updated_autoconf_files=`cd $CUSTOM_CONFIG_DIR && hg status -mard . 2> /dev/null`
if test "x$conf_custom_updated_autoconf_files" != x; then
echo "Configure custom source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
test_generated_up_to_date() {
conf_source_files="$conf_script_dir/configure.ac $conf_script_dir/*.m4"
if test "x$CUSTOM_CONFIG_DIR" != x; then
conf_custom_source_files="$CUSTOM_CONFIG_DIR/*.m4"
else
conf_custom_source_files=""
fi
for file in $conf_source_files $conf_custom_source_files ; do
if test $file -nt $generated_script; then
return 0
fi
fi
done
return 1
}
# Check for local changes
check_hg_updates
run_autoconf=false
if test "x$1" = xautogen; then
# User called us as "configure autogen", so force regeneration
run_autoconf=true
shift
fi
if test "x$CUSTOM_CONFIG_DIR" != x; then
# Test if open configure is newer than custom configure, if so, custom needs to
# be regenerated. This test is required to ensure consistency with custom source.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $CUSTOM_CONFIG_DIR/generated-configure.sh | cut -d"=" -f 2`
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Warning: The generated configure file contains changes not present in the custom generated file."
run_autogen_or_fail
if test ! -s $generated_script; then
# Generated script is missing, so we need to create it
echo "Runnable configure script is not present"
run_autoconf=true
else
# File is present, but is it up to date?
if test_generated_up_to_date; then
echo "Runnable configure script is not up to date"
run_autoconf=true
fi
fi
if test "x$run_autoconf" = xtrue; then
echo "Generating runnable configure script"
generate_configure_script
fi
# Autoconf calls the configure script recursively sometimes.
# Don't start logging twice in that case
if test "x$conf_debug_configure" = xtrue; then
@ -240,15 +289,6 @@ conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arg
###
### Call the configure script
###
if test "x$CUSTOM_CONFIG_DIR" != x; then
# Custom source configure available; run that instead
echo "Running custom generated-configure.sh"
conf_script_to_run=$CUSTOM_CONFIG_DIR/generated-configure.sh
else
echo "Running generated-configure.sh"
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
if test "x$conf_debug_configure" != x; then
# Turn on shell debug output if requested (initial or recursive)
set -x
@ -259,7 +299,7 @@ fi
RCDIR=`mktemp -dt jdk-build-configure.tmp.XXXXXX` || exit $?
trap "rm -rf \"$RCDIR\"" EXIT
conf_logfile=./configure.log
(exec 3>&1 ; ((. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
(exec 3>&1 ; ((. $generated_script "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
; echo $? > "$RCDIR/rc" ) \
| tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile
@ -284,7 +324,7 @@ EOT
# Print additional help, e.g. a list of toolchains and JVM features.
# This must be done by the autoconf script.
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $conf_script_to_run PRINTF=printf )
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
cat <<EOT

View File

@ -1,5 +1,5 @@
SRC#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -63,9 +63,6 @@ AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
###############################################################################
#
# Initialization / Boot-strapping
@ -280,6 +277,9 @@ CUSTOM_LATE_HOOK
# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
HOTSPOT_VALIDATE_JVM_FEATURES
# Did user specify any unknown variables?
BASIC_CHECK_LEFTOVER_OVERRIDDEN
# We're messing a bit with internal autoconf variables to put the config.status
# in the output directory instead of the current directory.
CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -918,7 +918,6 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
-MD -Zc:wchar_t- -W3 -wd4800 \
-DWIN32_LEAN_AND_MEAN \
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
-D_WINSOCK_DEPRECATED_NO_WARNINGS \
-DWIN32 -DIAL"
if test "x$OPENJDK_$1_CPU" = xx86_64; then
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
@ -1113,10 +1112,11 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# Additional macosx handling
if test "x$OPENJDK_$1_OS" = xmacosx; then
# MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
# format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
# JDK can be built and makes the linked binaries compatible even if built on
# a newer version of the OS.
# MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
# binaries should be compatible with, even if compiled on a newer version
# of the OS. It currently has a hard coded value. Setting this also limits
# exposure to API changes in header files. Bumping this is likely to
# require code changes to build.
MACOSX_VERSION_MIN=10.7.0
AC_SUBST(MACOSX_VERSION_MIN)
@ -1150,6 +1150,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
$2JVM_CFLAGS="[$]$2JVM_CFLAGS \
-DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
-mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
$2ARFLAGS="$2$ARFLAGS -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
if test -n "$MACOSX_VERSION_MAX"; then
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
@ -1162,9 +1163,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
# Setup some hard coded includes
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I${TOPDIR}/src/java.base/share/native/include \
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \
-I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I${TOPDIR}/src/java.base/share/native/libjava \
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \
-I${TOPDIR}/src/hotspot/share/include \

File diff suppressed because it is too large Load Diff

View File

@ -242,10 +242,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
if test "x$TOOLCHAIN_VERSION" != "x"; then
print_version=" $TOOLCHAIN_VERSION"
fi
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
@ -292,6 +289,12 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "You should run without '--no-create | -n' to create the configuration.\n"
printf "\n"
fi
if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
printf "WARNING: The toolchain version used is known to have issues. Please\n"
printf "consider using a supported version unless you know what you are doing.\n"
printf "\n"
fi
])
AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],

View File

@ -381,6 +381,10 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
# We could define --with flags for these, if really needed
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
AC_MSG_CHECKING([for version string])
AC_MSG_RESULT([$VERSION_STRING])
@ -398,4 +402,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_SUBST(VERSION_IS_GA)
AC_SUBST(VERSION_DATE)
AC_SUBST(VENDOR_VERSION_STRING)
AC_SUBST(VERSION_CLASSFILE_MAJOR)
AC_SUBST(VERSION_CLASSFILE_MINOR)
])

View File

@ -209,7 +209,17 @@ AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
fi
LIBZ_CFLAGS=""
LIBZ_LIBS=""
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib"
else
LIBZ_LIBS="-lz"
fi
AC_SUBST(USE_EXTERNAL_LIBZ)
AC_SUBST(LIBZ_CFLAGS)
AC_SUBST(LIBZ_LIBS)
])
################################################################################

View File

@ -478,6 +478,14 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
fi
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
# For historical reasons, the OS include directories have odd names.
OPENJDK_$1_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
OPENJDK_$1_OS_INCLUDE_SUBDIR="win32"
elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
OPENJDK_$1_OS_INCLUDE_SUBDIR="darwin"
fi
AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR)
])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -78,6 +78,7 @@ OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
OPENJDK_TARGET_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
@ -100,6 +101,8 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
OPENJDK_BUILD_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
# Target platform value in ModuleTarget class file attribute.
OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
@ -189,6 +192,10 @@ VERSION_DATE := @VERSION_DATE@
# Vendor version string
VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@
# Class-file version
VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@
VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@
# Convenience CFLAGS settings for passing version information into native programs.
VERSION_CFLAGS := \
-DVERSION_FEATURE=$(VERSION_FEATURE) \
@ -204,6 +211,8 @@ VERSION_CFLAGS := \
-DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
-DVERSION_DATE='"$(VERSION_DATE)"' \
-DVENDOR_VERSION_STRING='"$(VENDOR_VERSION_STRING)"' \
-DVERSION_CLASSFILE_MAJOR=$(VERSION_CLASSFILE_MAJOR) \
-DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
#
ifneq ($(COMPANY_NAME),)
@ -604,6 +613,8 @@ INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc
INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES))
INTERIM_LANGTOOLS_ADD_EXPORTS := \
--add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
--add-exports java.base/jdk.internal.jmod=jdk.compiler.interim \
--add-exports java.base/jdk.internal.misc=jdk.compiler.interim \
#
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
$(INTERIM_LANGTOOLS_MODULES))))
@ -726,6 +737,8 @@ ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
LIBZ_CFLAGS:=@LIBZ_CFLAGS@
LIBZ_LIBS:=@LIBZ_LIBS@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
MSVCR_DLL:=@MSVCR_DLL@
MSVCP_DLL:=@MSVCP_DLL@

View File

@ -286,7 +286,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
if test "x$XCODE_VERSION_OUTPUT" != x; then
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
else
# Currently we do not define this for other toolchains. This might change as the need arise.
TOOLCHAIN_VERSION=

View File

@ -25,7 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2013 2012 2010"
VALID_VS_VERSIONS="2013 2012 2010 2015 2017"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
@ -58,6 +58,30 @@ VS_SDK_INSTALLDIR_2013=
VS_VS_PLATFORM_NAME_2013="v120"
VS_SDK_PLATFORM_NAME_2013=
VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
VS_VERSION_INTERNAL_2015=140
VS_MSVCR_2015=vcruntime140.dll
VS_MSVCP_2015=msvcp140.dll
VS_ENVVAR_2015="VS140COMNTOOLS"
VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
VS_SDK_INSTALLDIR_2015=
VS_VS_PLATFORM_NAME_2015="v140"
VS_SDK_PLATFORM_NAME_2015=
# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
# explicitly specifying Windows Kit 8.1 to be used.
VS_ENV_ARGS_2015="8.1"
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
VS_VERSION_INTERNAL_2017=141
VS_MSVCR_2017=vcruntime140.dll
VS_MSVCP_2017=msvcp140.dll
VS_ENVVAR_2017="VS150COMNTOOLS"
VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
VS_EDITIONS_2017="Community Professional Enterprise"
VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
################################################################################
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
@ -67,23 +91,41 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
VS_BASE="$2"
METHOD="$3"
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
VCVARSFILE="vc/bin/vcvars32.bat"
else
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
# In VS 2017, the default installation is in a subdir named after the edition.
# Find the first one present and use that.
if test "x$VS_EDITIONS" != x; then
for edition in $VS_EDITIONS; do
if test -d "$VS_BASE/$edition"; then
VS_BASE="$VS_BASE/$edition"
break
fi
done
fi
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
if test -d "$VS_BASE"; then
if test -f "$VS_BASE/$VCVARSFILE"; then
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
else
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
if test -f "$VS_BASE/$VCVARSFILE"; then
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
break
fi
done
if test "x$VS_ENV_CMD" = x; then
AC_MSG_NOTICE([Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring])
else
# PLATFORM_TOOLSET is used during the compilation of the freetype sources
# (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
# 'v110' or 'v120' for VS 2010, 2012 or VS2013
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
fi
fi
fi
@ -133,7 +175,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
# When using --with-tools-dir, assume it points to the correct and default
# version of Visual Studio or that --with-toolchain-version was also set.
@ -153,7 +197,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
fi
VS_ENV_CMD=""
VS_ENV_ARGS=""
if test "x$VS_COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
@ -213,7 +256,11 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
elif test "x$DEVKIT_VS_VERSION" != x; then
VS_VERSION=$DEVKIT_VS_VERSION
TOOLCHAIN_VERSION=$VS_VERSION
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
# If the devkit has a name, use that as description
VS_DESCRIPTION="$DEVKIT_NAME"
if test "x$VS_DESCRIPTION" = x; then
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
fi
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
@ -267,6 +314,11 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
break
fi
done
TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
if test "$TOOLCHAIN_VERSION" -gt 2013; then
UNSUPPORTED_TOOLCHAIN_VERSION=yes
fi
])
################################################################################
@ -320,6 +372,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# This will end up something like:
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
# In some cases, the VS_ENV_CMD will change directory, change back so
# the set-vs-env.sh ends up in the right place.
$ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
# These will end up something like:
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
# The trailing space for everyone except PATH is no typo, but is needed due
@ -483,18 +538,30 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
MSVC_DLL=
if test "x$MSVC_DLL" = x; then
# Probe: Using well-known location from Visual Studio 10.0
if test "x$VCINSTALLDIR" != x; then
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
if test "$VS_VERSION" -lt 2017; then
# Probe: Using well-known location from Visual Studio 12.0 and older
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
else
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
fi
else
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
# Probe: Using well-known location from VS 2017
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
else
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
fi
fi
$ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[well-known location in VCINSTALLDIR])
# In case any of the above finds more than one file, loop over them.
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
$ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
[well-known location in VCINSTALLDIR])
done
fi
fi
@ -576,7 +643,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
fi
fi
MSVCR_DLL="$MSVC_DLL"
else
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
@ -599,7 +666,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
fi
fi
MSVCP_DLL="$MSVC_DLL"
else
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])

View File

@ -25,11 +25,13 @@
# Default version numbers to use unless overridden by configure
DEFAULT_VERSION_FEATURE=10
DEFAULT_VERSION_FEATURE=11
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_DATE=2018-03-20
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK

View File

@ -26,13 +26,16 @@
ifndef _SETUP_GMK
_SETUP_GMK := 1
# Include custom extension hook
$(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
include JavaCompilation.gmk
DISABLE_WARNINGS := -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
# If warnings needs to be non-fatal for testing purposes use a command like:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
JAVAC_WARNINGS := -Xlint:all -Werror
JAVAC_WARNINGS ?= -Xlint:all -Werror
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
# and the interim javac, to be run by the boot jdk.
@ -69,7 +72,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 10 -target 10 --doclint-format html5 \
FLAGS := -source 11 -target 11 --doclint-format html5 \
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
@ -79,7 +82,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 10 -target 10 \
FLAGS := -source 11 -target 11 \
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

View File

@ -200,7 +200,7 @@ var getJibProfiles = function (input) {
data.configuration_make_arg = "CONF_NAME=";
// Exclude list to use when Jib creates a source bundle
data.src_bundle_excludes = "./build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
data.src_bundle_excludes = "./build .build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
// Include list to use when creating a minimal jib source bundle which
// contains just the jib configuration files.
data.conf_bundle_includes = "*/conf/jib-profiles.* make/autoconf/version-numbers"
@ -411,7 +411,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"linux-x64": {
target_os: "linux",
target_cpu: "x64",
dependencies: ["devkit", "graphviz", "pandoc"],
dependencies: ["devkit", "autoconf", "graphviz", "pandoc"],
configure_args: concat(common.configure_args_64bit,
"--enable-full-docs", "--with-zlib=system"),
default_make_targets: ["docs-bundles"],
@ -421,7 +421,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "linux",
target_cpu: "x86",
build_cpu: "x64",
dependencies: ["devkit"],
dependencies: ["devkit", "autoconf"],
configure_args: concat(common.configure_args_32bit,
"--with-jvm-variants=minimal,server", "--with-zlib=system"),
},
@ -429,7 +429,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit", "freetype"],
dependencies: ["devkit", "autoconf", "freetype"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.7.0"),
},
@ -437,7 +437,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"solaris-x64": {
target_os: "solaris",
target_cpu: "x64",
dependencies: ["devkit", "cups"],
dependencies: ["devkit", "autoconf", "cups"],
configure_args: concat(common.configure_args_64bit,
"--with-zlib=system", "--enable-dtrace"),
},
@ -445,7 +445,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"solaris-sparcv9": {
target_os: "solaris",
target_cpu: "sparcv9",
dependencies: ["devkit", "cups"],
dependencies: ["devkit", "autoconf", "cups"],
configure_args: concat(common.configure_args_64bit,
"--with-zlib=system", "--enable-dtrace"),
},
@ -453,7 +453,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"windows-x64": {
target_os: "windows",
target_cpu: "x64",
dependencies: ["devkit", "freetype"],
dependencies: ["devkit", "autoconf", "freetype"],
configure_args: concat(common.configure_args_64bit),
},
@ -461,7 +461,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "windows",
target_cpu: "x86",
build_cpu: "x64",
dependencies: ["devkit", "freetype"],
dependencies: ["devkit", "autoconf", "freetype"],
configure_args: concat(common.configure_args_32bit),
},
@ -469,7 +469,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "linux",
target_cpu: "aarch64",
build_cpu: "x64",
dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
dependencies: ["devkit", "autoconf", "build_devkit", "cups", "headless_stubs"],
configure_args: [
"--with-cpu-port=arm64",
"--with-jvm-variants=server",
@ -482,7 +482,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "linux",
target_cpu: "arm",
build_cpu: "x64",
dependencies: ["devkit", "build_devkit", "cups"],
dependencies: ["devkit", "autoconf", "build_devkit", "cups"],
configure_args: [
"--with-jvm-variants=minimal1,client",
"--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
@ -829,7 +829,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "javare",
revision: "4.2",
build_number: "b10",
build_number: "b11",
checksum_file: "MD5_VALUES",
file: "jtreg_bin-4.2.zip",
environment_name: "JT_HOME",
@ -854,6 +854,17 @@ var getJibProfilesDependencies = function (input, common) {
environment_path: makeBinDir
},
autoconf: {
organization: common.organization,
ext: "tar.gz",
revision: "2.69+1.0.1",
module: (input.build_os == "windows"
? "autoconf-" + input.build_osenv_platform
: "autoconf-" + input.build_platform),
configure_args: "",
environment_path: input.get("autoconf", "install_path")
},
freetype: {
organization: common.organization,
ext: "tar.gz",
@ -878,6 +889,7 @@ var getJibProfilesDependencies = function (input, common) {
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
environment_path: input.get("pandoc", "install_path") + "/pandoc"
},
// This adds java jib as a dependency for the test artifacts resolver
jib: {
organization: "com.oracle.java.jib",

View File

@ -24,6 +24,7 @@
#
include CopyCommon.gmk
include TextFileProcessing.gmk
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
@ -244,3 +245,16 @@ ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
endif
################################################################################
# Generate classfile_constants.h
$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \
SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \
REPLACEMENTS := \
@@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \
@@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \
))
TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H)
################################################################################

View File

@ -39,20 +39,12 @@ ifneq ($(wildcard $(INCLUDE_SOURCE_DIR)/*), )
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \
SRC := $(INCLUDE_SOURCE_DIR), \
DEST := $(INCLUDE_TARGET_DIR), \
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_DIR) -type f), \
FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_DIR))), \
))
TARGETS += $(COPY_EXPORTED_INCLUDE)
endif
# For historical reasons, the OS include directories have odd names.
INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS)
ifeq ($(OPENJDK_TARGET_OS), windows)
INCLUDE_TARGET_OS_SUBDIR := win32
else ifeq ($(OPENJDK_TARGET_OS), macosx)
INCLUDE_TARGET_OS_SUBDIR := darwin
endif
# Use the most specific of OS and OS_TYPE.
INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include
ifeq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
@ -62,8 +54,8 @@ endif
ifneq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \
SRC := $(INCLUDE_SOURCE_OS_DIR), \
DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_OS_DIR) -type f), \
DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \
FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \
))
TARGETS += $(COPY_EXPORTED_INCLUDE_OS)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -159,20 +159,37 @@ class CharacterDataLatin1 extends CharacterData {
return toUpperCase(ch);
}
// Digit values for codePoints in the 0-255 range. Contents generated using:
// for (char i = 0; i < 256; i++) {
// int v = -1;
// if (i >= '0' && i <= '9') { v = i - '0'; }
// else if (i >= 'A' && i <= 'Z') { v = i - 'A' + 10; }
// else if (i >= 'a' && i <= 'z') { v = i - 'a' + 10; }
// if (i % 20 == 0) System.out.println();
// System.out.printf("%2d, ", v);
// }
//
// Analysis has shown that generating the whole array allows the JIT to generate
// better code compared to a slimmed down array, such as one cutting off after 'z'
private static final byte[] DIGITS = new byte[] {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1,
-1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
int digit(int ch, int radix) {
int value = -1;
if (radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX) {
int val = getProperties(ch);
int kind = val & $$maskType;
if (kind == Character.DECIMAL_DIGIT_NUMBER) {
value = ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit;
}
else if ((val & $$maskNumericType) == $$valueJavaSupradecimal) {
// Java supradecimal digit
value = (ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit) + 10;
}
}
return (value < radix) ? value : -1;
int value = DIGITS[ch];
return (value >= 0 && value < radix && radix >= Character.MIN_RADIX
&& radix <= Character.MAX_RADIX) ? value : -1;
}
int getNumericValue(int ch) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -869,7 +869,6 @@ JDWP "Java(tm) Debug Wire Protocol"
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
"<p>
(Out
(referenceType refType "The reference type ID.")
)
@ -2723,7 +2722,6 @@ JDWP "Java(tm) Debug Wire Protocol"
"<P>"
"The events that are grouped in a composite event are restricted in the "
"following ways: "
"<P>"
"<UL>"
"<LI>Only with other thread start events for the same thread:"
" <UL>"

View File

@ -0,0 +1,116 @@
#!/bin/bash -e
#
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Create a bundle in the current directory, containing what's needed to run
# the 'autoconf' program by the OpenJDK build.
# Autoconf depends on m4, so download and build that first.
AUTOCONF_VERSION=2.69
M4_VERSION=1.4.18
PACKAGE_VERSION=1.0.1
TARGET_PLATFORM=linux_x86
MODULE_NAME=autoconf-$TARGET_PLATFORM-$AUTOCONF_VERSION+$PACKAGE_VERSION
BUNDLE_NAME=$MODULE_NAME.tar.gz
TMPDIR=`mktemp -d -t autoconfbundle-XXXX`
trap "rm -rf \"$TMPDIR\"" EXIT
ORIG_DIR=`pwd`
cd $TMPDIR
OUTPUT_DIR=$TMPDIR/$MODULE_NAME
mkdir -p $OUTPUT_DIR/usr
# Download and build m4
if test "x$TARGET_PLATFORM" = xcygwin_x64; then
# On cygwin 64-bit, just copy the cygwin .exe file
mkdir -p $OUTPUT_DIR/usr/bin
cp /usr/bin/m4 $OUTPUT_DIR/usr/bin
elif test "x$TARGET_PLATFORM" = xcygwin_x86; then
# On cygwin 32-bit, just copy the cygwin .exe file
mkdir -p $OUTPUT_DIR/usr/bin
cp /usr/bin/m4 $OUTPUT_DIR/usr/bin
elif test "x$TARGET_PLATFORM" = xlinux_x64; then
M4_VERSION=1.4.13-5
wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/m4-$M4_VERSION.el6.x86_64.rpm
cd $OUTPUT_DIR
rpm2cpio ../m4-$M4_VERSION.el6.x86_64.rpm | cpio -d -i
elif test "x$TARGET_PLATFORM" = xlinux_x86; then
M4_VERSION=1.4.13-5
wget http://yum.oracle.com/repo/OracleLinux/OL6/latest/i386/getPackage/m4-$M4_VERSION.el6.i686.rpm
cd $OUTPUT_DIR
rpm2cpio ../m4-$M4_VERSION.el6.i686.rpm | cpio -d -i
else
wget https://ftp.gnu.org/gnu/m4/m4-$M4_VERSION.tar.gz
tar xzf m4-$M4_VERSION.tar.gz
cd m4-$M4_VERSION
./configure --prefix=$OUTPUT_DIR/usr
make
make install
cd ..
fi
# Download and build autoconf
wget https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz
tar xzf autoconf-$AUTOCONF_VERSION.tar.gz
cd autoconf-$AUTOCONF_VERSION
./configure --prefix=$OUTPUT_DIR/usr M4=$OUTPUT_DIR/usr/bin/m4
make
make install
cd ..
perl -pi -e "s!$OUTPUT_DIR/!./!" $OUTPUT_DIR/usr/bin/auto* $OUTPUT_DIR/usr/share/autoconf/autom4te.cfg
cp $OUTPUT_DIR/usr/share/autoconf/autom4te.cfg $OUTPUT_DIR/autom4te.cfg
cat > $OUTPUT_DIR/autoconf << EOF
#!/bin/bash
# Get an absolute path to this script
this_script_dir=\`dirname \$0\`
this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\`
export M4="\$this_script_dir/usr/bin/m4"
export AUTOM4TE="\$this_script_dir/usr/bin/autom4te"
export AUTOCONF="\$this_script_dir/usr/bin/autoconf"
export AUTOHEADER="\$this_script_dir/usr/bin/autoheader"
export AC_MACRODIR="\$this_script_dir/usr/share/autoconf"
export autom4te_perllibdir="\$this_script_dir/usr/share/autoconf"
autom4te_cfg=\$this_script_dir/usr/share/autoconf/autom4te.cfg
cp \$this_script_dir/autom4te.cfg \$autom4te_cfg
echo 'begin-language: "M4sugar"' >> \$autom4te_cfg
echo "args: --prepend-include '"\$this_script_dir/usr/share/autoconf"'" >> \$autom4te_cfg
echo 'end-language: "M4sugar"' >> \$autom4te_cfg
exec \$this_script_dir/usr/bin/autoconf "\$@"
EOF
chmod +x $OUTPUT_DIR/autoconf
cd $OUTPUT_DIR
tar -cvzf ../$BUNDLE_NAME *
cd ..
cp $BUNDLE_NAME "$ORIG_DIR"

View File

@ -0,0 +1,146 @@
#!/bin/bash
#
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This script copies parts of an Xcode installation into a devkit suitable
# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
# to be either installed or extracted using for example Archive Utility.
# The easiest way to accomplish this is to right click the file in Finder
# and choose "Open With -> Archive Utility", or possible typing
# "open Xcode_9.2.xip" in a terminal.
# erik.joelsson@oracle.com
USAGE="$0 <Xcode.app>"
if [ "$1" = "" ]; then
echo $USAGE
exit 1
fi
XCODE_APP="$1"
XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
# Find the version of Xcode
XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
| awk '/Xcode/ { print $2 }' )"
SDK_VERSION="MacOSX10.13"
if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
echo "Expected SDK version not found: ${SDK_VERSION}"
exit 1
fi
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
echo "Xcode version: $XCODE_VERSION"
echo "Creating devkit in $DEVKIT_ROOT"
mkdir -p $DEVKIT_ROOT
################################################################################
# Copy the relevant parts of Xcode.app, removing things that are both big and
# unecessary for our purposes, without building an impossibly long exclude list.
#
# Not including WatchSimulator.platform makes ibtool crashes in some situations.
# It doesn't seem to matter which extra platform is included, but that is the
# smallest one.
EXCLUDE_DIRS=" \
Contents/_CodeSignature \
$XCODE_APP_DIR_NAME/Contents/Applications \
$XCODE_APP_DIR_NAME/Contents/Resources \
$XCODE_APP_DIR_NAME/Contents/Library \
$XCODE_APP_DIR_NAME/Contents/XPCServices \
$XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
$XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
Platforms/AppleTVSimulator.platform \
Platforms/iPhoneSimulator.platform \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
$(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
| grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
"
for ex in $EXCLUDE_DIRS; do
EXCLUDE_ARGS+="--exclude=$ex "
done
echo "Copying Xcode.app..."
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
################################################################################
echo-info() {
echo "$1" >> $DEVKIT_ROOT/devkit.info
}
echo "Generating devkit.info..."
rm -f $DEVKIT_ROOT/devkit.info
echo-info "# This file describes to configure how to interpret the contents of this devkit"
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
################################################################################
# Copy this script
echo "Copying this script..."
cp $0 $DEVKIT_ROOT/
################################################################################
# Create bundle
echo "Creating bundle..."
GZIP=$(command -v pigz)
if [ -z "$GZIP" ]; then
GZIP="gzip"
fi
(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")

View File

@ -0,0 +1,142 @@
#!/bin/bash
#
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This script copies parts of a Visual Studio installation into a devkit
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
# erik.joelsson@oracle.com
VS_VERSION="2015"
VS_VERSION_NUM="14.0"
VS_VERSION_NUM_NODOT="140"
SDK_VERSION="8.1"
VS_VERSION_SP="update3"
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
echo "Creating devkit in $DEVKIT_ROOT"
MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/vcruntime${VS_VERSION_NUM_NODOT}.dll
MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
################################################################################
# Copy Visual Studio files
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
if [ ! -d $DEVKIT_ROOT/VC ]; then
echo "Copying VC..."
mkdir -p $DEVKIT_ROOT/VC/bin
cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
cp "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
mkdir -p $DEVKIT_ROOT/VC/lib
cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
cp "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
cp "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
mkdir -p $DEVKIT_ROOT/VC/redist
cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
# The redist runtime libs are needed to run the compiler but may not be
# installed on the machine where the devkit will be used.
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
# The msvcdis dll is needed to run some of the tools in VC/bin but is not
# shipped in that directory. Copy it from the common dir.
cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
$DEVKIT_ROOT/VC/bin/
fi
################################################################################
# Copy SDK files
PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
echo "Copying SDK..."
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
# In 2015, the new Universal CRT is delivered in the sdk 10 directory
# so need to include that as well.
mkdir -p $DEVKIT_ROOT/10/lib
cp -r "$SDK_INSTALL_DIR/../10/lib/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/lib/
mkdir -p $DEVKIT_ROOT/10/include
cp -r "$SDK_INSTALL_DIR/../10/include/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/include/
fi
################################################################################
# Generate devkit.info
echo-info() {
echo "$1" >> $DEVKIT_ROOT/devkit.info
}
echo "Generating devkit.info..."
rm -f $DEVKIT_ROOT/devkit.info
echo-info "# This file describes to configure how to interpret the contents of this devkit"
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86;\$DEVKIT_ROOT/10/lib/ucrt/x86\""
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64;\$DEVKIT_ROOT/10/lib/ucrt/x64\""
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
################################################################################
# Copy this script
echo "Copying this script..."
cp $0 $DEVKIT_ROOT/
################################################################################
# Create bundle
echo "Creating bundle: $DEVKIT_BUNDLE"
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)

View File

@ -0,0 +1,172 @@
#!/bin/bash
#
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This script copies parts of a Visual Studio installation into a devkit
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
# erik.joelsson@oracle.com
VS_VERSION="2017"
VS_VERSION_NUM_NODOT="150"
VS_DLL_VERSION="140"
SDK_VERSION="10"
SDK_FULL_VERSION="10.0.16299.0"
MSVC_DIR="Microsoft.VC141.CRT"
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
################################################################################
# Prepare settings
# Work around the insanely named ProgramFiles(x86) env variable
PROGRAMFILES_X86="$(cygpath "$(env | sed -n 's/^ProgramFiles(x86)=//p')")"
# Find Visual Studio installation dir
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
if [ -d "$VSNNNCOMNTOOLS" ]; then
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
else
VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2017"
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional} 2>/dev/null | head -n1)"
VS_INSTALL_DIR="$(cygpath "$VS_INSTALL_DIR")"
fi
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
# Extract semantic version
POTENTIAL_INI_FILES="Common7\IDE\wdexpress.isolation.ini Common7\IDE\devenv.isolation.ini"
for f in $POTENTIAL_INI_FILES; do
if [ -f "$VS_INSTALL_DIR/$f" ]; then
VS_VERSION_SP="$(grep ^SemanticVersion= "$VS_INSTALL_DIR/$f")"
# Remove SemnaticVersion=
VS_VERSION_SP="${VS_VERSION_SP#*=}"
# Remove suffix of too detailed numbering starting with +
VS_VERSION_SP="${VS_VERSION_SP%+*}"
break
fi
done
if [ -z "$VS_VERSION_SP" ]; then
echo "Failed to find SP version"
exit 1
fi
echo "Found Version SP: $VS_VERSION_SP"
# Setup output dirs
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
echo "Creating devkit in $DEVKIT_ROOT"
MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
################################################################################
# Copy Visual Studio files
if [ ! -d $DEVKIT_ROOT/VC ]; then
VC_SUBDIR="VC/Tools/MSVC/14.12.25827"
REDIST_SUBDIR="VC/Redist/MSVC/14.12.25810"
echo "Copying VC..."
mkdir -p $DEVKIT_ROOT/VC/bin
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
mkdir -p $DEVKIT_ROOT/VC/lib
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
mkdir -p $DEVKIT_ROOT/VC/Auxiliary
cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
mkdir -p $DEVKIT_ROOT/VC/redist
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
# The redist runtime libs are needed to run the compiler but may not be
# installed on the machine where the devkit will be used.
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
fi
################################################################################
# Copy SDK files
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
echo "Copying SDK..."
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
fi
################################################################################
# Generate devkit.info
echo-info() {
echo "$1" >> $DEVKIT_ROOT/devkit.info
}
echo "Generating devkit.info..."
rm -f $DEVKIT_ROOT/devkit.info
echo-info "# This file describes to configure how to interpret the contents of this devkit"
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib/x86;\$DEVKIT_ROOT/VC/atlmfc/lib/x86;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
echo-info ""
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
################################################################################
# Copy this script
echo "Copying this script..."
cp $0 $DEVKIT_ROOT/
################################################################################
# Create bundle
echo "Creating bundle: $DEVKIT_BUNDLE"
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)

View File

@ -168,3 +168,7 @@ $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
$(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))

View File

@ -92,10 +92,10 @@ ifneq ($(COMPILE_TYPE), cross)
endif
SIZER_CFLAGS := \
-I${TOPDIR}/src/hotspot/share/include \
-I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
-I$(TOPDIR)/src/java.base/share/native/include \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
-I$(TOPDIR)/src/hotspot/share/include \
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I$(TOPDIR)/src/java.base/share/native/libjava \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \

View File

@ -59,8 +59,8 @@ JVM_CFLAGS_INCLUDES += \
-I$(TOPDIR)/src/hotspot/share/precompiled \
-I$(TOPDIR)/src/hotspot/share/include \
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
-I$(TOPDIR)/src/java.base/share/native/include \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I$(TOPDIR)/src/java.base/share/native/libjimage \
#

View File

@ -20,16 +20,9 @@ else #with SPEC
SEL_MODULES := $(MODULES)
endif
# Find all source dirs for a particular module
# $1 - Module to find source dirs for
FindIdeaModuleSrcDirs = \
$(strip $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
$(wildcard $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
idea:
$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindIdeaModuleSrcDirs,$(mod)))\"" >> $(OUT)
$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs,$(mod)))\"" >> $(OUT)
$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)

View File

@ -3,7 +3,6 @@
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
<properties>
<property name="boot.java.home" value="$JDKPath$" />
<property name="intellij.ismake" value="$IsMake$" />
<property name="build.target.dir" value="specDir" /> <!-- this will be replaced -->
<property name="module.name" value="java.base" /> <!-- this will be replaced -->

View File

@ -6,32 +6,16 @@
new JdkLogger(project)
</script>
<!-- java.marker is set to a marker file to check for within a Java install dir.
The best file to check for across Solaris/Linux/Windows/MacOS is one of the
executables; regrettably, that is OS-specific. -->
<condition property="java.marker" value="bin/java">
<os family="unix"/>
</condition>
<condition property="java.marker" value="bin/java.exe">
<os family="windows"/>
</condition>
<target name="-check-jtreg.home" depends="-def-check">
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
</target>
<property name="test.dir" value="${basedir}/jdk/test"/>
<macrodef name="call-make">
<attribute name="dir"/>
<attribute name="args"/>
<sequential>
<exec executable="make" dir="@{dir}" failonerror="true">
<arg line="@{args}"/>
<env key="CLASSPATH" value = ""/>
</exec>
</sequential>
</macrodef>
<attribute name="dir"/>
<attribute name="args"/>
<sequential>
<exec executable="make" dir="@{dir}" failonerror="true">
<arg line="@{args}"/>
<env key="CLASSPATH" value = ""/>
</exec>
</sequential>
</macrodef>
<target name="cond-clean" unless="${intellij.ismake}">
<antcall target="clean"/>
@ -43,71 +27,17 @@
**** Global JDK Build Targets
-->
<target name="clean" depends="-do-configure">
<target name="clean">
<echo message="base = ${basedir}"/>
<call-make dir = "${build.target.dir}" args = "reconfigure"/>
<call-make dir = "${build.target.dir}" args = "clean"/>
</target>
<target name="-do-configure">
<echo message="base = ${basedir}"/>
<fail message="Not part of a full JDK forest">
<condition>
<not>
<available file="${basedir}/configure" />
</not>
</condition>
</fail>
<exec executable="sh" dir="${basedir}" failonerror="true">
<arg line="configure --with-boot-jdk=${boot.java.home}"/>
</exec>
</target>
<target name="images">
<call-make dir = "${build.target.dir}" args = "images"/>
</target>
<target name="jimages">
<call-make dir = "${build.target.dir}" args = "jimages"/>
</target>
<target name="check-env">
<exec executable="env" dir="${basedir}"/>
</target>
<target name="build-module">
<call-make dir = "${build.target.dir}" args = "${module.name}"/>
</target>
<target name="-check-boot.java.home" depends="-def-check">
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
</target>
<target name="-def-check">
<macrodef name="check">
<attribute name="name"/>
<attribute name="property"/>
<attribute name="marker" default=""/>
<sequential>
<fail message="Cannot locate @{name}: please set @{property} to its location">
<condition>
<not>
<isset property="@{property}"/>
</not>
</condition>
</fail>
<fail message="@{name} is not installed in ${@{property}}">
<condition>
<and>
<not>
<equals arg1="@{marker}" arg2=""/>
</not>
<not>
<available file="${@{property}}/@{marker}"/>
</not>
</and>
</condition>
</fail>
</sequential>
</macrodef>
</target>
</project>

View File

@ -4,11 +4,9 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/####" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/src" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/make" />
</content>
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
</component>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,8 +30,8 @@ import java.io.*;
class AbstractCommandNode extends AbstractNamedNode {
void document(PrintWriter writer) {
writer.println("<h5><a name=\"" + context.whereC + "\">" + name +
" Command</a> (" + nameNode.value() + ")</h5>");
writer.println("<h5 id=\"" + context.whereC + "\">" + name +
" Command (" + nameNode.value() + ")</h5>");
writer.println(comment());
writer.println("<dl>");
for (Node node : components) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -62,8 +62,8 @@ abstract class AbstractNamedNode extends Node {
}
void document(PrintWriter writer) {
writer.println("<h4><a name=" + name + ">" + name +
" Command Set</a></h4>");
writer.println("<h4 id=\"" + name + "\">" + name +
" Command Set</h4>");
for (Node node : components) {
node.document(writer);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,11 +43,11 @@ abstract class AbstractTypeListNode extends AbstractNamedNode {
if (components.isEmpty()) {
writer.println("<dd>(None)");
} else {
writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\"><tr>");
writer.println("<dd><table><tr>");
for (int i = maxStructIndent; i > 0; --i) {
writer.print("<th width=\"4%\">");
writer.print("<th style=\"width: 4%\">");
}
writer.println("<th width=\"15%\"><th width=\"65%\">");
writer.println("<th style=\"width: 15%\"><th style=\"width: 65%\">");
writer.println("");
for (Node node : components) {
node.document(writer);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,8 +38,8 @@ class CommandSetNode extends AbstractNamedNode {
}
void document(PrintWriter writer) {
writer.println("<h4><a name=\"" + context.whereC + "\">" + name +
" Command Set</a> (" +
writer.println("<h4 id=\"" + context.whereC + "\">" + name +
" Command Set (" +
nameNode.value() + ")</h4>");
writer.println(comment());
for (Node node : components) {
@ -51,11 +51,13 @@ class CommandSetNode extends AbstractNamedNode {
writer.print("<li><a href=\"#" + context.whereC + "\">");
writer.println(name() + "</a> Command Set (" +
nameNode.value() + ")");
writer.println("<ul>");
for (Node node : components) {
node.documentIndex(writer);
if (components.size() > 0) {
writer.println("<ul>");
for (Node node : components) {
node.documentIndex(writer);
}
writer.println("</ul>");
}
writer.println("</ul>");
}
void genJavaClassSpecifics(PrintWriter writer, int depth) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -54,15 +54,15 @@ class ConstantSetNode extends AbstractNamedNode {
}
void document(PrintWriter writer) {
writer.println("<h4><a name=\"" + context.whereC + "\">" + name +
" Constants</a></h4>");
writer.println("<h4 id=\"" + context.whereC + "\">" + name +
" Constants</h4>");
writer.println(comment());
writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\"><tr>");
writer.println("<th width=\"20%\"><th width=\"5%\"><th width=\"65%\">");
writer.println("<table><tr>");
writer.println("<th style=\"width: 20%\"><th style=\"width: 5%\"><th style=\"width: 65%\">");
ConstantNode n;
for (Node node : components) {
n = (ConstantNode)node;
writer.println("<a NAME=\"" + name + "_" + n.name + "\"></a>");
writer.println("<span id=\"" + name + "_" + n.name + "\"></span>");
n.document(writer);
}
writer.println("</table>");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,7 @@ class ErrorSetNode extends AbstractSimpleNode {
if (components.isEmpty()) {
writer.println("<dd>(None)");
} else {
writer.println("<dd><table border=1 cellpadding=3 cellspacing=0 width=\"90%\" summary=\"\">");
writer.println("<dd><table>");
for (Node node : components) {
node.document(writer);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,11 +41,22 @@ class RootNode extends AbstractNamedNode {
void document(PrintWriter writer) {
writer.println("<!DOCTYPE html>");
writer.println("<html><head><title>" + comment() + "</title></head>");
writer.println("<body bgcolor=\"white\">");
writer.println("<html lang=\"en\">");
writer.println("<head>");
writer.println("<meta charset=\"utf-8\"/>");
writer.println("<title>" + comment() + "</title>");
writer.println("<style>");
writer.println("body {background-color:white;}");
writer.println("table {border: 1px solid grey; border-spacing:0px; border-collapse: separate; width: 90%;}");
writer.println("td, th {padding: 3px; border: 1px solid black;}");
writer.println("</style>");
writer.println("</head>");
writer.println("<body>");
writer.println("<ul>");
for (Node node : components) {
node.documentIndex(writer);
}
writer.println("</ul>");
for (Node node : components) {
node.document(writer);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -64,7 +64,7 @@ public class ModuleGraph implements Taglet {
}
String moduleName = ((ModuleElement) element).getQualifiedName().toString();
String imageFile = moduleName + "-graph.png";
String imageFile = moduleName + "/module-graph.png";
int thumbnailHeight = -1;
String hoverImage = "";
if (!moduleName.equals("java.base")) {

View File

@ -82,7 +82,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
DISABLED_WARNINGS_gcc := unused-result, \
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \

View File

@ -358,7 +358,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
unused-result maybe-uninitialized format \
format-security int-to-pointer-cast parentheses, \
format-security int-to-pointer-cast parentheses \
implicit-fallthrough, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
@ -491,7 +492,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
DISABLED_WARNINGS_gcc := clobbered, \
DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -669,7 +670,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
CFLAGS_windows = -DCC_NOEX, \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
type-limits missing-field-initializers, \
type-limits missing-field-initializers implicit-fallthrough, \
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
maybe-uninitialized, \
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
@ -905,9 +906,18 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
LIBSPLASHSCREEN_LIBS :=
ifneq ($(USE_EXTERNAL_LIBZ), true)
ifeq ($(USE_EXTERNAL_LIBZ), false)
LIBSPLASHSCREEN_DIRS += $(TOPDIR)/src/java.base/share/native/libzip/zlib
LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS)
else
ifeq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(USE_EXTERNAL_LIBPNG), false)
# When building our own libpng and using an external libz, we need to
# inject our own libz.h to tweak the exported ZLIB_VERNUM macro. See
# $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng/zlib.h
# for details.
LIBSPLASHSCREEN_CFLAGS += -iquote $(TOPDIR)/src/java.desktop/macosx/native/libsplashscreen/libpng
endif
endif
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
@ -933,8 +943,9 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized shift-negative-value, \
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
maybe-uninitialized shift-negative-value implicit-fallthrough, \
DISABLED_WARNINGS_clang := incompatible-pointer-types, \
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
E_STATEMENT_NOT_REACHED, \
@ -942,8 +953,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
MAPFILE := $(TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ) \
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
LIBS_aix := -liconv, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \

View File

@ -67,7 +67,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS_linux_ppc64le := -ffp-contract=off, \
CFLAGS_linux_s390x := -ffp-contract=off, \
CFLAGS_linux_aarch64 := -ffp-contract=off, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
@ -82,7 +82,7 @@ else
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
SRC := $(LIBFDLIBM_SRC), \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
LDFLAGS := -nostdlib -r -arch x86_64, \
LDFLAGS := -nostdlib $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
))
@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
DISABLED_WARNINGS_microsoft := 4244 4267, \
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -224,11 +225,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
SRC := $(TOPDIR)/src/java.base/share/native/libzip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(ZLIB_CPPFLAGS) \
$(LIBZ_CFLAGS) \
-I$(TOPDIR)/src/java.base/share/native/libjava \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@ -236,7 +238,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
-export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \
LIBS_unix := -ljvm -ljava $(LIBZ), \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
LIBS_solaris := -lc, \
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
@ -270,6 +272,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
CFLAGS_unix := -UDEBUG, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
@ -341,8 +344,9 @@ endif
LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS))
LIBJLI_CFLAGS += $(LIBZ_CFLAGS)
ifneq ($(USE_EXTERNAL_LIBZ), true)
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
LIBJLI_EXTRA_FILES += \
$(addprefix $(TOPDIR)/src/java.base/share/native/libzip/zlib/, \
inflate.c \
@ -362,6 +366,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
OPTIMIZATION := HIGH, \
CFLAGS := $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := maybe-uninitialized, \
DISABLED_WARNINGS_solstudio := \
E_ASM_DISABLES_OPTIMIZATION \
E_STATEMENT_NOT_REACHED, \
@ -390,7 +395,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
-export:JLI_PreprocessArg \
-export:JLI_AddArgsFromEnvVar \
-export:JLI_GetAppArgIndex, \
LIBS_unix := $(LIBZ), \
LIBS_unix := $(LIBZ_LIBS), \
LIBS_linux := $(LIBDL) -lc -lpthread, \
LIBS_solaris := $(LIBDL) -lc, \
LIBS_aix := $(LIBDL),\
@ -437,7 +442,7 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
LDFLAGS := -nostdlib -r, \
LDFLAGS := -nostdlib $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \
))

View File

@ -68,7 +68,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LDFLAGS_macosx := -Wl$(COMMA)-all_load, \
LDFLAGS_aix := -L$(SUPPORT_OUTPUTDIR)/native/java.base, \
LIBS := $(JDKLIB_LIBS), \
LIBS_unix := -ljava -ljvm $(LIBZ), \
LIBS_unix := -ljava -ljvm $(LIBZ_LIBS), \
LIBS_linux := -ljli $(LIBDL), \
LIBS_solaris := -ljli $(LIBDL), \
LIBS_aix := -liconv -ljli_static $(LIBDL), \

View File

@ -70,3 +70,7 @@ $(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBMANAGEMENT)
################################################################################
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, lib/Lib-java.management-post.gmk))

View File

@ -54,7 +54,7 @@ ifeq ($(ENABLE_INTREE_EC), true)
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \

View File

@ -43,6 +43,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
$(LIBDT_SOCKET_CPPFLAGS), \
DISABLED_WARNINGS_gcc := shift-negative-value, \
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@ -80,3 +80,7 @@ $(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBMANAGEMENT_EXT)
################################################################################
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, lib/Lib-jdk.management-post.gmk))

View File

@ -40,6 +40,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@ -68,12 +68,3 @@ LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, jav
INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE))
################################################################################
# Define it here since there are multiple uses.
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
else
ZLIB_CPPFLAGS := -I$(TOPDIR)/src/java.base/share/native/libzip/zlib
endif
###############################################################################

View File

@ -258,7 +258,6 @@ SUNWprivate_1.1 {
Java_jdk_internal_reflect_NativeConstructorAccessorImpl_newInstance0;
Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0;
Java_jdk_internal_reflect_Reflection_getCallerClass__;
Java_jdk_internal_reflect_Reflection_getCallerClass__I;
Java_jdk_internal_reflect_Reflection_getClassAccessFlags;
Java_jdk_internal_misc_VM_latestUserDefinedLoader0;
Java_jdk_internal_misc_VM_getuid;

View File

@ -27,7 +27,6 @@ text: .text%Java_java_io_FileDescriptor_initIDs;
text: .text%Java_java_io_FileOutputStream_initIDs;
text: .text%Java_java_lang_System_setIn0;
text: .text%Java_sun_reflect_Reflection_getCallerClass__;
text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
text: .text%Java_java_lang_Class_forName0;
text: .text%Java_java_lang_Object_getClass;
text: .text%Java_sun_reflect_Reflection_getClassAccessFlags;

View File

@ -26,7 +26,6 @@ text: .text%Java_java_io_FileDescriptor_initIDs;
text: .text%Java_java_io_FileOutputStream_initIDs;
text: .text%Java_java_lang_System_setIn0;
text: .text%Java_sun_reflect_Reflection_getCallerClass__;
text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
text: .text%Java_java_lang_Class_forName0;
text: .text%Java_java_lang_String_intern;
text: .text%Java_java_lang_StringUTF16_isBigEndian;

View File

@ -27,7 +27,6 @@ text: .text%Java_java_io_FileDescriptor_initIDs;
text: .text%Java_java_io_FileOutputStream_initIDs;
text: .text%Java_java_lang_System_setIn0;
text: .text%Java_sun_reflect_Reflection_getCallerClass__;
text: .text%Java_sun_reflect_Reflection_getCallerClass__I;
text: .text%Java_java_lang_Class_forName0;
text: .text%Java_java_lang_String_intern;
text: .text%Java_java_lang_StringUTF16_isBigEndian;

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -89,6 +89,7 @@ SUNWprivate_1.1 {
Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
Java_java_net_AbstractPlainSocketImpl_isReusePortAvailable0;
Java_java_net_AbstractPlainDatagramSocketImpl_isReusePortAvailable0;
Java_java_net_SocketCleanable_cleanupClose0;
Java_jdk_net_Sockets_isReusePortAvailable0;
Java_sun_net_PortConfig_getUpper0;
Java_sun_net_PortConfig_getLower0;

View File

@ -44,6 +44,7 @@ $(eval $(call IncludeCustomExtension, test/JtregNativeHotspot.gmk))
# Add more directories here when needed.
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/gc/g1/TestJNIWeakG1 \
$(TOPDIR)/test/hotspot/jtreg/gc/stress/TestJNIBlockFullGC \
$(TOPDIR)/test/hotspot/jtreg/gc/stress/gclocker \
$(TOPDIR)/test/hotspot/jtreg/gc/cslocker \
$(TOPDIR)/test/hotspot/jtreg/native_sanity \

View File

@ -5844,8 +5844,8 @@ operand immPollPage()
operand immByteMapBase()
%{
// Get base of card map
predicate((jbyte*)n->get_ptr() ==
((CardTableModRefBS*)(Universe::heap()->barrier_set()))->byte_map_base);
predicate(Universe::heap()->barrier_set()->is_a(BarrierSet::CardTableModRef) &&
(jbyte*)n->get_ptr() == ((CardTableModRefBS*)(Universe::heap()->barrier_set()))->byte_map_base);
match(ConP);
op_cost(0);

View File

@ -848,7 +848,7 @@ public:
// architecture. In debug mode we shrink it in order to test
// trampolines, but not so small that branches in the interpreter
// are out of range.
static const unsigned long branch_range = INCLUDE_JVMCI ? 128 * M : NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
static const unsigned long branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
static bool reachable_from_branch_at(address branch, address target) {
return uabs(target - branch) < branch_range;
@ -2295,23 +2295,32 @@ public:
rf(Vn, 5), rf(Rd, 0);
}
#define INSN(NAME, opc, opc2) \
#define INSN(NAME, opc, opc2, isSHR) \
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, int shift){ \
starti; \
/* The encodings for the immh:immb fields (bits 22:16) are \
* 0001 xxx 8B/16B, shift = xxx \
* 001x xxx 4H/8H, shift = xxxx \
* 01xx xxx 2S/4S, shift = xxxxx \
* 1xxx xxx 1D/2D, shift = xxxxxx (1D is RESERVED) \
/* The encodings for the immh:immb fields (bits 22:16) in *SHR are \
* 0001 xxx 8B/16B, shift = 16 - UInt(immh:immb) \
* 001x xxx 4H/8H, shift = 32 - UInt(immh:immb) \
* 01xx xxx 2S/4S, shift = 64 - UInt(immh:immb) \
* 1xxx xxx 1D/2D, shift = 128 - UInt(immh:immb) \
* (1D is RESERVED) \
* for SHL shift is calculated as: \
* 0001 xxx 8B/16B, shift = UInt(immh:immb) - 8 \
* 001x xxx 4H/8H, shift = UInt(immh:immb) - 16 \
* 01xx xxx 2S/4S, shift = UInt(immh:immb) - 32 \
* 1xxx xxx 1D/2D, shift = UInt(immh:immb) - 64 \
* (1D is RESERVED) \
*/ \
assert((1 << ((T>>1)+3)) > shift, "Invalid Shift value"); \
int cVal = (1 << (((T >> 1) + 3) + (isSHR ? 1 : 0))); \
int encodedShift = isSHR ? cVal - shift : cVal + shift; \
f(0, 31), f(T & 1, 30), f(opc, 29), f(0b011110, 28, 23), \
f((1 << ((T>>1)+3))|shift, 22, 16); f(opc2, 15, 10), rf(Vn, 5), rf(Vd, 0); \
f(encodedShift, 22, 16); f(opc2, 15, 10), rf(Vn, 5), rf(Vd, 0); \
}
INSN(shl, 0, 0b010101);
INSN(sshr, 0, 0b000001);
INSN(ushr, 1, 0b000001);
INSN(shl, 0, 0b010101, /* isSHR = */ false);
INSN(sshr, 0, 0b000001, /* isSHR = */ true);
INSN(ushr, 1, 0b000001, /* isSHR = */ true);
#undef INSN

View File

@ -71,6 +71,13 @@ int CompiledStaticCall::to_interp_stub_size() {
return 7 * NativeInstruction::instruction_size;
}
int CompiledStaticCall::to_trampoline_stub_size() {
// Somewhat pessimistically, we count 3 instructions here (although
// there are only two) because we sometimes emit an alignment nop.
// Trampoline stubs are always word aligned.
return 3 * NativeInstruction::instruction_size + wordSize;
}
// Relocation entries for call stub, compiled java to interpreter.
int CompiledStaticCall::reloc_to_interp_stub() {
return 4; // 3 in emit_to_interp_stub + 1 in emit_call

View File

@ -109,7 +109,7 @@ void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong forei
TRACE_jvmci_3("relocating (foreign call) at " PTR_FORMAT, p2i(inst));
}
void CodeInstaller::pd_relocate_JavaMethod(Handle hotspot_method, jint pc_offset, TRAPS) {
void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, Handle hotspot_method, jint pc_offset, TRAPS) {
#ifdef ASSERT
Method* method = NULL;
// we need to check, this might also be an unresolved method
@ -124,22 +124,22 @@ void CodeInstaller::pd_relocate_JavaMethod(Handle hotspot_method, jint pc_offset
case INVOKEINTERFACE: {
assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_virtual_call_stub());
_instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc));
call->trampoline_jump(cbuf, SharedRuntime::get_resolve_virtual_call_stub());
break;
}
case INVOKESTATIC: {
assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_static_call_stub());
_instructions->relocate(call->instruction_address(), relocInfo::static_call_type);
call->trampoline_jump(cbuf, SharedRuntime::get_resolve_static_call_stub());
break;
}
case INVOKESPECIAL: {
assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_opt_virtual_call_stub());
_instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type);
call->trampoline_jump(cbuf, SharedRuntime::get_resolve_opt_virtual_call_stub());
break;
}
default:

View File

@ -801,7 +801,7 @@ address MacroAssembler::emit_trampoline_stub(int insts_call_instruction_offset,
assert(is_NativeCallTrampolineStub_at(stub_start_addr), "doesn't look like a trampoline");
end_a_stub();
return stub;
return stub_start_addr;
}
address MacroAssembler::ic_call(address entry, jint method_index) {

View File

@ -367,3 +367,24 @@ void NativeCallTrampolineStub::set_destination(address new_destination) {
set_ptr_at(data_offset, new_destination);
OrderAccess::release();
}
// Generate a trampoline for a branch to dest. If there's no need for a
// trampoline, simply patch the call directly to dest.
address NativeCall::trampoline_jump(CodeBuffer &cbuf, address dest) {
MacroAssembler a(&cbuf);
address stub = NULL;
if (a.far_branches()
&& ! is_NativeCallTrampolineStub_at(instruction_address() + displacement())) {
stub = a.emit_trampoline_stub(instruction_address() - cbuf.insts()->start(), dest);
}
if (stub == NULL) {
// If we generated no stub, patch this call directly to dest.
// This will happen if we don't need far branches or if there
// already was a trampoline.
set_destination(dest);
}
return stub;
}

View File

@ -61,7 +61,7 @@ class NativeInstruction VALUE_OBJ_CLASS_SPEC {
return uint_at(0);
}
bool is_blr() const { return (encoding() & 0xfffffc1f) == 0xd63f0000; }
bool is_blr() const { return (encoding() & 0xff9ffc1f) == 0xd61f0000; } // blr(register) or br(register)
bool is_adr_aligned() const { return (encoding() & 0xff000000) == 0x10000000; } // adr Xn, <label>, where label is aligned to 4 bytes (address of instruction).
inline bool is_nop();
@ -143,8 +143,9 @@ inline NativeInstruction* nativeInstruction_at(uint32_t *address) {
}
inline NativeCall* nativeCall_at(address address);
// The NativeCall is an abstraction for accessing/manipulating native call imm32/rel32off
// instructions (used to manipulate inline caches, primitive & dll calls, etc.).
// The NativeCall is an abstraction for accessing/manipulating native
// call instructions (used to manipulate inline caches, primitive &
// DSO calls, etc.).
class NativeCall: public NativeInstruction {
public:
@ -155,7 +156,6 @@ class NativeCall: public NativeInstruction {
return_address_offset = 4
};
enum { cache_line_size = BytesPerWord }; // conservative estimate!
address instruction_address() const { return addr_at(instruction_offset); }
address next_instruction_address() const { return addr_at(return_address_offset); }
int displacement() const { return (int_at(displacement_offset) << 6) >> 4; }
@ -206,6 +206,7 @@ class NativeCall: public NativeInstruction {
void set_destination_mt_safe(address dest, bool assert_lock = true);
address get_trampoline();
address trampoline_jump(CodeBuffer &cbuf, address dest);
};
inline NativeCall* nativeCall_at(address address) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -35,4 +35,10 @@
format_width = 0
};
public:
// This platform has no oops in the code that are not also
// listed in the oop section.
static bool mustIterateImmediateOopsInCode() { return false; }
#endif // CPU_AARCH64_VM_RELOCINFO_AARCH64_HPP

View File

@ -3421,7 +3421,6 @@ void TemplateTable::_new() {
Label done;
Label initialize_header;
Label initialize_object; // including clearing the fields
Label allocate_shared;
__ get_cpool_and_tags(r4, r0);
// Make sure the class we're about to instantiate has been resolved.
@ -3450,18 +3449,24 @@ void TemplateTable::_new() {
// test to see if it has a finalizer or is malformed in some way
__ tbnz(r3, exact_log2(Klass::_lh_instance_slow_path_bit), slow_case);
// Allocate the instance
// 1) Try to allocate in the TLAB
// 2) if fail and the object is large allocate in the shared Eden
// 3) if the above fails (or is not applicable), go to a slow case
// (creates a new TLAB, etc.)
// Allocate the instance:
// If TLAB is enabled:
// Try to allocate in the TLAB.
// If fails, go to the slow path.
// Else If inline contiguous allocations are enabled:
// Try to allocate in eden.
// If fails due to heap end, go to slow path.
//
// If TLAB is enabled OR inline contiguous is enabled:
// Initialize the allocation.
// Exit.
//
// Go to slow path.
const bool allow_shared_alloc =
Universe::heap()->supports_inline_contig_alloc();
if (UseTLAB) {
__ tlab_allocate(r0, r3, 0, noreg, r1,
allow_shared_alloc ? allocate_shared : slow_case);
__ tlab_allocate(r0, r3, 0, noreg, r1, slow_case);
if (ZeroTLAB) {
// the fields have been already cleared
@ -3470,19 +3475,19 @@ void TemplateTable::_new() {
// initialize both the header and fields
__ b(initialize_object);
}
} else {
// Allocation in the shared Eden, if allowed.
//
// r3: instance size in bytes
if (allow_shared_alloc) {
__ eden_allocate(r0, r3, 0, r10, slow_case);
__ incr_allocated_bytes(rthread, r3, 0, rscratch1);
}
}
// Allocation in the shared Eden, if allowed.
//
// r3: instance size in bytes
if (allow_shared_alloc) {
__ bind(allocate_shared);
__ eden_allocate(r0, r3, 0, r10, slow_case);
__ incr_allocated_bytes(rthread, r3, 0, rscratch1);
}
if (UseTLAB || Universe::heap()->supports_inline_contig_alloc()) {
// If UseTLAB or allow_shared_alloc are true, the object is created above and
// there is an initialize need. Otherwise, skip and go to the slow path.
if (UseTLAB || allow_shared_alloc) {
// The object is initialized before the header. If the object size is
// zero, go directly to the header initialization.
__ bind(initialize_object);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,4 +32,10 @@
format_width = 0
};
public:
// This platform has no oops in the code that are not also
// listed in the oop section.
static bool mustIterateImmediateOopsInCode() { return false; }
#endif // CPU_ARM_VM_RELOCINFO_ARM_HPP

View File

@ -4335,7 +4335,6 @@ void TemplateTable::_new() {
Label done;
Label initialize_header;
Label initialize_object; // including clearing the fields
Label allocate_shared;
const bool allow_shared_alloc =
Universe::heap()->supports_inline_contig_alloc();
@ -4380,13 +4379,19 @@ void TemplateTable::_new() {
// Klass::_lh_instance_slow_path_bit is really a bit mask, not bit number
__ tbnz(Rsize, exact_log2(Klass::_lh_instance_slow_path_bit), slow_case);
// Allocate the instance:
// If TLAB is enabled:
// Try to allocate in the TLAB.
// If fails, go to the slow path.
// Else If inline contiguous allocations are enabled:
// Try to allocate in eden.
// If fails due to heap end, go to slow path.
//
// Allocate the instance
// 1) Try to allocate in the TLAB
// 2) if fail and the object is large allocate in the shared Eden
// 3) if the above fails (or is not applicable), go to a slow case
// (creates a new TLAB, etc.)
// If TLAB is enabled OR inline contiguous is enabled:
// Initialize the allocation.
// Exit.
//
// Go to slow path.
if (UseTLAB) {
const Register Rtlab_top = R1_tmp;
const Register Rtlab_end = R2_tmp;
@ -4396,7 +4401,7 @@ void TemplateTable::_new() {
__ ldr(Rtlab_end, Address(Rthread, in_bytes(JavaThread::tlab_end_offset())));
__ add(Rtlab_top, Robj, Rsize);
__ cmp(Rtlab_top, Rtlab_end);
__ b(allow_shared_alloc ? allocate_shared : slow_case, hi);
__ b(slow_case, hi);
__ str(Rtlab_top, Address(Rthread, JavaThread::tlab_top_offset()));
if (ZeroTLAB) {
// the fields have been already cleared
@ -4405,45 +4410,43 @@ void TemplateTable::_new() {
// initialize both the header and fields
__ b(initialize_object);
}
}
} else {
// Allocation in the shared Eden, if allowed.
if (allow_shared_alloc) {
const Register Rheap_top_addr = R2_tmp;
const Register Rheap_top = R5_tmp;
const Register Rheap_end = Rtemp;
assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
// Allocation in the shared Eden, if allowed.
if (allow_shared_alloc) {
__ bind(allocate_shared);
// heap_end now (re)loaded in the loop since also used as a scratch register in the CAS
__ ldr_literal(Rheap_top_addr, Lheap_top_addr);
const Register Rheap_top_addr = R2_tmp;
const Register Rheap_top = R5_tmp;
const Register Rheap_end = Rtemp;
assert_different_registers(Robj, Rklass, Rsize, Rheap_top_addr, Rheap_top, Rheap_end, LR);
// heap_end now (re)loaded in the loop since also used as a scratch register in the CAS
__ ldr_literal(Rheap_top_addr, Lheap_top_addr);
Label retry;
__ bind(retry);
Label retry;
__ bind(retry);
#ifdef AARCH64
__ ldxr(Robj, Rheap_top_addr);
__ ldxr(Robj, Rheap_top_addr);
#else
__ ldr(Robj, Address(Rheap_top_addr));
__ ldr(Robj, Address(Rheap_top_addr));
#endif // AARCH64
__ ldr(Rheap_end, Address(Rheap_top_addr, (intptr_t)Universe::heap()->end_addr()-(intptr_t)Universe::heap()->top_addr()));
__ add(Rheap_top, Robj, Rsize);
__ cmp(Rheap_top, Rheap_end);
__ b(slow_case, hi);
__ ldr(Rheap_end, Address(Rheap_top_addr, (intptr_t)Universe::heap()->end_addr()-(intptr_t)Universe::heap()->top_addr()));
__ add(Rheap_top, Robj, Rsize);
__ cmp(Rheap_top, Rheap_end);
__ b(slow_case, hi);
// Update heap top atomically.
// If someone beats us on the allocation, try again, otherwise continue.
// Update heap top atomically.
// If someone beats us on the allocation, try again, otherwise continue.
#ifdef AARCH64
__ stxr(Rtemp2, Rheap_top, Rheap_top_addr);
__ cbnz_w(Rtemp2, retry);
__ stxr(Rtemp2, Rheap_top, Rheap_top_addr);
__ cbnz_w(Rtemp2, retry);
#else
__ atomic_cas_bool(Robj, Rheap_top, Rheap_top_addr, 0, Rheap_end/*scratched*/);
__ b(retry, ne);
__ atomic_cas_bool(Robj, Rheap_top, Rheap_top_addr, 0, Rheap_end/*scratched*/);
__ b(retry, ne);
#endif // AARCH64
__ incr_allocated_bytes(Rsize, Rtemp);
__ incr_allocated_bytes(Rsize, Rtemp);
}
}
if (UseTLAB || allow_shared_alloc) {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,8 +34,8 @@
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/os.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/align.hpp"

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,36 +33,36 @@
// (see c1_globals.hpp)
#ifndef TIERED
define_pd_global(bool, BackgroundCompilation, true );
define_pd_global(bool, CICompileOSR, true );
define_pd_global(bool, InlineIntrinsics, true );
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true );
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 1000 );
define_pd_global(bool, BackgroundCompilation, true);
define_pd_global(bool, CICompileOSR, true);
define_pd_global(bool, InlineIntrinsics, true);
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true);
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 1000);
define_pd_global(intx, OnStackReplacePercentage, 1400 );
define_pd_global(bool, UseTLAB, true );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(bool, ResizeTLAB, true );
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx,CodeCacheMinBlockLength, 1);
define_pd_global(uintx,MetaspaceSize, 12*M );
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(intx, NewSizeThreadIncrease, 16*K );
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, OnStackReplacePercentage, 1400);
define_pd_global(bool, UseTLAB, true);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(bool, ResizeTLAB, true);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, MetaspaceSize, 12*M);
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(size_t, NewSizeThreadIncrease, 16*K);
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
#endif // !TIERED
define_pd_global(bool, UseTypeProfile, false);
define_pd_global(bool, RoundFPResults, false);
define_pd_global(bool, UseTypeProfile, false);
define_pd_global(bool, RoundFPResults, false);
define_pd_global(bool, LIRFillDelaySlots, false);
define_pd_global(bool, OptimizeSinglePrecision, false);
define_pd_global(bool, CSEArrayLength, true );
define_pd_global(bool, TwoOperandLIRForm, false);
define_pd_global(bool, LIRFillDelaySlots, false);
define_pd_global(bool, OptimizeSinglePrecision, false);
define_pd_global(bool, CSEArrayLength, true);
define_pd_global(bool, TwoOperandLIRForm, false);
#endif // CPU_PPC_VM_C1_GLOBALS_PPC_HPP

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,7 @@ define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, true);
define_pd_global(bool, UseOnStackReplacement, true);
define_pd_global(bool, ProfileInterpreter, true);
define_pd_global(bool, TieredCompilation, true);
define_pd_global(bool, TieredCompilation, trueInTiered);
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, OnStackReplacePercentage, 140);
@ -78,27 +78,27 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, false);
// x.f = 0
// loc = x.f
// NullCheck loc
define_pd_global(bool, OptoScheduling, false);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(bool, OptoScheduling, false);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(intx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, ReservedCodeCacheSize, 256*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 125*M);
define_pd_global(intx, ProfiledCodeHeapSize, 126*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, ReservedCodeCacheSize, 256*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 125*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 126*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 4ULL*G);
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(uint64_t, MaxRAM, 128ULL*G);
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, TrapBasedRangeChecks, true);
define_pd_global(bool, TrapBasedRangeChecks, true);
// Heap related flags
define_pd_global(size_t, MetaspaceSize, ScaleForWordSize(16*M));
define_pd_global(size_t, MetaspaceSize, ScaleForWordSize(16*M));
// Ergonomics related flags
define_pd_global(bool, NeverActAsServerClassMachine, false);
define_pd_global(bool, NeverActAsServerClassMachine, false);
#endif // CPU_PPC_VM_C2_GLOBALS_PPC_HPP

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,11 +29,11 @@
#include "runtime/globals.hpp"
#include "utilities/debug.hpp"
// processor dependent initialization for ppc
// Processor dependent initialization of C2 compiler for ppc.
void Compile::pd_compiler2_init() {
// Power7 and later
// Power7 and later.
if (PowerArchitecturePPC64 > 6) {
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
FLAG_SET_ERGO(bool, UsePopCountInstruction, true);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,14 +86,14 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong);
define_pd_global(bool, ThreadLocalHandshakes, true);
// Platform dependent flag handling: flags only defined on this platform.
#define ARCH_FLAGS(develop, \
product, \
diagnostic, \
#define ARCH_FLAGS(develop, \
product, \
diagnostic, \
experimental, \
notproduct, \
range, \
constraint, \
writeable) \
notproduct, \
range, \
constraint, \
writeable) \
\
product(uintx, PowerArchitecturePPC64, 0, \
"CPU Version: x for PowerX. Currently recognizes Power5 to " \

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,6 @@
*/
#include "precompiled.hpp"
#include "assembler_ppc.inline.hpp"
#include "runtime/icache.hpp"
// Use inline assembler to implement icache flush.
@ -32,7 +31,7 @@ int ICache::ppc64_flush_icache(address start, int lines, int magic) {
address end = start + (unsigned int)lines*ICache::line_size;
assert(start <= end, "flush_icache parms");
// store modified cache lines from data cache
// Store modified cache lines from data cache.
for (address a = start; a < end; a += ICache::line_size) {
__asm__ __volatile__(
"dcbst 0, %0 \n"
@ -48,7 +47,7 @@ int ICache::ppc64_flush_icache(address start, int lines, int magic) {
:
: "memory");
// invalidate respective cache lines in instruction cache
// Invalidate respective cache lines in instruction cache.
for (address a = start; a < end; a += ICache::line_size) {
__asm__ __volatile__(
"icbi 0, %0 \n"
@ -57,7 +56,7 @@ int ICache::ppc64_flush_icache(address start, int lines, int magic) {
: "memory");
}
// discard fetched instructions
// Discard fetched instructions.
__asm__ __volatile__(
"isync \n"
:
@ -71,6 +70,8 @@ void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flu
*flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
// First call to flush itself
// First call to flush itself.
// Pointless since we call C, but it is expected to get
// executed during VM_Version::determine_features().
ICache::invalidate_range((address)(*flush_icache_stub), 0);
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,10 @@
#include "runtime/safepointMechanism.hpp"
#include "runtime/sharedRuntime.hpp"
// Implementation of InterpreterMacroAssembler.
// This file specializes the assembler with interpreter-specific macros.
#ifdef PRODUCT
#define BLOCK_COMMENT(str) // nothing
#else

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
*/
#include "precompiled.hpp"
#include "assembler_ppc.inline.hpp"
#include "asm/assembler.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm_misc.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -2883,10 +2883,6 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register
//assert(ObjectMonitor::recursions_size_in_bytes() == 8, "unexpected size");
asm_assert_mem8_is_zero(ObjectMonitor::recursions_offset_in_bytes(), temp,
"monitor->_recursions should be 0", -1);
// Invariant 2: OwnerIsThread shouldn't be 0.
//assert(ObjectMonitor::OwnerIsThread_size_in_bytes() == 4, "unexpected size");
//asm_assert_mem4_isnot_zero(ObjectMonitor::OwnerIsThread_offset_in_bytes(), temp,
// "monitor->OwnerIsThread shouldn't be 0", -1);
# endif
#if INCLUDE_RTM_OPT
@ -5604,12 +5600,17 @@ void MacroAssembler::zap_from_to(Register low, int before, Register high, int af
#endif // !PRODUCT
SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() {
void SkipIfEqualZero::skip_to_label_if_equal_zero(MacroAssembler* masm, Register temp,
const bool* flag_addr, Label& label) {
int simm16_offset = masm->load_const_optimized(temp, (address)flag_addr, R0, true);
assert(sizeof(bool) == 1, "PowerPC ABI");
masm->lbz(temp, simm16_offset, temp);
masm->cmpwi(CCR0, temp, 0);
masm->beq(CCR0, _label);
masm->beq(CCR0, label);
}
SkipIfEqualZero::SkipIfEqualZero(MacroAssembler* masm, Register temp, const bool* flag_addr) : _masm(masm), _label() {
skip_to_label_if_equal_zero(masm, temp, flag_addr, _label);
}
SkipIfEqualZero::~SkipIfEqualZero() {

View File

@ -980,6 +980,8 @@ class SkipIfEqualZero : public StackObj {
public:
// 'Temp' is a temp register that this object can use (and trash).
explicit SkipIfEqualZero(MacroAssembler*, Register temp, const bool* flag_addr);
static void skip_to_label_if_equal_zero(MacroAssembler*, Register temp,
const bool* flag_addr, Label& label);
~SkipIfEqualZero();
};

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,6 @@
#ifndef CPU_PPC_VM_NATIVEINST_PPC_HPP
#define CPU_PPC_VM_NATIVEINST_PPC_HPP
#include "asm/assembler.hpp"
#include "asm/macroAssembler.hpp"
#include "memory/allocation.hpp"
#include "runtime/icache.hpp"

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,4 +43,10 @@
#endif
};
public:
// This platform has no oops in the code that are not also
// listed in the oop section.
static bool mustIterateImmediateOopsInCode() { return false; }
#endif // CPU_PPC_VM_RELOCINFO_PPC_HPP

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,6 @@
#include "precompiled.hpp"
#ifdef COMPILER2
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/systemDictionary.hpp"
#include "code/vmreg.hpp"

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1912,8 +1912,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
// - *_slot_offset Indicates offset from SP in number of stack slots.
// - *_offset Indicates offset from SP in bytes.
int stack_slots = c_calling_convention(out_sig_bt, out_regs, out_regs2, total_c_args) // 1+2)
+ SharedRuntime::out_preserve_stack_slots(); // See c_calling_convention.
int stack_slots = c_calling_convention(out_sig_bt, out_regs, out_regs2, total_c_args) + // 1+2)
SharedRuntime::out_preserve_stack_slots(); // See c_calling_convention.
// Now the space for the inbound oop handle area.
int total_save_slots = num_java_iarg_registers * VMRegImpl::slots_per_word;
@ -2044,7 +2044,8 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
OopMap *oop_map = new OopMap(stack_slots * 2, 0 /* arg_slots*/);
if (is_critical_native) {
check_needs_gc_for_critical_native(masm, stack_slots, total_in_args, oop_handle_slot_offset, oop_maps, in_regs, in_sig_bt, r_temp_1);
check_needs_gc_for_critical_native(masm, stack_slots, total_in_args, oop_handle_slot_offset,
oop_maps, in_regs, in_sig_bt, r_temp_1);
}
// Move arguments from register/stack to register/stack.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -40,6 +40,10 @@
#include "runtime/thread.inline.hpp"
#include "utilities/align.hpp"
// Declaration and definition of StubGenerator (no .hpp file).
// For a more detailed description of the stub routine structure
// see the comment in stubRoutines.hpp.
#define __ _masm->
#ifdef PRODUCT

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,6 +23,7 @@
*
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "runtime/stubRoutines.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -582,25 +582,6 @@ address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(con
return entry;
}
#if 0
// Call special ClassCastException constructor taking object to cast
// and target class as arguments.
address TemplateInterpreterGenerator::generate_ClassCastException_verbose_handler() {
address entry = __ pc();
// Expression stack must be empty before entering the VM if an
// exception happened.
__ empty_expression_stack();
// Thread will be loaded to R3_ARG1.
// Target class oop is in register R5_ARG3 by convention!
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ClassCastException_verbose), R17_tos, R5_ARG3);
// Above call must not return here since exception pending.
DEBUG_ONLY(__ should_not_reach_here();)
return entry;
}
#endif
address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
address entry = __ pc();
// Expression stack must be empty before entering the VM if an
@ -1896,7 +1877,6 @@ address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
return NULL;
}
/**
* Method entry for static native methods:
* int java.util.zip.CRC32.updateBytes( int crc, byte[] b, int off, int len)

View File

@ -3637,10 +3637,7 @@ void TemplateTable::_new() {
transition(vtos, atos);
Label Lslow_case,
Ldone,
Linitialize_header,
Lallocate_shared,
Linitialize_object; // Including clearing the fields.
Ldone;
const Register RallocatedObject = R17_tos,
RinstanceKlass = R9_ARG7,
@ -3651,8 +3648,6 @@ void TemplateTable::_new() {
Rtags = R3_ARG1,
Rindex = R5_ARG3;
const bool allow_shared_alloc = Universe::heap()->supports_inline_contig_alloc();
// --------------------------------------------------------------------------
// Check if fast case is possible.
@ -3661,6 +3656,8 @@ void TemplateTable::_new() {
// Load index of constant pool entry.
__ get_2_byte_integer_at_bcp(1, Rindex, InterpreterMacroAssembler::Unsigned);
// Note: compared to other architectures, PPC's implementation always goes
// to the slow path if TLAB is used and fails.
if (UseTLAB) {
// Make sure the class we're about to instantiate has been resolved
// This is done before loading instanceKlass to be consistent with the order
@ -3690,8 +3687,7 @@ void TemplateTable::_new() {
// Fast case:
// Allocate the instance.
// 1) Try to allocate in the TLAB.
// 2) If fail, and the TLAB is not full enough to discard, allocate in the shared Eden.
// 3) If the above fails (or is not applicable), go to a slow case (creates a new TLAB, etc.).
// 2) If the above fails (or is not applicable), go to a slow case (creates a new TLAB, etc.).
Register RoldTopValue = RallocatedObject; // Object will be allocated here if it fits.
Register RnewTopValue = R6_ARG4;
@ -3705,53 +3701,13 @@ void TemplateTable::_new() {
// If there is enough space, we do not CAS and do not clear.
__ cmpld(CCR0, RnewTopValue, RendValue);
__ bgt(CCR0, allow_shared_alloc ? Lallocate_shared : Lslow_case);
__ bgt(CCR0, Lslow_case);
__ std(RnewTopValue, in_bytes(JavaThread::tlab_top_offset()), R16_thread);
if (ZeroTLAB) {
// The fields have already been cleared.
__ b(Linitialize_header);
} else {
// Initialize both the header and fields.
__ b(Linitialize_object);
}
// Fall through: TLAB was too small.
if (allow_shared_alloc) {
Register RtlabWasteLimitValue = R10_ARG8;
Register RfreeValue = RnewTopValue;
__ bind(Lallocate_shared);
// Check if tlab should be discarded (refill_waste_limit >= free).
__ ld(RtlabWasteLimitValue, in_bytes(JavaThread::tlab_refill_waste_limit_offset()), R16_thread);
__ subf(RfreeValue, RoldTopValue, RendValue);
__ srdi(RfreeValue, RfreeValue, LogHeapWordSize); // in dwords
__ cmpld(CCR0, RtlabWasteLimitValue, RfreeValue);
__ bge(CCR0, Lslow_case);
// Increment waste limit to prevent getting stuck on this slow path.
__ add_const_optimized(RtlabWasteLimitValue, RtlabWasteLimitValue, ThreadLocalAllocBuffer::refill_waste_limit_increment());
__ std(RtlabWasteLimitValue, in_bytes(JavaThread::tlab_refill_waste_limit_offset()), R16_thread);
}
// else: No allocation in the shared eden. // fallthru: __ b(Lslow_case);
}
// else: Always go the slow path.
// --------------------------------------------------------------------------
// slow case
__ bind(Lslow_case);
call_VM(R17_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), Rcpool, Rindex);
if (UseTLAB) {
__ b(Ldone);
// --------------------------------------------------------------------------
// Init1: Zero out newly allocated memory.
if (!ZeroTLAB || allow_shared_alloc) {
// Clear object fields.
__ bind(Linitialize_object);
if (!ZeroTLAB) {
// --------------------------------------------------------------------------
// Init1: Zero out newly allocated memory.
// Initialize remaining object fields.
Register Rbase = Rtags;
__ addi(Rinstance_size, Rinstance_size, 7 - (int)sizeof(oopDesc));
@ -3760,13 +3716,10 @@ void TemplateTable::_new() {
// Clear out object skipping header. Takes also care of the zero length case.
__ clear_memory_doubleword(Rbase, Rinstance_size);
// fallthru: __ b(Linitialize_header);
}
// --------------------------------------------------------------------------
// Init2: Initialize the header: mark, klass
__ bind(Linitialize_header);
// Init mark.
if (UseBiasedLocking) {
__ ld(Rscratch, in_bytes(Klass::prototype_header_offset()), RinstanceKlass);
@ -3780,14 +3733,19 @@ void TemplateTable::_new() {
__ store_klass(RallocatedObject, RinstanceKlass, Rscratch); // klass (last for cms)
// Check and trigger dtrace event.
{
SkipIfEqualZero skip_if(_masm, Rscratch, &DTraceAllocProbes);
__ push(atos);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc));
__ pop(atos);
}
SkipIfEqualZero::skip_to_label_if_equal_zero(_masm, Rscratch, &DTraceAllocProbes, Ldone);
__ push(atos);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc));
__ pop(atos);
__ b(Ldone);
}
// --------------------------------------------------------------------------
// slow case
__ bind(Lslow_case);
call_VM(R17_tos, CAST_FROM_FN_PTR(address, InterpreterRuntime::_new), Rcpool, Rindex);
// continue
__ bind(Ldone);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,11 +42,6 @@ class Bytes: AllStatic {
//
// In short, it makes no sense on z/Architecture to piecemeal get or put unaligned data.
// Only swap on little endian machines => suffix `_le'.
static inline u2 swap_u2_le(u2 x) { return x; }
static inline u4 swap_u4_le(u4 x) { return x; }
static inline u8 swap_u8_le(u8 x) { return x; }
static inline u2 get_native_u2(address p) { return *(u2*)p; }
static inline u4 get_native_u4(address p) { return *(u4*)p; }
static inline u8 get_native_u8(address p) { return *(u8*)p; }
@ -55,7 +50,8 @@ class Bytes: AllStatic {
static inline void put_native_u4(address p, u4 x) { *(u4*)p = x; }
static inline void put_native_u8(address p, u8 x) { *(u8*)p = x; }
#include "bytes_linux_s390.inline.hpp"
// The following header contains the implementations of swap_u2, swap_u4, and swap_u8.
#include OS_CPU_HEADER_INLINE(bytes)
// Efficient reading and writing of unaligned unsigned data in Java byte ordering (i.e. big-endian ordering)
static inline u2 get_Java_u2(address p) { return get_native_u2(p); }

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ define_pd_global(bool, UseTLAB, true);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, FreqInlineSize, 325);
define_pd_global(bool, ResizeTLAB, true);
define_pd_global(intx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -58,7 +58,7 @@ define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
define_pd_global(intx, MinJumpTableSize, 18);
// Peephole and CISC spilling both break the graph, and so makes the
// Peephole and CISC spilling both break the graph, and so make the
// scheduler sick.
define_pd_global(bool, OptoPeephole, false);
define_pd_global(bool, UseCISCSpill, true);

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,7 +87,14 @@ define_pd_global(intx, InitArrayShortSize, 1*BytesPerLong);
define_pd_global(bool, ThreadLocalHandshakes, true);
#define ARCH_FLAGS(develop, product, diagnostic, experimental, notproduct, range, constraint, writeable) \
#define ARCH_FLAGS(develop, \
product, \
diagnostic, \
experimental, \
notproduct, \
range, \
constraint, \
writeable) \
\
/* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \
/* indirect call by a direct call. */ \

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -110,6 +110,10 @@
pcrel_data_format = 3 // Relocation is for the target data of a pc-relative instruction.
};
// This platform has no oops in the code that are not also
// listed in the oop section.
static bool mustIterateImmediateOopsInCode() { return false; }
// Store the new target address into an oop_Relocation cell, if any.
// Return indication if update happened.
static bool update_oop_pool(address begin, address end, address newTarget, CodeBlob* cb);

View File

@ -73,6 +73,11 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark)
}
#undef __
int CompiledStaticCall::to_trampoline_stub_size() {
// SPARC doesn't use trampolines.
return 0;
}
int CompiledStaticCall::to_interp_stub_size() {
// This doesn't need to be accurate but it must be larger or equal to
// the real size of the stub.

Some files were not shown because too many files have changed in this diff Show More