This commit is contained in:
Lana Steuck 2018-02-28 21:21:11 +00:00
commit 3e7c7c6cdf
7679 changed files with 192008 additions and 903050 deletions

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
@ -468,5 +469,7 @@ e569e83139fdfbecfeb3cd9014d560917787f158 jdk-10+38
3eae36c6baa5f916a3024cf1513e22357e00185d jdk-10+41
4b62b815b4f49970b91a952929cf50115c263cb3 jdk-10+42
107413b070b92c88bde6230ceb4a19b579781068 jdk-10+43
dfa46cfe56346884a61efdc30dc50f7505d66761 jdk-11+1
03ae177c26b016353e5ea1cab6ffd051dfa086ca jdk-11+2
663f20fc51091bd7f95d18448850ba091207b7bd jdk-10+44
4f96cf952e71cb8a127334494faf28880c26181b jdk-10+45

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,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
@ -69,8 +69,6 @@ $(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
COPY := .properties, \
ADD_JAVAC_FLAGS := \
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
--add-modules java.corba \
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
$(INTERIM_RMIC_ADD_EXPORTS), \
))

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.
# 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,10 +38,6 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
################################################################################
# Module specific build settings
java.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
################################################################################
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
java.base_CLEAN += intrinsic.properties
@ -256,10 +252,6 @@ java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,
################################################################################
java.transaction_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
################################################################################
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
@ -279,27 +271,6 @@ java.rmi_CLEAN_FILES += $(wildcard \
################################################################################
java.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.corba_COPY += .prp
java.corba_CLEAN += .properties
java.corba_EXCLUDES += \
com/sun/corba/se/PortableActivationIDL \
com/sun/tools/corba/se/logutil \
#
java.corba_EXCLUDE_FILES += \
com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
com/sun/org/omg/CORBA/IDLTypeOperations.java \
com/sun/org/omg/CORBA/IRObjectOperations.java \
org/omg/PortableInterceptor/UNKNOWN.java \
com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
com/sun/corba/se/impl/presentation/rmi/jndi.properties \
#
################################################################################
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
javax.xml.transform javax.xml.validation javax.xml.xpath)'
@ -307,32 +278,11 @@ java.xml_CLEAN += .properties
################################################################################
java.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.bind_CLEAN += .properties
################################################################################
java.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.soap_CLEAN += .properties
################################################################################
java.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.ws_COPY += .xml
java.xml.ws_CLEAN += .properties
################################################################################
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
java.naming_CLEAN += jndiprovider.properties
################################################################################
java.security.saaj_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.security.saaj_CLEAN += .properties
################################################################################
java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
################################################################################
@ -493,6 +443,7 @@ jdk.internal.vm.compiler_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
#
jdk.internal.vm.compiler_EXCLUDES += \
org.graalvm.collections.test \
org.graalvm.compiler.core.match.processor \
org.graalvm.compiler.nodeinfo.processor \
org.graalvm.compiler.options.processor \
@ -511,6 +462,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
org.graalvm.compiler.graph.test \
org.graalvm.compiler.hotspot.amd64.test \
org.graalvm.compiler.hotspot.lir.test \
org.graalvm.compiler.hotspot.sparc.test \
org.graalvm.compiler.hotspot.test \
org.graalvm.compiler.jtt \
org.graalvm.compiler.lir.jtt \
@ -553,17 +505,6 @@ jdk.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
################################################################################
jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
jdk.xml.bind_CLEAN += .properties
jdk.xml.bind_COPY += .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
################################################################################
jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
jdk.xml.ws_CLEAN += .properties
################################################################################
sun.charsets_COPY += .dat
################################################################################

View File

@ -48,6 +48,7 @@ ifeq ($(INCLUDE_GRAAL), true)
SETUP := GENERATE_OLDBYTECODE, \
SRC := \
$(SRC_DIR)/org.graalvm.word/src \
$(SRC_DIR)/org.graalvm.collections/src \
$(SRC_DIR)/org.graalvm.compiler.core/src \
$(SRC_DIR)/org.graalvm.compiler.core.common/src \
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
@ -101,6 +102,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := \
$(SRC_DIR)/org.graalvm.collections/src \
$(SRC_DIR)/org.graalvm.compiler.options/src \
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
$(SRC_DIR)/org.graalvm.util/src \
@ -117,6 +119,7 @@ ifeq ($(INCLUDE_GRAAL), true)
SETUP := GENERATE_OLDBYTECODE, \
SRC := \
$(SRC_DIR)/org.graalvm.word/src \
$(SRC_DIR)/org.graalvm.collections/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.verifier/src \
$(SRC_DIR)/org.graalvm.compiler.api.replacements/src \
$(SRC_DIR)/org.graalvm.compiler.code/src \

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
@ -53,9 +53,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
ADD_JAVAC_FLAGS := \
--add-modules java.xml.bind \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.xml.bind/javax.xml.bind.annotation=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED \
, \
))

View File

@ -44,7 +44,7 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
#
# We will generate API documentation for two different selections of the source
# code: "Java SE", which contains just the modules covered by the top-level
# module java.se.ee, and "JDK", which covers all of Java SE and also all
# module java.se and "JDK", which covers all of Java SE and also all
# other available modules that should be documented, including imported modules,
# if any.
#
@ -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.
@ -396,8 +396,8 @@ endef
# Define the groups of the JDK API documentation
JavaSE_GROUP_NAME := Java SE
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \
$(call FindTransitiveIndirectDepsForModules, java.se.ee)))
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se \
$(call FindTransitiveIndirectDepsForModules, java.se)))
JavaSE_GROUP_DESCRIPTION := \
The Java Platform, Standard Edition (Java SE) APIs define the core Java \
platform for general-purpose computing. These APIs are in modules whose \
@ -445,9 +445,9 @@ $(eval $(call SetupApiDocsGeneration, JDK_API, \
################################################################################
# Setup generation of the Java SE API documentation (javadoc + modulegraph)
# The Java SE module scope is just java.se.ee and its transitive indirect
# The Java SE module scope is just java.se and its transitive indirect
# exports.
JAVASE_MODULES := java.se.ee
JAVASE_MODULES := java.se
$(eval $(call SetupApiDocsGeneration, JAVASE_API, \
MODULES := $(JAVASE_MODULES), \

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.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -47,7 +47,7 @@ JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
JDK_MODULES += $(ALL_MODULES)
# Modules list for compact builds
# Modules list for compact builds
JRE_COMPACT1_MODULES := \
java.logging \
java.scripting \
@ -134,18 +134,22 @@ $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jdk jimage
$(RM) -r $(JDK_IMAGE_DIR)
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
$(JLINK_JDK_EXTRA_OPTS) \
--output $(JDK_IMAGE_DIR)
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
$(JLINK_JDK_EXTRA_OPTS) \
--output $(JDK_IMAGE_DIR) \
)
$(TOUCH) $@
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jre jimage
$(RM) -r $(JRE_IMAGE_DIR)
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_IMAGE_DIR)
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_IMAGE_DIR) \
)
$(TOUCH) $@
@ -153,27 +157,33 @@ $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jre compact1 jimage
$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
$(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT1_IMAGE_DIR)
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact1, \
$(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT1_IMAGE_DIR) \
)
$(TOUCH) $@
$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jre compact2 jimage
$(RM) -r $(JRE_COMPACT2_IMAGE_DIR)
$(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT2_IMAGE_DIR)
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact2, \
$(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT2_IMAGE_DIR) \
)
$(TOUCH) $@
$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE)
$(ECHO) Creating jre compact3 jimage
$(RM) -r $(JRE_COMPACT3_IMAGE_DIR)
$(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT3_IMAGE_DIR)
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact3, \
$(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \
$(JLINK_JRE_EXTRA_OPTS) \
--output $(JRE_COMPACT3_IMAGE_DIR) \
)
$(TOUCH) $@
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
@ -199,7 +209,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
rmid.1 \
rmiregistry.1 \
servertool.1 \
tnameserv.1 \
unpack200.1
JDK_MAN_PAGES += \
@ -223,11 +232,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
jstat.1 \
jstatd.1 \
rmic.1 \
schemagen.1 \
serialver.1 \
wsgen.1 \
wsimport.1 \
xjc.1
serialver.1
# This variable is potentially overridden in the closed makefile.
MAN_SRC_BASEDIR ?= $(TOPDIR)/src

View File

@ -361,6 +361,12 @@ else # $(HAS_SPEC)=true
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
ifneq ($(CUSTOM_ROOT), )
topdir=$(CUSTOM_ROOT)
else
topdir=$(TOPDIR)
endif
# Parse COMPARE_BUILD into COMPARE_BUILD_*
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
@ -373,7 +379,7 @@ else # $(HAS_SPEC)=true
# FAIL can be set to false to have the return value of compare be ignored.
define ParseCompareBuild
ifneq ($$(COMPARE_BUILD), )
COMPARE_BUILD_OUTPUTDIR := $(TOPDIR)/build/compare-build/$(CONF_NAME)
COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME)
COMPARE_BUILD_FAIL := true
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
@ -412,9 +418,9 @@ else # $(HAS_SPEC)=true
endif
endif
ifneq ($$(COMPARE_BUILD_PATCH), )
ifneq ($$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH)), )
ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), )
# Assume relative path, if file exists
COMPARE_BUILD_PATCH := $$(wildcard $$(TOPDIR)/$$(COMPARE_BUILD_PATCH))
COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH))
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
endif
@ -431,9 +437,9 @@ else # $(HAS_SPEC)=true
# Apply patch, if any
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
# Move the first build away temporarily
$(RM) -r $(TOPDIR)/build/.compare-build-temp
$(MKDIR) -p $(TOPDIR)/build/.compare-build-temp
$(MV) $(OUTPUTDIR) $(TOPDIR)/build/.compare-build-temp
$(RM) -r $(topdir)/build/.compare-build-temp
$(MKDIR) -p $(topdir)/build/.compare-build-temp
$(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp
# Restore an old compare-build, or create a new compare-build directory.
if test -d $(COMPARE_BUILD_OUTPUTDIR); then \
$(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \
@ -443,7 +449,7 @@ else # $(HAS_SPEC)=true
# Re-run configure with the same arguments (and possibly some additional),
# must be done after patching.
( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
$(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
endef
# Cleanup after a compare build
@ -451,10 +457,10 @@ else # $(HAS_SPEC)=true
# If running with a COMPARE_BUILD patch, reverse-apply it
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
# Move this build away and restore the original build
$(MKDIR) -p $(TOPDIR)/build/compare-build
$(MKDIR) -p $(topdir)/build/compare-build
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
$(MV) $(TOPDIR)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
$(RM) -r $(TOPDIR)/build/.compare-build-temp
$(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
$(RM) -r $(topdir)/build/.compare-build-temp
endef
# Do the actual comparison of two builds

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
@ -124,10 +124,9 @@ ifneq ($(CREATING_BUILDJDK), true)
LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
$(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
CORBA_GENSRC_TARGETS := $(filter $(addsuffix -%, $(CORBA_MODULES)), $(GENSRC_TARGETS))
HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
$(CORBA_GENSRC_TARGETS) $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
$(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
@ -618,8 +617,6 @@ else
buildtools-modules: exploded-image-base
$(CORBA_GENSRC_TARGETS): interim-langtools
$(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
@ -637,15 +634,18 @@ 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
generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
# If not already set, set the JVM variant target so that the JVM will be built.
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
# Building one JVM variant is enough to start building the other libs
$(LIBS_TARGETS): hotspot-$(JVM_VARIANT_MAIN)-libs
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
$(LAUNCHER_TARGETS): java.base-libs
@ -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.
@ -721,8 +722,11 @@ else
java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
endif
# Building java.base-jmod requires all of hotspot to be built.
java.base-jmod: hotspot
# If not already set, set the JVM target so that the JVM will be built.
JVM_MAIN_TARGETS ?= hotspot
# Building java.base-jmod requires all of VM (ie hotspot) to be built.
java.base-jmod: $(JVM_MAIN_TARGETS)
# Declare dependencies from <module>-jmod to all other module targets
# When creating a BUILDJDK, the java compilation has already been done by the
@ -748,7 +752,7 @@ else
# in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
# appropriate location otherwise jimage, jlink and jmod won't start. This
# also applies when creating the buildjdk.
DEFAULT_JMOD_DEPS := java.base-libs java.base-copy java.base-gendata \
DEFAULT_JMOD_DEPS += java.base-libs java.base-copy java.base-gendata \
jdk.jlink-launchers
# When cross compiling and buildjdk is to be created, depend on creating the
# buildjdk instead of the default dependencies.
@ -824,8 +828,11 @@ else
docs-reference-api-modulegraph: exploded-image buildtools-modules
# If not already set, then set the JVM specific docs targets
JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
# The gensrc steps for hotspot and jdk.jdi create html spec files.
docs-jdk-specs: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc \
docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
docs-jdk-index
docs-jdk-index: exploded-image buildtools-modules
@ -892,8 +899,10 @@ endif
################################################################################
# Virtual targets without recipes
# If not already set, set the JVM specific tools targets
JVM_TOOLS_TARGETS ?= buildtools-hotspot
buildtools: buildtools-langtools interim-langtools interim-rmic \
buildtools-jdk buildtools-hotspot
buildtools-jdk $(JVM_TOOLS_TARGETS)
hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig
@ -936,7 +945,7 @@ $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
$(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
# Building java.base includes building all of hotspot.
java.base: hotspot
java.base: $(JVM_MAIN_TARGETS)
demos: demos-jdk
@ -1003,10 +1012,15 @@ endif
# This target builds the documentation image
docs-image: docs-jdk
# If not already set, set the JVM specific targets to build the test image
JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
# This target builds the test image
test-image: prepare-test-image test-image-hotspot-jtreg-native \
test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest \
test-image-demos-jdk
test-image: prepare-test-image \
test-image-jdk-jtreg-native test-image-failure-handler \
test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
################################################################################
# all-images builds all our deliverables as images.
all-images: product-images test-image docs-image
@ -1145,6 +1159,8 @@ create-main-targets-include:
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Main-post.gmk))
.PHONY: $(ALL_TARGETS)

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
@ -92,7 +92,6 @@ TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.too
# Nimbus is used somewhere in the swing build.
TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
--add-modules java.xml.bind \
build.tools.generatenimbus.Generator
TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \

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
@ -258,16 +258,12 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
READLINK_TESTED=yes
READLINK=
fi
READLINK_ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
# If READLINK_ISGNU is empty, then it's a non-GNU readlink. Don't use it.
READLINK_TESTED=yes
fi
if test "x$READLINK" != x; then
if test "x$READLINK" != x && test "x$READLINK_ISGNU" != x; then
$1=`$READLINK -f [$]$1`
else
# Save the current directory for restoring afterwards
@ -336,7 +332,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.
@ -495,6 +490,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_REQUIRE_PROGS(MV, mv)
BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk])
BASIC_REQUIRE_PROGS(PRINTF, printf)
BASIC_REQUIRE_PROGS(READLINK, [greadlink readlink])
BASIC_REQUIRE_PROGS(RM, rm)
BASIC_REQUIRE_PROGS(RMDIR, rmdir)
BASIC_REQUIRE_PROGS(SH, sh)
@ -526,7 +522,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
# These are not required on all platforms
BASIC_PATH_PROGS(CYGPATH, cygpath)
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
BASIC_PATH_PROGS(NICE, nice)
@ -586,69 +581,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.
@ -813,6 +810,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
| $SED -e 's/config.log//g' \
-e 's/configure.log//g' \
-e 's/confdefs.h//g' \
-e 's/configure-support//g' \
-e 's/ //g' \
| $TR -d '\n'`
if test "x$filtered_files" != x; then
@ -1185,9 +1183,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

@ -102,8 +102,33 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[
if test "x$with_boot_jdk" != x; then
BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe
if test -d "$with_boot_jdk"; then
BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe
elif test -f "$with_boot_jdk"; then
case "$with_boot_jdk" in
*.tar.gz )
BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
$RM -rf $BOOT_JDK_SUPPORT_DIR
$MKDIR -p $BOOT_JDK_SUPPORT_DIR
$GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
# Try to find javac to determine BOOT_JDK path
BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
if test "x$BOOT_JDK_JAVAC_PATH" != x; then
BOOT_JDK_FOUND=maybe
BOOT_JDK=$($DIRNAME $($DIRNAME $BOOT_JDK_JAVAC_PATH))
else
BOOT_JDK_FOUND=no
fi
;;
* )
BOOT_JDK_FOUND=no
;;
esac
else
BOOT_JDK_FOUND=no
fi
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
fi
])

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,143 @@ 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
fi
CURRENT_DIR=`pwd`
if test "x$CURRENT_DIR" = "x$TOPDIR"; then
# We are running configure from the src root.
# Create '.configure-support' under $TOPDIR/build
build_support_dir="$TOPDIR/build/.configure-support"
elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
# We are running configure from the custom root.
# Create '.configure-support' under $CUSTOM_ROOT/build
build_support_dir="$CUSTOM_ROOT/build/.configure-support"
else
# We are running configure from outside of the src dir.
# Create 'build_support_dir' in the current directory.
build_support_dir="$CURRENT_DIR/configure-support"
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 $build_support_dir
# 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 at $generated_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 +301,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 +311,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 +336,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
@ -175,6 +175,16 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
$1SYSROOT_CFLAGS="-I-xbuiltin -I[$]$1SYSROOT/usr/include"
$1SYSROOT_LDFLAGS="-L[$]$1SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-L[$]$1SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
# If the devkit contains the ld linker, make sure we use it.
AC_PATH_PROG(SOLARIS_LD, ld, , $DEVKIT_TOOLCHAIN_PATH:$DEVKIT_EXTRA_PATH)
# Make sure this ld is runnable.
if test -f "$SOLARIS_LD"; then
if "$SOLARIS_LD" -V > /dev/null 2> /dev/null; then
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -Yl,$(dirname $SOLARIS_LD)"
else
AC_MSG_WARN([Could not run $SOLARIS_LD found in devkit, reverting to system ld])
fi
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
@ -918,7 +928,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"
@ -1031,9 +1040,9 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
-qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
-qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
# Hotspot now overflows its 64K TOC (currently only for slowdebug),
# so for slowdebug we build with '-qpic=large -bbigtoc'.
if test "x$DEBUG_LEVEL" = xslowdebug; then
# Hotspot now overflows its 64K TOC (currently only for debug),
# so for debug we build with '-qpic=large -bbigtoc'.
if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -qpic=large"
fi
elif test "x$OPENJDK_$1_OS" = xbsd; then
@ -1113,10 +1122,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 +1160,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 +1173,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 \
@ -1285,9 +1294,9 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
$2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
$2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
# Hotspot now overflows its 64K TOC (currently only for slowdebug),
# so for slowdebug we build with '-qpic=large -bbigtoc'.
if test "x$DEBUG_LEVEL" = xslowdebug; then
# Hotspot now overflows its 64K TOC (currently only for debug),
# so we build with '-qpic=large -bbigtoc'.
if test "x$DEBUG_LEVEL" = xslowdebug || test "x$DEBUG_LEVEL" = xfastdebug; then
$2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -bbigtoc"
fi
fi

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),)
@ -212,9 +221,9 @@ ifneq ($(COMPANY_NAME),)
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
# Otherwise the default value for VENDOR, which is used to set the "java.vendor"
# and "java.vm.vendor" properties is hard-coded into the source code (i.e. in
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
ifneq ($(COMPANY_NAME), N/A)
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
endif
endif
@ -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))))
@ -618,14 +629,11 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
INTERIM_RMIC_BASE_MODULES := jdk.rmic
INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES))
INTERIM_RMIC_ADD_EXPORTS := \
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
#
# Use = to delay expansion of PathList since it's not available in this file.
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc,java.corba \
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc \
--module-path $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
$(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules) \
$(INTERIM_RMIC_ADD_EXPORTS) \
#
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
@ -677,6 +685,7 @@ NICE:=@NICE@
PANDOC:=@FIXPATH@ @PANDOC@
PATCH:=@PATCH@
PRINTF:=@PRINTF@
READLINK:=@READLINK@
RM:=@RM@
RMDIR:=@RMDIR@
SED:=@SED@
@ -726,6 +735,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

@ -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
@ -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_DATE=2018-09-18
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK

View File

@ -1,113 +0,0 @@
#
# Copyright (c) 2011, 2014, 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.
#
PREFIXES=-pkgPrefix CORBA org.omg \
-pkgPrefix CosNaming org.omg \
-pkgPrefix CosTransactions org.omg \
-pkgPrefix CosTSInteroperation org.omg \
-pkgPrefix DynamicAny org.omg \
-pkgPrefix Dynamic org.omg \
-pkgPrefix IOP org.omg \
-pkgPrefix Messaging org.omg \
-pkgPrefix PortableInterceptor org.omg \
-pkgPrefix PortableServer org.omg \
-pkgPrefix activation com.sun.corba.se.spi \
-pkgPrefix GIOP com.sun.corba.se \
-pkgPrefix PortableActivationIDL com.sun.corba.se \
-pkgPrefix messages com.sun.corba.se
define add_idl_package
# param 1 = MYPACKAGE
# param 2 = src root
# param 3 = gensrc root
# param 4 = source idl to compile
# param 5 = target idl package
# param 6 = delete these files that were output from the idlj
# param 7 = idls that match these patterns should be compiled with -oldImplBase
# param 8 = the idlj command
# Save the generated java files to a temporary directory so
# that we can find them and create proper dependencies.
# After that, we move them to the real gensrc target dir.
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
ifneq ($$(filter $7,$4),)
$4_OLDIMPLBASE:=-oldImplBase
$4_OLDIMPLBASE_MSG:=with -oldImplBase
endif
$5 : $4
$$(call LogInfo, Compiling IDL $(patsubst $2/%,%,$4))
$$(call MakeDir, $$(@D))
$(RM) -rf $3/$$($4_TMPDIR)
$8 -td $3/$$($4_TMPDIR) \
-i $2/org/omg/CORBA \
-i $2/org/omg/PortableInterceptor \
-i $2/org/omg/PortableServer \
-D CORBA3 -corba 3.0 \
-fall \
$$($4_OLDIMPLBASE) \
$(PREFIXES) \
$4
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
$(CP) -r $3/$$($4_TMPDIR)/* $3
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
$(RM) -rf $3/$$($4_TMPDIR)
endef
# Setup make rules for creating an IDL compilation.
#
# Parameter 1 is the name of the rule. This name is used as variable prefix,
# and the targets generated are listed in a variable by that name.
#
# Remaining parameters are named arguments. These include:
# IDLJ
# SRC
# BIN
# INCLUDES
# EXCLUDES
# OLDIMPLBASES
# DELETES
SetupIdlCompilation = $(NamedParamsMacroTemplate)
define SetupIdlCompilationBody
# Find all existing java files and existing class files.
$$(call MakeDir,$$($1_BIN))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
# Prepend the source/bin path to the filter expressions.
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
# Now remove unwanted java/class files.
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
# Now create the dependencies for each idl target.
$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
endef
.SUFFIXES: .java .class .package

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
@ -423,7 +423,7 @@ _sequence-do = \
################################################################################
MAX_PARAMS := 35
MAX_PARAMS := 36
PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
# Template for creating a macro taking named parameters. To use it, assign the
@ -545,8 +545,18 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx)
define install-file
$(call MakeTargetDir)
$(RM) '$(call DecodeSpace, $@)'
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then $(XATTR) -cs '$(call DecodeSpace, $@)'; fi
# Work around a weirdness with cp on Macosx. When copying a symlink, if
# the target of the link is write protected (e.g. 444), cp will add
# write permission for the user on the target file (644). Avoid this by
# using ln to create a new link instead.
if [ -h '$(call DecodeSpace, $<)' ]; then \
$(LN) -s "`$(READLINK) '$(call DecodeSpace, $<)'`" '$(call DecodeSpace, $@)'; \
else \
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
fi
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then \
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
fi
endef
else
define install-file
@ -1000,6 +1010,7 @@ endif
# Param 2 - The command to run
ExecuteWithLog = \
$(call LogCmdlines, Exececuting: [$(strip $2)]) \
$(call MakeDir, $(dir $(strip $1))) \
$(call WriteFile, $2, $(strip $1).cmdline) \
( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
( exitcode=$(DOLLAR)? && \

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.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -74,24 +74,13 @@ BOOT_MODULES += \
# Modules that directly or indirectly requiring upgradeable modules
# should carefully be considered if it should be upgradeable or not.
UPGRADEABLE_MODULES += \
java.activation \
java.compiler \
java.corba \
java.transaction \
java.xml.bind \
java.xml.ws \
java.xml.ws.annotation \
jdk.internal.vm.compiler \
#
UPGRADEABLE_TOOL_MODULES += \
jdk.xml.bind \
jdk.xml.ws \
#
AGGREGATOR_MODULES += \
java.se \
java.se.ee \
#
PLATFORM_MODULES += \
@ -143,7 +132,7 @@ JRE_TOOL_MODULES += \
# DOCS_MODULES defines the root modules for javadoc generation.
# All of their `require transitive` modules directly and indirectly will be included.
DOCS_MODULES += \
java.se.ee \
java.se \
java.smartcardio \
jdk.accessibility \
jdk.attach \
@ -195,8 +184,6 @@ LANGTOOLS_MODULES := \
jdk.jshell \
#
CORBA_MODULES := java.corba
HOTSPOT_MODULES := \
jdk.aot \
jdk.hotspot.agent \
@ -395,7 +382,7 @@ FindTransitiveIndirectDepsForModules = \
# Upgradeable modules are those that are either defined as upgradeable or that
# require an upradeable module.
FindAllUpgradeableModules = \
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES) $(UPGRADEABLE_TOOL_MODULES)))
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES)))
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -30,7 +30,7 @@
ifndef _NATIVE_COMPILATION_GMK
_NATIVE_COMPILATION_GMK := 1
ifeq (,$(_MAKEBASE_GMK))
ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
endif
@ -231,32 +231,32 @@ define add_native_source
endif
endif
ifneq (,$$(filter %.c,$2))
ifneq ($$(filter %.c, $2), )
# Compile as a C file
$1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
$1_$2_FLAGS := $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
$$($1_$(notdir $2)_OPT_CFLAGS) \
$$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
$1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.m,$2))
$1_$2_COMP := $5
$1_$2_DEP_FLAG := $(C_FLAG_DEPS)
else ifneq ($$(filter %.m, $2), )
# Compile as an Objective-C file
$1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
$1_$2_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
$$($1_$(notdir $2)_OPT_CFLAGS) \
$$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
$1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.s %.S,$2))
$1_$2_COMP := $5
$1_$2_DEP_FLAG := $(C_FLAG_DEPS)
else ifneq ($$(filter %.s %.S, $2), )
# Compile as assembler file
$1_$2_FLAGS=$8
$1_$2_COMP=$(AS)
$1_$2_DEP_FLAG:=
else ifneq (,$$(filter %.cpp,$2)$$(filter %.cc,$2)$$(filter %.mm,$2))
$1_$2_FLAGS := $8
$1_$2_COMP := $(AS)
$1_$2_DEP_FLAG :=
else ifneq ($$(filter %.cpp, $2)$$(filter %.cc, $2)$$(filter %.mm, $2), )
# Compile as a C++ or Objective-C++ file
$1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $6 \
$1_$2_FLAGS := $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $6 \
$$($1_$(notdir $2)_OPT_CXXFLAGS) \
$$($1_$(notdir $2)_CXXFLAGS) $$($1_$2_THIS_FILE) -c
$1_$2_COMP=$7
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
$1_$2_COMP := $7
$1_$2_DEP_FLAG := $(CXX_FLAG_DEPS)
else
$$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
endif
@ -264,14 +264,14 @@ define add_native_source
$1_$2_OBJ := $3/$$(call replace_with_obj_extension, $$(notdir $2))
# Only continue if this object file hasn't been processed already. This lets the first found
# source file override any other with the same name.
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
$1_OBJS_SO_FAR+=$$($1_$2_OBJ)
ifeq (,$$(filter %.s %.S,$2))
ifeq ($$(findstring $$($1_$2_OBJ), $$($1_OBJS_SO_FAR)), )
$1_OBJS_SO_FAR += $$($1_$2_OBJ)
ifeq ($$(filter %.s %.S, $2), )
# And this is the dependency file for this obj file.
$1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
$1_$2_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
# The dependency target file lists all dependencies as empty targets
# to avoid make error "No rule to make target" for removed files
$1_$2_DEP_TARGETS:=$$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_$2_OBJ))
$1_$2_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_$2_OBJ))
# Include previously generated dependency information. (if it exists)
-include $$($1_$2_DEP)
@ -280,7 +280,7 @@ define add_native_source
ifeq ($(TOOLCHAIN_TYPE), microsoft)
# To avoid name clashes between pdbs for objects and libs/execs, put
# object pdbs in a separate subdir.
$1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \
$1_$2_DEBUG_OUT_FLAGS := -Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \
$$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))))
endif
endif
@ -293,10 +293,10 @@ define add_native_source
endif
$$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO)
$$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET))))
$$(call LogInfo, Compiling $$(notdir $2) (for $$($1_BASENAME)))
$$(call MakeDir, $$(@D) $$(@D)/pdb)
ifneq ($(TOOLCHAIN_TYPE), microsoft)
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $2), solstudio)
# The Solaris studio compiler doesn't output the full path to the object file in the
# generated deps files. Fixing it with sed. If compiling assembly, don't try this.
$$(call ExecuteWithLog, $$@, \
@ -308,7 +308,7 @@ define add_native_source
endif
# Create a dependency target file from the dependency file.
# Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
ifneq ($$($1_$2_DEP),)
ifneq ($$($1_$2_DEP), )
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
endif
else
@ -338,6 +338,9 @@ endef
# and the targets generated are listed in a variable by that name.
#
# Remaining parameters are named arguments. These include:
# NAME The base name for the resulting binary, excluding decorations (like *.exe)
# TYPE Type of binary (EXECUTABLE, LIBRARY or STATIC_LIBRARY). Default is LIBRARY.
# SUFFIX Override the default suffix for the output file
# TOOLCHAIN Name of toolchain setup to use. Defaults to TOOLCHAIN_DEFAULT.
# SRC one or more directory roots to scan for C/C++ files.
# CFLAGS the compiler flags to be used, used both for C and C++.
@ -347,8 +350,6 @@ endef
# ARFLAGS the archiver flags to be used
# OBJECT_DIR the directory where we store the object files
# OUTPUT_DIR the directory where the resulting binary is put
# LIBRARY the resulting library file
# PROGRAM the resulting exec file
# INCLUDES only pick source from these directories
# EXCLUDES do not pick source from these directories
# INCLUDE_FILES only compile exactly these files!
@ -385,106 +386,60 @@ endef
SetupNativeCompilation = $(NamedParamsMacroTemplate)
define SetupNativeCompilationBody
# If type is unspecified, default to LIBRARY
ifeq ($$($1_TYPE), )
$1_TYPE := LIBRARY
endif
# If we're doing a static build and producing a library
# force it to be a static library and remove the -l libraries
ifeq ($(STATIC_BUILD), true)
ifneq ($$($1_LIBRARY),)
$1_STATIC_LIBRARY := $$($1_LIBRARY)
$1_LIBRARY :=
ifeq ($$($1_TYPE), LIBRARY)
$1_TYPE := STATIC_LIBRARY
endif
endif
ifneq (,$$($1_BIN))
$$(error BIN has been replaced with OBJECT_DIR)
endif
ifneq (,$$($1_LIB))
$$(error LIB has been replaced with LIBRARY)
endif
ifneq (,$$($1_EXE))
$$(error EXE has been replaced with PROGRAM)
endif
ifneq (,$$($1_LIBRARY))
ifeq (,$$($1_OUTPUT_DIR))
$$(error LIBRARY requires OUTPUT_DIR)
endif
ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
$$(error directory of LIBRARY should be specified using OUTPUT_DIR)
endif
ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
$$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
endif
ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
$$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
endif
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_LIBRARY)
endif
ifneq (,$$($1_STATIC_LIBRARY))
ifeq (,$$($1_OUTPUT_DIR))
$$(error STATIC_LIBRARY requires OUTPUT_DIR)
endif
ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
$$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
endif
ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
$$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
endif
ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
$$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
endif
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
endif
$1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)
endif
ifneq (,$$($1_PROGRAM))
ifeq (,$$($1_OUTPUT_DIR))
$$(error PROGRAM requires OUTPUT_DIR)
endif
ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
$$(error directory of PROGRAM should be specified using OUTPUT_DIR)
endif
ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
$$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
endif
ifeq ($$($1_TYPE), EXECUTABLE)
$1_PREFIX :=
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(EXE_SUFFIX)
endif
$1_BASENAME:=$$($1_PROGRAM)$$($1_SUFFIX)
$1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX:=$$($1_PROGRAM)
else
$1_PREFIX := $(LIBRARY_PREFIX)
ifeq ($$($1_TYPE), LIBRARY)
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
endif
else ifeq ($$($1_TYPE), STATIC_LIBRARY)
ifeq ($$($1_SUFFIX), )
$1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
endif
endif
endif
ifneq ($$($1_NAME), $(basename $$($1_NAME)))
$$(error NAME must not contain any directory path in $1)
endif
ifneq ($(findstring $$($1_SUFFIX), $$($1_NAME)), )
$$(error NAME should be specified without suffix: $$($1_SUFFIX) in $1)
endif
ifneq ($(findstring $$($1_PREFIX), $$($1_NAME)), )
$$(error NAME should be specified without prefix: $$($1_PREFIX) in $1)
endif
ifeq ($$($1_OUTPUT_DIR), )
$$(error OUTPUT_DIR is missing in $1)
endif
ifneq ($$($1_MANIFEST), )
ifeq ($$($1_MANIFEST_VERSION), )
$$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
endif
endif
$1_BASENAME := $$($1_PREFIX)$$($1_NAME)$$($1_SUFFIX)
$1_TARGET := $$($1_OUTPUT_DIR)/$$($1_BASENAME)
$1_NOSUFFIX := $$($1_PREFIX)$$($1_NAME)
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
ifeq (,$$($1_TARGET))
$$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
endif
# Setup the toolchain to be used
$$(call SetIfEmpty, $1_TOOLCHAIN, TOOLCHAIN_DEFAULT)
$$(call SetIfEmpty, $1_CC, $$($$($1_TOOLCHAIN)_CC))
@ -499,41 +454,35 @@ define SetupNativeCompilationBody
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
ifneq ($$($1_MANIFEST), )
ifeq ($$($1_MANIFEST_VERSION), )
$$(error If MANIFEST is provided, then MANIFEST_VERSION is required in $1)
endif
endif
# Make sure the dirs exist.
$$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),, \
$$(call MakeDir, $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
$$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
# Find all files in the source trees. Preserve order.
$1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind,$$(s)))
$1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
$1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
# Extract the C/C++ files.
ifneq ($$($1_EXCLUDE_PATTERNS), )
# We must not match the exclude pattern against the src root(s).
$1_SRCS_WITHOUT_ROOTS := $$($1_SRCS)
$$(foreach i,$$($1_SRC),$$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
$$(foreach i, $$($1_SRC), $$(eval $1_SRCS_WITHOUT_ROOTS := $$(patsubst \
$$i/%,%, $$($1_SRCS_WITHOUT_ROOTS))))
$1_ALL_EXCLUDE_FILES := $$(call containing, $$($1_EXCLUDE_PATTERNS), \
$$($1_SRCS_WITHOUT_ROOTS))
endif
ifneq ($$($1_EXCLUDE_FILES),)
ifneq ($$($1_EXCLUDE_FILES), )
$1_ALL_EXCLUDE_FILES += $$($1_EXCLUDE_FILES)
endif
ifneq ($$($1_ALL_EXCLUDE_FILES),)
ifneq ($$($1_ALL_EXCLUDE_FILES), )
$1_EXCLUDE_FILES_PAT := $$($1_ALL_EXCLUDE_FILES) \
$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_ALL_EXCLUDE_FILES)))
$1_EXCLUDE_FILES_PAT := $$(addprefix %,$$($1_EXCLUDE_FILES_PAT))
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT),$$($1_SRCS))
$$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_ALL_EXCLUDE_FILES)))
$1_EXCLUDE_FILES_PAT := $$(addprefix %, $$($1_EXCLUDE_FILES_PAT))
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT), $$($1_SRCS))
endif
ifneq ($$($1_INCLUDE_FILES), )
$1_INCLUDE_FILES_PAT := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT),$$($1_SRCS))
$1_INCLUDE_FILES_PAT := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES_PAT), $$($1_SRCS))
endif
# There can be only a single bin dir root, no need to foreach over the roots.
$1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
@ -541,29 +490,29 @@ define SetupNativeCompilationBody
# and we have a list of all existing object files: $$($1_BINS)
# Prepend the source/bin path to the filter expressions. Then do the filtering.
ifneq ($$($1_INCLUDES),)
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
ifneq ($$($1_INCLUDES), )
$1_SRC_INCLUDES := $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
$1_SRCS := $$(filter $$($1_SRC_INCLUDES), $$($1_SRCS))
endif
ifneq ($$($1_EXCLUDES),)
$1_SRC_EXCLUDES := $$(addsuffix /%,$$($1_EXCLUDES))
$1_SRC_EXCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
ifneq ($$($1_EXCLUDES), )
$1_SRC_EXCLUDES := $$(addsuffix /%, $$($1_EXCLUDES))
$1_SRC_EXCLUDES += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_EXCLUDES))))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES), $$($1_SRCS))
endif
$1_SRCS += $$($1_EXTRA_FILES)
ifeq (,$$($1_SRCS))
ifeq ($$($1_SRCS), )
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
# Calculate the expected output from compiling the sources
$1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
$1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/,$$($1_EXPECTED_OBJS_FILENAMES))
$1_EXPECTED_OBJS := $$(addprefix $$($1_OBJECT_DIR)/, $$($1_EXPECTED_OBJS_FILENAMES))
# Are there too many object files on disk? Perhaps because some source file was removed?
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
$1_SUPERFLOUS_OBJS := $$(sort $$(filter-out $$($1_EXPECTED_OBJS), $$($1_BINS)))
# Clean out the superfluous object files.
ifneq ($$($1_SUPERFLUOUS_OBJS),)
ifneq ($$($1_SUPERFLUOUS_OBJS), )
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
endif
# Sort to remove dupliates and provide a reproducable order on the input files to the linker.
@ -571,42 +520,42 @@ define SetupNativeCompilationBody
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS, and/or OPENJDK_TARGET_OS plus
# OPENJDK_TARGET_CPU pair dependent variables for CFLAGS.
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
$1_EXTRA_CFLAGS := $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU))
ifneq ($(DEBUG_LEVEL),release)
ifneq ($(DEBUG_LEVEL), release)
# Pickup extra debug dependent variables for CFLAGS
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_debug)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
else
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_release)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
$1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
endif
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
$1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
ifneq ($(DEBUG_LEVEL),release)
$1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
ifneq ($(DEBUG_LEVEL), release)
# Pickup extra debug dependent variables for CXXFLAGS
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_debug)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
else
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif
# If no C++ flags are explicitly set, default to using the C flags.
# After that, we can set additional C++ flags that should not interfere
# with the mechanism for copying the C flags by default.
ifeq ($$($1_CXXFLAGS),)
$1_CXXFLAGS:=$$($1_CFLAGS)
ifeq ($$($1_CXXFLAGS), )
$1_CXXFLAGS := $$($1_CFLAGS)
endif
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
$1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), )
$1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS)
endif
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
@ -616,19 +565,19 @@ define SetupNativeCompilationBody
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_DEBUG_SYMBOLS)
endif
ifneq (,$$($1_REORDER))
ifneq ($$($1_REORDER), )
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
endif
# Pass the library name for static JNI library naming
ifneq ($$($1_STATIC_LIBRARY),)
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
ifeq ($$($1_TYPE), STATIC_LIBRARY)
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME)
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_NAME)
endif
# Pick up disabled warnings, if possible on this platform.
ifneq ($(DISABLE_WARNING_PREFIX),)
ifneq ($(DISABLE_WARNING_PREFIX), )
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
$$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)))
@ -639,8 +588,8 @@ define SetupNativeCompilationBody
# Check if warnings should be considered errors.
# Pick first binary and toolchain specific, then binary specific, then general setting.
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),)
ifeq ($$($1_WARNINGS_AS_ERRORS),)
ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), )
ifeq ($$($1_WARNINGS_AS_ERRORS), )
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS)
else
$1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS)
@ -740,7 +689,7 @@ define SetupNativeCompilationBody
endif
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS), \
$$(foreach p, $$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
$$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS), \
$$($1_CC), \
@ -750,7 +699,7 @@ define SetupNativeCompilationBody
# Setup rule for printing progress info when compiling source files.
# This is a rough heuristic and may not always print accurate information.
$$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
ifeq ($$(wildcard $$($1_TARGET)),)
ifeq ($$(wildcard $$($1_TARGET)), )
$(ECHO) 'Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
$$(filter-out %.vardeps, $$?)) file(s)'
else
@ -763,10 +712,10 @@ define SetupNativeCompilationBody
# On windows we need to create a resource file
ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq (,$$($1_VERSIONINFO_RESOURCE))
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP:=$$($1_RES).d
$1_RES_DEP_TARGETS:=$$($1_RES).d.targets
ifneq ($$($1_VERSIONINFO_RESOURCE), )
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP := $$($1_RES).d
$1_RES_DEP_TARGETS := $$($1_RES).d.targets
-include $$($1_RES_DEP)
-include $$($1_RES_DEP_TARGETS)
@ -775,7 +724,7 @@ define SetupNativeCompilationBody
$$($1_RES).vardeps)
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET))))
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
$$(call ExecuteWithLog, $$@, \
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
@ -798,10 +747,10 @@ define SetupNativeCompilationBody
endif
endif
ifneq ($(DISABLE_MAPFILES),true)
ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
ifneq ($(OPENJDK_TARGET_OS),windows)
ifneq (,$$($1_REORDER))
ifneq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_REORDER), )
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
@ -815,9 +764,9 @@ define SetupNativeCompilationBody
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
# for LDFLAGS and LIBS
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
$1_EXTRA_LIBS:=$$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
ifneq (,$$($1_REAL_MAPFILE))
$1_EXTRA_LDFLAGS := $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
$1_EXTRA_LIBS := $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
ifneq ($$($1_REAL_MAPFILE), )
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
@ -835,7 +784,7 @@ define SetupNativeCompilationBody
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
ifneq ($$($1_DEBUG_SYMBOLS), false)
# Only copy debug symbols for dynamic libraries and programs.
ifeq ($$($1_STATIC_LIBRARY), )
ifneq ($$($1_TYPE), STATIC_LIBRARY)
# Generate debuginfo files.
ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
@ -899,17 +848,17 @@ define SetupNativeCompilationBody
endif
endif
ifneq (,$$($1_LIBRARY))
ifeq ($$($1_TYPE), LIBRARY)
# Generating a dynamic library.
$1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
$1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_NAME).lib"
# Create a rule for the import lib so that other rules may depend on it
$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib: $$($1_TARGET)
$$($1_OBJECT_DIR)/$$($1_NAME).lib: $$($1_TARGET)
endif
# Create loadmap on AIX. Helps in diagnosing some problems.
ifneq ($(COMPILER_BINDCMD_FILE_FLAG),)
ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
endif
@ -924,7 +873,7 @@ define SetupNativeCompilationBody
# If there are many object files, use an @-file...
ifneq ($$(word 17, $$($1_ALL_OBJS)), )
$1_OBJ_FILE_LIST := $$($1_OBJECT_DIR)/_$1_objectfilenames.txt
ifneq ($(COMPILER_COMMAND_FILE_FLAG),)
ifneq ($(COMPILER_COMMAND_FILE_FLAG), )
$1_LD_OBJ_ARG := $(COMPILER_COMMAND_FILE_FLAG)$$($1_OBJ_FILE_LIST)
else
# ...except for toolchains which don't support them.
@ -986,7 +935,7 @@ define SetupNativeCompilationBody
endif
ifneq (,$$($1_STATIC_LIBRARY))
ifeq ($$($1_TYPE), STATIC_LIBRARY)
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
$$($1_EXTRA_LIBS)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
@ -1000,7 +949,7 @@ define SetupNativeCompilationBody
endif
$$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP)
$$(call LogInfo, Archiving $$($1_STATIC_LIBRARY))
$$(call LogInfo, Building static library $$($1_BASENAME))
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \
$$($1_RES))
@ -1013,7 +962,7 @@ define SetupNativeCompilationBody
endif
endif
ifneq (,$$($1_PROGRAM))
ifeq ($$($1_TYPE), EXECUTABLE)
# A executable binary has been specified, setup the target for it.
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
@ -1038,13 +987,13 @@ define SetupNativeCompilationBody
$$($1_LIBS) $$($1_EXTRA_LIBS))
ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_MANIFEST), )
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_PROGRAM).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
endif
# This only works if the openjdk_codesign identity is present on the system. Let
# silently fail otherwise.
ifneq (,$(CODESIGN))
ifneq (,$$($1_CODESIGN))
ifneq ($(CODESIGN), )
ifneq ($$($1_CODESIGN), )
$(CODESIGN) -s openjdk_codesign $$@
endif
endif

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

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
# 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
@ -61,11 +61,13 @@ define SetupTestFilesCompilationBody
$1_OUTPUT_SUBDIR := lib
$1_CFLAGS := $(CFLAGS_TESTLIB) $(CFLAGS_WARNINGS_ARE_ERRORS)
$1_LDFLAGS := $(LDFLAGS_TESTLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
$1_COMPILATION_TYPE := LIBRARY
else ifeq ($$($1_TYPE), PROGRAM)
$1_PREFIX = exe
$1_OUTPUT_SUBDIR := bin
$1_CFLAGS := $(CFLAGS_TESTEXE) $(CFLAGS_WARNINGS_ARE_ERRORS)
$1_LDFLAGS := $(LDFLAGS_TESTEXE)
$1_COMPILATION_TYPE := EXECUTABLE
else
$$(error Unknown type: $$($1_TYPE))
endif
@ -78,7 +80,8 @@ define SetupTestFilesCompilationBody
$$(foreach file, $$($1_FILE_LIST),\
$$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
$$($1_TYPE) := $$(name), \
NAME := $$(name), \
TYPE := $$($1_COMPILATION_TYPE), \
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
INCLUDE_FILES := $$(notdir $$(file)), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \

View File

@ -153,11 +153,11 @@ define SetupTextFileProcessingBody
endif
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
# line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
# and ';' with '/" -e "s/', and adjusting for edge cases.
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
# line (-e "s/A/B/g" -e "s/C/D/g" ...), basically by replacing '=>' with '/'
# and ';' with '/g" -e "s/', and adjusting for edge cases.
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)g' \
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)g' \
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)g'
else
# We don't have any replacements, just pipe the file through cat.
$1_REPLACEMENTS_COMMAND_LINE := $(CAT)

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",
@ -768,7 +768,7 @@ var getJibProfilesDependencies = function (input, common) {
linux_x64: "gcc4.9.2-OEL6.4+1.2",
macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
solaris_x64: "SS12u4-Solaris11u1+1.0",
solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
windows_x64: "VS2013SP4+1.0",
linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
@ -829,7 +829,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "javare",
revision: "4.2",
build_number: "b10",
build_number: "b12",
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",
@ -1078,7 +1090,7 @@ var versionArgs = function(input, common) {
args = concat(args,
// This needs to be changed when we start building release candidates
// with-version-pre must be set to ea for 'ea' and empty for fcs build
"--with-version-pre=",
"--with-version-pre=ea",
"--without-version-opt");
} else {
args = concat(args, "--with-version-opt=" + common.build_id);

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

@ -1,34 +0,0 @@
#
# Copyright (c) 2014, 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.
#
################################################################################
# Copy idl files to jdk/lib.
$(eval $(call SetupCopyFiles,COPY_IDL, \
SRC := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
FILES := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/orb.idl \
$(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/ir.idl))
TARGETS := $(COPY_IDL)

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,123 +0,0 @@
/*
* Copyright (c) 2003, 2009, 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.
*/
package build.tools.logutil;
import java.io.PrintWriter ;
import java.io.Writer ;
import java.io.OutputStream ;
import java.io.BufferedWriter ;
import java.io.OutputStreamWriter ;
import java.util.StringTokenizer ;
public class IndentingPrintWriter extends PrintWriter {
private int level = 0 ;
private int indentWidth = 4 ;
private String indentString = "" ;
public void printMsg( String msg, Object... data )
{
// System.out.println( "printMsg called with msg=" + msg + " data=" + data ) ;
StringTokenizer st = new StringTokenizer( msg, "@", true ) ;
StringBuffer result = new StringBuffer() ;
String token = null ;
int pos = 0;
while (st.hasMoreTokens()) {
token = st.nextToken() ;
if (token.equals("@")) {
if (pos < data.length) {
result.append( data[pos] );
++pos;
} else {
throw new Error( "List too short for message" ) ;
}
} else {
result.append( token ) ;
}
}
// System.out.println( "Printing result " + result + " to file" ) ;
print( result ) ;
println() ;
}
public IndentingPrintWriter (Writer out) {
super( out, true ) ;
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
}
public IndentingPrintWriter(Writer out, boolean autoFlush) {
super( out, autoFlush ) ;
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
}
public IndentingPrintWriter(OutputStream out) {
super(out, true);
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
}
public IndentingPrintWriter(OutputStream out, boolean autoFlush) {
super(new BufferedWriter(new OutputStreamWriter(out)), autoFlush);
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
}
public void setIndentWidth( int indentWidth )
{
this.indentWidth = indentWidth ;
updateIndentString() ;
}
public void indent()
{
level++ ;
updateIndentString() ;
}
public void undent()
{
if (level > 0) {
level-- ;
updateIndentString() ;
}
}
private void updateIndentString()
{
int size = level * indentWidth ;
StringBuffer sbuf = new StringBuffer( size ) ;
for (int ctr = 0; ctr<size; ctr++ )
sbuf.append( " " ) ;
indentString = sbuf.toString() ;
}
// overridden from PrintWriter
public void println()
{
super.println() ;
print( indentString ) ;
}
}

View File

@ -1,211 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Input {
/**
* The name of the package this class will inhabit.
*/
private String packageName;
/**
* The name of the generated class.
*/
private String className;
/**
* The name of the group of exceptions handled by the class.
*/
private String groupName;
/**
* The group of exceptions.
*/
private Queue<InputException> exceptions;
/**
* Represents the current state of parsing the input.
*/
private enum State
{
OUTER,
IN_CLASS,
IN_EXCEPTION_LIST
};
/**
* Regular expression to match each code line.
*/
private static final Pattern EXCEPTION_INFO_REGEX =
Pattern.compile("(\\w+)\\s*(\\d+)\\s*(\\w+)");
/**
* Parses the specified file to create a new {@link Input}
* object.
*
* @param filename the file to parse.
* @throws FileNotFoundException if the file can't be found.
* @throws IOException if an I/O error occurs.
*/
public Input(final String filename)
throws FileNotFoundException, IOException {
BufferedReader r =
new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
State state = State.OUTER;
InputException current = null;
exceptions = new LinkedList<InputException>();
String line;
while ((line = r.readLine()) != null) {
// Skip ; comments
if (line.startsWith(";"))
continue;
int index = line.indexOf("(");
if (index == -1)
continue;
switch (state) {
case OUTER:
state = State.IN_CLASS;
String[] classInfo = line.substring(index).split(" ");
packageName = classInfo[0].substring(2, classInfo[0].length() - 1);
className = classInfo[1].substring(1, classInfo[1].length() - 1);
groupName = classInfo[2];
break;
case IN_CLASS:
state = State.IN_EXCEPTION_LIST;
break;
case IN_EXCEPTION_LIST:
boolean inQuote = false;
boolean inCode = false;
boolean end = false;
int start = index + 1;
Queue<String> lines = new LinkedList<String>();
for (int a = start; a < line.length(); ++a) {
if (line.charAt(a) == '(' && !inCode && !inQuote) {
if (current == null)
current =
new InputException(line.substring(start, a).trim());
start = a + 1;
inCode = true;
}
if (line.charAt(a) == '"')
inQuote = !inQuote;
if (line.charAt(a) == ')' && !inQuote) {
if (inCode) {
lines.offer(line.substring(start, a));
inCode = false;
} else
end = true;
}
if (!end && a == line.length() - 1)
line += r.readLine();
}
for (String l : lines) {
int stringStart = l.indexOf("\"") + 1;
int stringEnd = l.indexOf("\"", stringStart);
Matcher matcher = EXCEPTION_INFO_REGEX.matcher(l.substring(0, stringStart));
if (matcher.find())
current.add(new InputCode(matcher.group(1),
Integer.parseInt(matcher.group(2)),
matcher.group(3),
l.substring(stringStart, stringEnd)));
}
exceptions.offer(current);
current = null;
break;
}
}
}
/**
* Returns the name of this group of exceptions.
*
* @return the name of this group of exceptions.
*/
public String getGroupName()
{
return groupName;
}
/**
* Returns the name of the package this class will go in.
*
* @return the name of the package.
*/
public String getPackageName()
{
return packageName;
}
/**
* Returns the name of the generated class.
*
* @return the name of the class.
*/
public String getClassName()
{
return className;
}
/**
* Returns the exceptions contained in this class.
*
* @return the exceptions.
*/
public Queue<InputException> getExceptions() {
return exceptions;
}
/**
* Returns a textual representation of this input.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName() +
"[packageName=" + packageName +
",className=" + className +
",groupName=" + groupName +
",exceptions=" + exceptions +
"]";
}
}

View File

@ -1,116 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
public class InputCode {
/**
* The name of this code.
*/
private final String name;
/**
* The code.
*/
private final int code;
/**
* The log level for this code.
*/
private final String logLevel;
/**
* The error message for this code.
*/
private final String message;
/**
* Creates a new error code with the specified name, code,
* log level and error message.
*
* @param name the name of the new code.
* @param code the code itself.
* @param logLevel the level of severity of this error.
* @param message the error message for this code.
*/
public InputCode(final String name, final int code,
final String logLevel, final String message) {
this.name = name;
this.code = code;
this.logLevel = logLevel;
this.message = message;
}
/**
* Returns the name of this code.
*
* @return the name of the code.
*/
public String getName() {
return name;
}
/**
* Returns the code.
*
* @return the code.
*/
public int getCode() {
return code;
}
/**
* Returns the severity of this code.
*
* @return the log level severity of the code.
*/
public String getLogLevel() {
return logLevel;
}
/**
* Returns the error message for this code.
*
* @return the error message for this code.
*/
public String getMessage() {
return message;
}
/**
* Returns a textual representation of this code.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName() +
"[name=" + name +
",code=" + code +
",logLevel=" + logLevel +
",message=" + message +
"]";
}
}

View File

@ -1,93 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.util.LinkedList;
import java.util.Queue;
public class InputException {
/**
* The name of this exception.
*/
private final String name;
/**
* The codes associated with this exception.
*/
private final Queue<InputCode> codes;
/**
* Constructs a new {@link InputException} with the
* specified name.
*
* @param name the name of the new exception;
*/
public InputException(final String name) {
this.name = name;
codes = new LinkedList<InputCode>();
}
/**
* Adds a new code to this exception.
*
* @param c the code to add.
*/
public void add(InputCode c)
{
codes.offer(c);
}
/**
* Returns the name of this exception.
*
* @return the exception's name.
*/
public String getName() {
return name;
}
/**
* Returns the codes associated with this exception.
*
* @return the exception's codes.
*/
public Queue<InputCode> getCodes() {
return codes;
}
/**
* Returns a textual representation of this exception.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName()
+ "[name=" + name
+ ",codes=" + codes
+ "]";
}
}

View File

@ -1,559 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.Formatter;
import java.util.List;
import java.util.Queue;
public class MC {
private static final String VERSION = "1.0";
private static final List<String> SUN_EXCEPTION_GROUPS = Arrays.asList(new String[]
{ "SUNBASE", "ORBUTIL", "ACTIVATION", "NAMING", "INTERCEPTORS", "POA", "IOR", "UTIL" });
private static final List<String> EXCEPTIONS = Arrays.asList(new String[]
{ "UNKNOWN", "BAD_PARAM", "NO_MEMORY", "IMP_LIMIT", "COMM_FAILURE", "INV_OBJREF", "NO_PERMISSION",
"INTERNAL", "MARSHAL", "INITIALIZE", "NO_IMPLEMENT", "BAD_TYPECODE", "BAD_OPERATION", "NO_RESOURCES",
"NO_RESPONSE", "PERSIST_STORE", "BAD_INV_ORDER", "TRANSIENT", "FREE_MEM", "INV_IDENT", "INV_FLAG",
"INTF_REPOS", "BAD_CONTEXT", "OBJ_ADAPTER", "DATA_CONVERSION", "OBJECT_NOT_EXIST", "TRANSACTION_REQUIRED",
"TRANSACTION_ROLLEDBACK", "INVALID_TRANSACTION", "INV_POLICY", "CODESET_INCOMPATIBLE", "REBIND",
"TIMEOUT", "TRANSACTION_UNAVAILABLE", "BAD_QOS", "INVALID_ACTIVITY", "ACTIVITY_COMPLETED",
"ACTIVITY_REQUIRED" });
/**
* Read the minor codes from the input file and
* write out a resource file.
*
* @param inFile the file to read the codes from.
* @param outDir the directory to write the resource file to.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
private void makeResource(String inFile, String outDir)
throws FileNotFoundException, IOException {
writeResource(outDir, new Input(inFile));
}
/**
* Create a new Java source file using the specified Scheme input file,
* and writing the result to the given output directory.
*
* @param inFile the file to read the data from.
* @param outDir the directory to write the Java class to.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
private void makeClass(String inFile, String outDir)
throws FileNotFoundException, IOException {
writeClass(inFile, outDir, new Input(inFile));
}
/**
* Writes out a Java source file using the data from the given
* {@link Input} object. The result is written to {@code outDir}.
* The name of the input file is just used in the header of the
* resulting source file.
*
* @param inFile the name of the file the data was read from.
* @param outDir the directory to write the Java class to.
* @param input the parsed input data.
* @throws FileNotFoundException if the output file can't be written.
*/
private void writeClass(String inFile, String outDir, Input input)
throws FileNotFoundException {
String packageName = input.getPackageName();
String className = input.getClassName();
String groupName = input.getGroupName();
Queue<InputException> exceptions = input.getExceptions();
FileOutputStream file = new FileOutputStream(outDir + File.separator + className + ".java");
IndentingPrintWriter pw = new IndentingPrintWriter(file);
writeClassHeader(inFile, groupName, pw);
pw.printMsg("package @ ;", packageName);
pw.println();
pw.println("import java.util.logging.Logger ;");
pw.println("import java.util.logging.Level ;");
pw.println();
pw.println("import org.omg.CORBA.OMGVMCID ;");
pw.println( "import com.sun.corba.se.impl.util.SUNVMCID ;");
pw.println( "import org.omg.CORBA.CompletionStatus ;");
pw.println( "import org.omg.CORBA.SystemException ;");
pw.println();
pw.println( "import com.sun.corba.se.spi.orb.ORB ;");
pw.println();
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperFactory;");
pw.println();
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperBase;");
pw.println();
writeImports(exceptions, pw);
pw.println();
pw.indent();
pw.printMsg("public class @ extends LogWrapperBase {", className);
pw.println();
pw.printMsg("public @( Logger logger )", className);
pw.indent();
pw.println( "{");
pw.undent();
pw.println( "super( logger ) ;");
pw.println( "}");
pw.println();
pw.flush();
writeFactoryMethod(className, groupName, pw);
writeExceptions(groupName, exceptions, className, pw);
pw.undent();
pw.println( );
pw.println( "}");
pw.flush();
pw.close();
}
/**
* Writes out the header of a Java source file.
*
* @param inFile the input file the file was generated from.
* @param groupName the group of exceptions the Java source file is for.
* @param pw the print writer used to write the output.
*/
private void writeClassHeader(String inFile, String groupName,
IndentingPrintWriter pw) {
if (groupName.equals("OMG"))
pw.println("// Log wrapper class for standard exceptions");
else
pw.printMsg("// Log wrapper class for Sun private system exceptions in group @",
groupName);
pw.println("//");
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
pw.printMsg("// Generated from input file @ on @", inFile, new Date());
pw.println();
}
/**
* Write out the import list for the exceptions.
*
* @param groups the exceptions that were parsed.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeImports(Queue<InputException> exceptions,
IndentingPrintWriter pw) {
if (exceptions == null)
return;
for (InputException e : exceptions)
pw.println("import org.omg.CORBA." + e.getName() + " ;");
}
/**
* Write out the factory method for this group of exceptions.
*
* @param className the name of the generated class.
* @param groupName the name of this group of exceptions.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeFactoryMethod(String className, String groupName,
IndentingPrintWriter pw) {
pw.indent();
pw.println( "private static LogWrapperFactory factory = new LogWrapperFactory() {");
pw.println( "public LogWrapperBase create( Logger logger )" );
pw.indent();
pw.println( "{");
pw.undent();
pw.printMsg("return new @( logger ) ;", className);
pw.undent();
pw.println( "}" );
pw.println( "} ;" );
pw.println();
pw.printMsg("public static @ get( ORB orb, String logDomain )", className);
pw.indent();
pw.println( "{");
pw.indent();
pw.printMsg( "@ wrapper = ", className);
pw.indent();
pw.printMsg( "(@) orb.getLogWrapper( logDomain, ", className);
pw.undent();
pw.undent();
pw.printMsg( "\"@\", factory ) ;", groupName);
pw.undent();
pw.println( "return wrapper ;" );
pw.println( "} " );
pw.println();
pw.printMsg( "public static @ get( String logDomain )", className);
pw.indent();
pw.println( "{");
pw.indent();
pw.printMsg( "@ wrapper = ", className);
pw.indent();
pw.printMsg( "(@) ORB.staticGetLogWrapper( logDomain, ", className);
pw.undent();
pw.undent();
pw.printMsg( "\"@\", factory ) ;", groupName);
pw.undent();
pw.println( "return wrapper ;" );
pw.println( "} " );
pw.println();
}
/**
* Writes out the exceptions themselves.
*
* @param groupName the name of this group of exceptions.
* @param exceptions the exceptions to write out.
* @param className the name of the generated class.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeExceptions(String groupName, Queue<InputException> exceptions,
String className, IndentingPrintWriter pw) {
for (InputException e : exceptions) {
pw.println("///////////////////////////////////////////////////////////");
pw.printMsg("// @", e.getName());
pw.println("///////////////////////////////////////////////////////////");
pw.println();
for (InputCode c : e.getCodes())
writeMethods(groupName, e.getName(), c.getName(), c.getCode(),
c.getLogLevel(), className, StringUtil.countArgs(c.getMessage()), pw);
pw.flush();
}
}
/**
* Writes out the methods for a particular error.
*
* @param groupName the name of this group of exceptions.
* @param exceptionName the name of this particular exception.
* @param errorName the name of this particular error.
* @param code the minor code for this particular error.
* @param ident the name of the error in mixed-case identifier form.
* @param level the level at which to place log messages.
* @param className the name of the class for this group of exceptions.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethods(String groupName, String exceptionName, String errorName,
int code, String level, String className, int numParams,
IndentingPrintWriter pw) {
String ident = StringUtil.toMixedCase(errorName);
pw.printMsg("public static final int @ = @ ;", errorName, getBase(groupName, code));
pw.println();
pw.flush();
writeMethodStatusCause(groupName, exceptionName, errorName, ident, level,
numParams, className, pw);
pw.println();
pw.flush();
writeMethodStatus(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
writeMethodCause(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
writeMethodNoArgs(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
}
/**
* Writes out a method for an error that takes a
* {@link org.omg.CORBA.CompletionStatus} and a cause.
*
* @param groupName the name of this group of exceptions.
* @param exceptionName the name of this particular exception.
* @param errorName the name of this particular error.
* @param ident the name of the error in mixed-case identifier form.
* @param logLevel the level at which to place log messages.
* @param numParams the number of parameters the detail message takes.
* @param className the name of the class for this group of exceptions.
* @param pw the print writer for writing to the file.
*/
private void writeMethodStatusCause(String groupName, String exceptionName,
String errorName, String ident,
String logLevel, int numParams,
String className, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg( "public @ @( CompletionStatus cs, Throwable t@) {", exceptionName,
ident, makeDeclArgs(true, numParams));
pw.printMsg( "@ exc = new @( @, cs ) ;", exceptionName, exceptionName, errorName);
pw.indent();
pw.println( "if (t != null)" );
pw.undent();
pw.println( "exc.initCause( t ) ;" );
pw.println();
pw.indent();
pw.printMsg( "if (logger.isLoggable( Level.@ )) {", logLevel);
if (numParams > 0) {
pw.printMsg( "Object[] parameters = new Object[@] ;", numParams);
for (int a = 0; a < numParams; ++a)
pw.printMsg("parameters[@] = arg@ ;", a, a);
} else
pw.println( "Object[] parameters = null ;");
pw.indent();
pw.printMsg( "doLog( Level.@, \"@.@\",", logLevel, groupName, ident);
pw.undent();
pw.undent();
pw.printMsg( "parameters, @.class, exc ) ;", className);
pw.println( "}");
pw.println();
pw.undent();
pw.println( "return exc ;");
pw.println( "}");
}
/**
* Writes out a method for an error that takes a
* {@link org.omg.CORBA.CompletionStatus}.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodStatus(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( CompletionStatus cs@) {", exceptionName,
ident, makeDeclArgs(true, numParams));
pw.undent();
pw.printMsg("return @( cs, null@ ) ;", ident, makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Writes out a method for an error that takes a cause.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodCause(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( Throwable t@) {", exceptionName, ident,
makeDeclArgs(true, numParams));
pw.undent();
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, t@ ) ;", ident,
makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Writes out a method for an error that takes no arguments.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodNoArgs(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( @) {", exceptionName, ident,
makeDeclArgs(false, numParams));
pw.undent();
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, null@ ) ;",
ident, makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Returns a list of comma-separated arguments with type declarations.
*
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeDeclArgs(boolean leadingComma, int numArgs) {
return makeArgString("Object arg", leadingComma, numArgs);
}
/**
* Returns a list of comma-separated arguments without type declarations.
*
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeCallArgs(boolean leadingComma, int numArgs) {
return makeArgString("arg", leadingComma, numArgs);
}
/**
* Returns a list of comma-separated arguments.
*
* @param prefixString the string with which to prefix each argument.
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeArgString(String prefixString, boolean leadingComma,
int numArgs) {
if (numArgs == 0)
return " ";
if (numArgs == 1) {
if (leadingComma)
return ", " + prefixString + (numArgs - 1);
else
return " " + prefixString + (numArgs - 1);
}
return makeArgString(prefixString, leadingComma, numArgs - 1) +
", " + prefixString + (numArgs - 1);
}
/**
* Returns the {@link String} containing the calculation of the
* error code.
*
* @param groupName the group of exception to which the code belongs.
* @param code the minor code number representing the exception within the group.
* @return the unique error code.
*/
private String getBase(String groupName, int code) {
if (groupName.equals("OMG"))
return "OMGVMCID.value + " + code;
else
return "SUNVMCID.value + " + (code + getSunBaseNumber(groupName));
}
/**
* Returns the base number for Sun-specific exceptions.
*
* @return the base number.
*/
private int getSunBaseNumber(String groupName) {
return 200 * SUN_EXCEPTION_GROUPS.indexOf(groupName);
}
/**
* Writes out a resource file using the data from the given
* {@link Input} object. The result is written to {@code outDir}.
*
* @param outDir the directory to write the Java class to.
* @param input the parsed input data.
* @throws FileNotFoundException if the output file can't be written.
*/
private void writeResource(String outDir, Input input)
throws FileNotFoundException {
FileOutputStream file = new FileOutputStream(outDir + File.separator +
input.getClassName() + ".resource");
IndentingPrintWriter pw = new IndentingPrintWriter(file);
String groupName = input.getGroupName();
for (InputException e : input.getExceptions()) {
String exName = e.getName();
for (InputCode c : e.getCodes()) {
String ident = StringUtil.toMixedCase(c.getName());
pw.printMsg("@.@=\"@: (@) @\"", groupName, ident,
getMessageID(groupName, exName, c.getCode()), exName, c.getMessage());
}
pw.flush();
}
pw.close();
}
/**
* Returns the message ID corresponding to the given group name,
* exception name and error code.
*
* @param groupName the name of the group of exceptions.
* @param exception the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getMessageID(String groupName, String exceptionName, int code) {
if (groupName.equals("OMG"))
return getStandardMessageID(exceptionName, code);
else
return getSunMessageID(groupName, exceptionName, code);
}
/**
* Returns the standard (OMG) message ID corresponding to the given
* exception name and error code.
*
* @param exceptionName the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getStandardMessageID(String exceptionName, int code) {
return new Formatter().format("IOP%s0%04d", getExceptionID(exceptionName),
code).toString();
}
/**
* Returns the Sun message ID corresponding to the given group name,
* exception name and error code.
*
* @param groupName the name of the group of exceptions.
* @param exceptionName the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getSunMessageID(String groupName, String exceptionName, int code) {
return new Formatter().format("IOP%s1%04d", getExceptionID(exceptionName),
getSunBaseNumber(groupName) + code).toString();
}
/**
* Returns the exception ID corresponding to the given exception name.
*
* @param exceptionName the name of the particular exception.
* @return the message ID.
*/
private String getExceptionID(String exceptionName) {
return new Formatter().format("%03d", EXCEPTIONS.indexOf(exceptionName)).toString();
}
/**
* Entry point for running the generator from the command
* line. Users can specify either "make-class" or "make-resource"
* as the first argument to generate the specified type of file.
*
* @param args the command-line arguments.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
public static void main(String[] args)
throws FileNotFoundException, IOException
{
if (args.length < 3)
{
System.err.println("(make-class|make-resource) <input file> <output dir>");
System.exit(-1);
}
if (args[0].equals("make-class"))
new MC().makeClass(args[1], args[2]);
else if (args[0].equals("make-resource"))
new MC().makeResource(args[1], args[2]);
else
System.err.println("Invalid command: " + args[0]);
}
}

View File

@ -1,62 +0,0 @@
/*
* Copyright (c) 2003, 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.
*/
package build.tools.logutil;
public abstract class StringUtil {
/** Take a string containing underscores, and return a string
* with the underscore removed, and all characters exception in lower
* case except the characters after the underscores.
*/
public static String toMixedCase( String str )
{
StringBuffer sbuf = new StringBuffer( str.length() ) ;
boolean uppercaseNext = false ;
for (int ctr=0; ctr<str.length(); ctr++) {
char ch = str.charAt( ctr ) ;
if (ch == '_') {
uppercaseNext = true ;
} else if (uppercaseNext) {
sbuf.append( Character.toUpperCase( ch ) ) ;
uppercaseNext = false ;
} else {
sbuf.append( Character.toLowerCase( ch ) ) ;
}
}
return sbuf.toString() ;
}
public static int countArgs( String str )
{
int result = 0 ;
for( int ctr = 0; ctr<str.length(); ctr++ )
if (str.charAt(ctr) == '{')
result++ ;
return result ;
}
}

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

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -23,7 +23,7 @@
# questions.
#
##########################################################################################
################################################################################
#
# This Makefile, together with Tools.gmk, can be used to compile a set of
# gcc based cross compilation, portable, self contained packages, capable
@ -31,60 +31,55 @@
#
# In addition to the makefiles, access to Oracle Linux installation
# media is required. This has been tested against Oracle Enterprise Linux
# 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
# to directory containing the RPMs.
# 6.4.
#
# By default this Makefile will build crosstools for:
# * i686-unknown-linux-gnu
# * x86_64-unknown-linux-gnu
# The x86_64 version of the compilers will work in multi arch mode and will
# be able to compile 32bit binaries with the -m32 flag. This makes the
# explicit cross compiler for i686 somewhat redundant and is a known issue.
# By default this Makefile will build a native toolchain for the current
# platform if called with something like this:
#
# To build the full set of crosstools, use a command line looking like this:
# make tars
#
# make tars RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
# To build the full set of crosstools for additional platforms, use a command
# line looking like this:
#
# To create a x86_64 package without the redundant i686 cross compiler, do
# like this:
# make tars platforms="x86_64-unknown-linux-gnu sparc64-unknown-linux-gnu"
#
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
#
# Main makefile which iterates over all host and target platforms.
# This is the makefile which iterates over all host and target platforms.
#
os := $(shell uname -o)
cpu := x86_64
#$(shell uname -p)
#
# This wrapper script can handle exactly these platforms
#
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
cpu := $(shell uname -p)
# Figure out what platform this is building on.
me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
$(info Building on platform $(me))
#
# By default just build for the current platform, which is assumed to be Linux
#
platforms := $(me)
host_platforms := $(platforms)
target_platforms := $(platforms)
$(info host_platforms $(host_platforms))
$(info target_platforms $(target_platforms))
all compile : $(platforms)
ifeq (,$(SKIP_ME))
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
endif
OUTPUTDIR = $(abspath ../../build/devkit)
RESULT = $(OUTPUTDIR)/result
OUTPUT_ROOT = $(abspath ../../build/devkit)
RESULT = $(OUTPUT_ROOT)/result
submakevars = HOST=$@ BUILD=$(me) \
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
OUTPUTDIR=$(OUTPUTDIR)
$(platforms) :
OUTPUT_ROOT=$(OUTPUT_ROOT)
$(host_platforms) :
@echo 'Building compilers for $@'
@echo 'Targets: $(platforms)'
for p in $@ $(filter-out $@,$(platforms)); do \
@echo 'Targets: $(target_platforms)'
for p in $(filter $@, $(target_platforms)) $(filter-out $@, $(target_platforms)); do \
$(MAKE) -f Tools.gmk download-rpms $(submakevars) TARGET=$$p && \
$(MAKE) -f Tools.gmk all $(submakevars) \
TARGET=$$p || exit 1 ; \
done
@ -92,12 +87,8 @@ $(platforms) :
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
@echo 'All done"'
$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
ia32 : i686
today := $(shell date +%Y%m%d)
define Mktar
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
$$($(1)_tar) : PLATFORM = $(1)
@ -105,7 +96,7 @@ define Mktar
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
endef
$(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
$(foreach p,$(host_platforms),$(eval $(call Mktar,$(p))))
tars : all $(TARFILES)
onlytars : $(TARFILES)
@ -115,7 +106,9 @@ onlytars : $(TARFILES)
touch $@
clean :
rm -rf build result
rm -rf $(addprefix ../../build/devkit/, result $(host_platforms))
dist-clean: clean
rm -rf $(addprefix ../../build/devkit/, src download)
FORCE :
.PHONY : $(configs) $(platforms)
.PHONY : all compile tars $(configs) $(host_platforms) clean dist-clean

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -44,24 +44,42 @@ $(info HOST=$(HOST))
$(info BUILD=$(BUILD))
ARCH := $(word 1,$(subst -, ,$(TARGET)))
$(info ARCH=$(ARCH))
##########################################################################################
# Define external dependencies
# Latest that could be made to work.
gcc_ver := gcc-4.9.2
binutils_ver := binutils-2.25
ccache_ver := ccache-3.2.1
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1
GCC_VER := 7.3.0
ifeq ($(GCC_VER), 7.3.0)
gcc_ver := gcc-7.3.0
binutils_ver := binutils-2.30
ccache_ver := ccache-3.3.6
mpfr_ver := mpfr-3.1.5
gmp_ver := gmp-6.1.2
mpc_ver := mpc-1.0.3
gdb_ver := gdb-8.1
else ifeq ($(GCC_VER), 4.9.2)
gcc_ver := gcc-4.9.2
binutils_ver := binutils-2.25
ccache_ver := ccache-3.2.1
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1
gdb_ver := gdb-7.12.1
else
$(error Unsupported GCC version)
endif
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.xz
CCACHE := https://samba.org/ftp/ccache/$(ccache_ver).tar.xz
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
OEL_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
# RPMs in OEL6.4
LINUX_VERSION := OEL6.4
@ -85,30 +103,9 @@ RPM_LIST := \
libgcc \
zlib zlib-devel \
libffi libffi-devel \
fontconfig fontconfig-devel
ifeq ($(ARCH),x86_64)
RPM_DIR ?= $(RPM_DIR_x86_64)
RPM_ARCHS := x86_64 noarch
ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode.
RPM_ARCHS += i386 i686
endif
endif
else
RPM_DIR ?= $(RPM_DIR_i686)
RPM_ARCHS := i386 i686
endif
# Sort to remove duplicates
RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
#$(info RPM_FILE_LIST $(RPM_FILE_LIST))
ifeq ($(RPM_FILE_LIST),)
$(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
endif
fontconfig fontconfig-devel \
systemtap-sdt-devel \
#
##########################################################################################
# Define common directories and files
@ -122,13 +119,14 @@ else
endif
# Define directories
RESULT := $(OUTPUTDIR)/result
BUILDDIR := $(OUTPUTDIR)/$(HOST)/$(TARGET)
RESULT := $(OUTPUT_ROOT)/result
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
PREFIX := $(RESULT)/$(HOST)
TARGETDIR := $(PREFIX)/$(TARGET)
SYSROOT := $(TARGETDIR)/sysroot
DOWNLOAD := $(OUTPUTDIR)/download
SRCDIR := $(OUTPUTDIR)/src
DOWNLOAD := $(OUTPUT_ROOT)/download
DOWNLOAD_RPMS := $(DOWNLOAD)/rpms
SRCDIR := $(OUTPUT_ROOT)/src
# Marker file for unpacking rpms
rpms := $(SYSROOT)/rpms_unpacked
@ -136,6 +134,16 @@ rpms := $(SYSROOT)/rpms_unpacked
# Need to patch libs that are linker scripts to use non-absolute paths
libs := $(SYSROOT)/libs_patched
################################################################################
# Download RPMs
download-rpms:
mkdir -p $(DOWNLOAD_RPMS)
# Only run this if rpm dir is empty.
ifeq ($(wildcard $(DOWNLOAD_RPMS)/*.rpm), )
cd $(DOWNLOAD_RPMS) && \
wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(OEL_URL)
endif
##########################################################################################
# Unpack source packages
@ -147,7 +155,7 @@ define Download
$$($(1)_CFG) : $$($(1)_FILE)
mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
tar -C $$(SRCDIR) -xf $$<
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
echo PATCHING $$(p) ; \
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
@ -159,15 +167,32 @@ define Download
endef
# Download and unpack all source packages
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
##########################################################################################
# Unpack RPMS
ifeq ($(ARCH),x86_64)
RPM_ARCHS := x86_64 noarch
ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode.
RPM_ARCHS += i386 i686
endif
endif
else ifeq ($(ARCH),i686))
RPM_ARCHS := i386 i686
else
RPM_ARCHS := $(ARCH)
endif
RPM_FILE_LIST := $(sort $(foreach a, $(RPM_ARCHS), \
$(wildcard $(patsubst %,$(DOWNLOAD_RPMS)/%*$a.rpm,$(RPM_LIST))) \
))
# Note. For building linux you should install rpm2cpio.
define unrpm
$(SYSROOT)/$(notdir $(1)).unpacked \
: $(1)
$(SYSROOT)/$(notdir $(1)).unpacked : $(1)
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
endef
@ -210,19 +235,20 @@ $(libs) : $(rpms)
##########################################################################################
# Create links for ffi header files so that they become visible by default when using the
# devkit.
ifeq ($(ARCH), x86_64)
$(SYSROOT)/usr/include/ffi.h: $(rpms)
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffi.h: $(rpms)
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
endif
##########################################################################################
# Define marker files for each source package to be compiled
$(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
##########################################################################################
@ -234,7 +260,8 @@ CONFIG = --target=$(TARGET) \
PATHEXT = $(RESULT)/$(BUILD)/bin:
PATHPRE = PATH=$(PATHEXT)$(PATH)
BUILDPAR = -j16
NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor)
BUILDPAR = -j$(NUM_CORES)
# Default commands to when making
MAKECMD =
@ -317,6 +344,8 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
--disable-nls \
--program-prefix=$(TARGET)- \
--enable-multilib \
--enable-gold \
--enable-plugins \
) > $(@D)/log.config 2>&1
@echo 'done'
@ -392,7 +421,6 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
--with-sysroot=$(SYSROOT) \
--enable-languages=c,c++ \
--enable-shared \
--enable-multilib \
--disable-nls \
--with-gnu-as \
--with-gnu-ld \
@ -410,6 +438,23 @@ $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
$(mpfr) : $(gmp)
$(mpc) : $(gmp) $(mpfr)
################################################################################
# Build gdb but only where host and target match
ifeq ($(HOST), $(TARGET))
$(BUILDDIR)/$(gdb_ver)/Makefile: $(GDB_CFG)
$(info Configuring $@. Log in $(@D)/log.config)
mkdir -p $(@D)
( \
cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
$(CONFIG) \
--with-sysroot=$(SYSROOT) \
) > $(@D)/log.config 2>&1
@echo 'done'
$(gdb): $(gcc)
endif
##########################################################################################
# very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \
@ -434,7 +479,7 @@ ifeq ($(HOST),$(TARGET))
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
then \
cd $(PREFIX)/bin && \
ln -s $$f $(TARGET)-$$f ; \
ln -fs $$f $(TARGET)-$$f ; \
fi \
done
@touch $@
@ -451,7 +496,7 @@ ifeq ($(HOST),$(TARGET))
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
mkdir -p $(TARGETDIR)/$(l) && \
cd $(TARGETDIR)/$(l)/ && \
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
ln -fs $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
fi \
done;)
@echo 'done'
@ -471,6 +516,7 @@ $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
@echo -n 'installing...'
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
@mkdir -p $(@D)
@touch $@
@echo 'done'
@ -486,17 +532,38 @@ $(PREFIX)/devkit.info: FRC
echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@
##########################################################################################
# Copy these makefiles into the root of the kit
$(PREFIX)/Makefile: ./Makefile
rm -rf $@
cp $< $@
$(PREFIX)/Tools.gmk: ./Tools.gmk
rm -rf $@
cp $< $@
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk
##########################################################################################
ifeq ($(TARGET), $(HOST))
# To build with dtrace support, the build needs access to the dtrace executable from the
# sysroot. Generally we don't want to add binaries in the sysroot to the path, but
# luckily this seems to execute well enough on a different host Linux distro, so symlink
# it into the main bin dir.
$(PREFIX)/bin/dtrace:
@echo 'Creating dtrace soft link'
ln -s ../$(HOST)/sysroot/usr/bin/dtrace $@
$(PREFIX)/bin/%:
@echo 'Creating missing $* soft link'
ln -s $(TARGET)-$* $@
missing-links := $(addprefix $(PREFIX)/bin/, \
addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
size strings strip)
size strings strip ld.bfd ld.gold dtrace)
endif
##########################################################################################
@ -507,7 +574,9 @@ rpms : $(rpms)
libs : $(libs)
sysroot : rpms libs
gcc : sysroot $(gcc) $(gccpatch)
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS)
gdb : $(gdb)
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS) \
$(THESE_MAKEFILES) gdb
# this is only built for host. so separate.
ccache : $(ccache)

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

@ -1,148 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2015, 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 creates a devkit for building OpenJDK on Solaris by copying
# part of a Solaris Studio installation and cretaing a sysroot by installing
# a limited set of system packages. It is assumed that a suitable pkg
# publisher is configured for the system where the script is executed.
#
# The Solaris Studio installation must contain at least these packages:
# developer/solarisstudio-124/backend 12.4-1.0.6.0 i--
# developer/solarisstudio-124/c++ 12.4-1.0.10.0 i--
# developer/solarisstudio-124/cc 12.4-1.0.4.0 i--
# developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0 i--
# developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1 i--
# developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-common 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-ja 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-legal 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1 i--
# In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
# version.
#
# erik.joelsson@oracle.com
USAGE="$0 <Solaris Studio installation> <Path to gnu make binary>"
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo $USAGE
exit 1
fi
SOLARIS_STUDIO_VERSION=12u4
SOLARIS_VERSION=11u1
case `uname -p` in
i*)
ARCH=x86
;;
sparc*)
ARCH=sparc
;;
esac
SOLARIS_STUDIO_SRC=$1
GNU_MAKE=$2
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
INSTALL_ROOT=${BUILD_DIR}/install-root
SYSROOT=${DEVKIT_ROOT}/sysroot
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
# Extract the publisher from the system
if [ -z "${PUBLISHER_URI}" ]; then
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
fi
if [ ! -d $INSTALL_ROOT ]; then
echo "Creating $INSTALL_ROOT and installing packages"
pkg image-create $INSTALL_ROOT
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
pkg -R $INSTALL_ROOT install --accept $(cat solaris11.1-package-list.txt)
else
echo "Skipping installing packages"
fi
if [ ! -d $SYSROOT ]; then
echo "Copying from $INSTALL_ROOT to $SYSROOT"
mkdir -p $SYSROOT
cp -rH $INSTALL_ROOT/lib $SYSROOT/
mkdir $SYSROOT/usr $DEVKIT_ROOT/gnu
# Some of the tools in sysroot are needed in the OpenJDK build but cannot be
# run from their current location due to relative runtime paths in the
# binaries. Move the sysroot/usr/bin directory to the outer bin and have them
# be runnable from there to force them to link to the system libraries
cp -rH $INSTALL_ROOT/usr/bin $DEVKIT_ROOT
cp -rH $INSTALL_ROOT/usr/gnu/bin $DEVKIT_ROOT/gnu/
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
else
echo "Skipping copying to $SYSROOT"
fi
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
cp -rH $SOLARIS_STUDIO_SRC ${SOLARIS_STUDIO_DIR%/*}
mv ${SOLARIS_STUDIO_DIR%/*}/${SOLARIS_STUDIO_SRC##*/} $SOLARIS_STUDIO_DIR
# Solaris Studio 12.4 requires /lib/libmmheap.so.1 to run, but this lib is not
# installed by default on all Solaris systems. Sneak it in from the sysroot to
# make it run OOTB on more systems.
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
else
echo "Skipping copying of Solaris Studio"
fi
echo "Copying gnu make to $DEVKIT_ROOT/bin"
mkdir -p $DEVKIT_ROOT/bin
cp $GNU_MAKE $DEVKIT_ROOT/bin/
if [ ! -e $DEVKIT_ROOT/bin/gmake ]; then
ln -s make $DEVKIT_ROOT/bin/gmake
fi
# Create the devkit.info file
echo Creating devkit.info
INFO_FILE=$DEVKIT_ROOT/devkit.info
rm -f $INFO_FILE
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
if [ ! -e $BUNDLE ]; then
echo "Creating $BUNDLE from $DEVKIT_ROOT"
cd $DEVKIT_ROOT/..
tar zcf $BUNDLE $DEVKIT_NAME
else
echo "Skipping creation of $BUNDLE"
fi

View File

@ -0,0 +1,184 @@
#!/bin/bash
#
# Copyright (c) 2015, 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 creates a devkit for building OpenJDK on Solaris by copying
# part of a Solaris Studio installation and cretaing a sysroot by installing
# a limited set of system packages. It is assumed that a suitable pkg
# publisher is configured for the system where the script is executed.
#
# The Solaris Studio installation must contain at least these packages:
# developer/solarisstudio-124/backend 12.4-1.0.6.0 i--
# developer/solarisstudio-124/c++ 12.4-1.0.10.0 i--
# developer/solarisstudio-124/cc 12.4-1.0.4.0 i--
# developer/solarisstudio-124/library/c++-libs 12.4-1.0.10.0 i--
# developer/solarisstudio-124/library/math-libs 12.4-1.0.0.1 i--
# developer/solarisstudio-124/library/studio-gccrt 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-common 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-ja 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-legal 12.4-1.0.0.1 i--
# developer/solarisstudio-124/studio-zhCN 12.4-1.0.0.1 i--
# In particular backend 12.4-1.0.6.0 contains a critical patch for the sparc
# version.
#
# erik.joelsson@oracle.com
USAGE="$0 <Solaris Studio installation> <Path to gnu make binary>"
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo $USAGE
exit 1
fi
SOLARIS_STUDIO_VERSION=12u4
SOLARIS_VERSION=11u1
case `uname -p` in
i*)
ARCH=x86
;;
sparc*)
ARCH=sparc
;;
esac
SOLARIS_STUDIO_SRC=$1
GNU_MAKE=$2
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION
INSTALL_ROOT_TOOLS=${BUILD_DIR}/install-root-tools-$SOLARIS_VERSION
SYSROOT=${DEVKIT_ROOT}/sysroot
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
# Extract the publisher from the system
if [ -z "${PUBLISHER_URI}" ]; then
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
fi
if [ ! -d $INSTALL_ROOT ]; then
echo "Creating $INSTALL_ROOT and installing packages"
pkg image-create $INSTALL_ROOT
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
pkg -R $INSTALL_ROOT install --accept $(cat solaris11.1-package-list.txt)
else
echo "Skipping installing packages"
fi
# Since we have implicitly been running 11.2 tools for a long time, we need
# to pick them for the tools dir in the devkit. Create a separate install-root
# for it.
if [ ! -d $INSTALL_ROOT_TOOLS ]; then
echo "Creating $INSTALL_ROOT_TOOLS and installing packages"
pkg image-create $INSTALL_ROOT_TOOLS
pkg -R $INSTALL_ROOT_TOOLS set-publisher -P -g ${PUBLISHER_URI} solaris
sudo pkg -R $INSTALL_ROOT_TOOLS install --accept \
entire@0.5.11-0.175.2.5.0.5.0 \
system/linker \
developer/base-developer-utilities \
developer/gnu-binutils
else
echo "Skipping installing tools packages"
fi
if [ ! -d $SYSROOT ]; then
echo "Copying from $INSTALL_ROOT to $SYSROOT"
mkdir -p $SYSROOT
cp -rH $INSTALL_ROOT/lib $SYSROOT/
mkdir $SYSROOT/usr
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
else
echo "Skipping copying to $SYSROOT"
fi
if [ ! -d $DEVKIT_ROOT/tools ]; then
echo "Copying from $INSTALL_ROOT_TOOLS to $DEVKIT_ROOT/tools"
# Some of the tools in sysroot are needed in the OpenJDK build. We need
# to copy them into a tools dir, including their specific libraries.
mkdir -p $DEVKIT_ROOT/tools/usr/bin/sparcv9 $DEVKIT_ROOT/tools/lib/sparcv9 \
$DEVKIT_ROOT/tools/usr/gnu/bin
cp $INSTALL_ROOT_TOOLS/usr/bin/{ar,nm,strip,ld,ldd} \
$DEVKIT_ROOT/tools/usr/bin/
cp $INSTALL_ROOT_TOOLS/usr/bin/sparcv9/{ar,nm,strip,ld,ldd} \
$DEVKIT_ROOT/tools/usr/bin/sparcv9/
cp $INSTALL_ROOT_TOOLS/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/
cp $INSTALL_ROOT_TOOLS/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/
cp -rH $INSTALL_ROOT_TOOLS/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/
cp $INSTALL_ROOT_TOOLS/lib/{libelf.so*,libld.so*,liblddbg.so*} \
$DEVKIT_ROOT/tools/lib/
cp $INSTALL_ROOT_TOOLS/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} \
$DEVKIT_ROOT/tools/lib/sparcv9/
for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do
if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then
ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t
fi
done
else
echo "Skipping copying to tools dir $DEVKIT_ROOT/tools"
fi
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
mkdir -p ${SOLARIS_STUDIO_DIR}
cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/
# Solaris Studio 12.4 requires /lib/libmmheap.so.1 to run, but this lib is not
# installed by default on all Solaris systems. Sneak it in from the sysroot to
# make it run OOTB on more systems.
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
else
echo "Skipping copying of Solaris Studio"
fi
echo "Copying gnu make to $DEVKIT_ROOT/bin"
cp $GNU_MAKE $DEVKIT_ROOT/tools/usr/bin/
if [ ! -e $DEVKIT_ROOT/tools/usr/bin/gmake ]; then
ln -s make $DEVKIT_ROOT/tools/usr/bin/gmake
fi
# Create the devkit.info file
echo Creating devkit.info
INFO_FILE=$DEVKIT_ROOT/devkit.info
rm -f $INFO_FILE
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
if [ ! -e $BUNDLE ]; then
echo "Creating $BUNDLE from $DEVKIT_ROOT"
cd $DEVKIT_ROOT/..
tar zcf $BUNDLE $DEVKIT_NAME
else
echo "Skipping creation of $BUNDLE"
fi

View File

@ -0,0 +1,167 @@
#!/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 creates a devkit for building OpenJDK on Solaris by copying
# part of a Solaris Studio installation and cretaing a sysroot by installing
# a limited set of system packages. It is assumed that a suitable pkg
# publisher is configured for the system where the script is executed.
#
# Note that you will need to be able to sudo to root to run the pkg install
# part of this script. It should not affect the running system, but only
# install in a separate temporary image.
#
# The Solaris Studio installation must contain at least these packages:
# developer/developerstudio-126/backend 12.6-1.0.0.0 i--
# developer/developerstudio-126/c++ 12.6-1.0.0.0 i--
# developer/developerstudio-126/cc 12.6-1.0.0.0 i--
# developer/developerstudio-126/dbx (solarisstudio) 12.6-1.0.0.0 i--
# developer/developerstudio-126/library/c++-libs 12.6-1.0.0.0 i--
# developer/developerstudio-126/library/math-libs 12.6-1.0.0.0 i--
# developer/developerstudio-126/library/c-libs 12.6-1.0.0.0 i--
# developer/developerstudio-126/library/studio-gccrt 12.6-1.0.0.0 i--
# developer/developerstudio-126/studio-common 12.6-1.0.0.0 i--
# developer/developerstudio-126/studio-ja 12.6-1.0.0.0 i--
# developer/developerstudio-126/studio-legal 12.6-1.0.0.0 i--
# developer/developerstudio-126/studio-zhCN 12.6-1.0.0.0 i--
#
# erik.joelsson@oracle.com
USAGE="$0 <Solaris Studio installation>"
if [ "$1" = "" ]; then
echo $USAGE
exit 1
fi
SOLARIS_STUDIO_VERSION=12u6
SOLARIS_VERSION=11u3
SOLARIS_ENTIRE_VERSION=0.5.11-0.175.3.20.0.6.0
case `uname -p` in
i*)
ARCH=x86
;;
sparc*)
ARCH=sparc
;;
esac
SOLARIS_STUDIO_SRC=$1
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION}
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME}
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME}
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION
SYSROOT=${DEVKIT_ROOT}/sysroot
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION}
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR}
# Extract the publisher from the system
if [ -z "${PUBLISHER_URI}" ]; then
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')"
fi
if [ ! -d $INSTALL_ROOT ]; then
echo "Creating $INSTALL_ROOT and installing packages"
pkg image-create $INSTALL_ROOT
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris
sudo pkg -R $INSTALL_ROOT install --accept entire@$SOLARIS_ENTIRE_VERSION \
system/install developer/gnu-binutils system/library/mmheap system/picl \
developer/assembler
else
echo "Skipping installing packages"
fi
if [ ! -d $SYSROOT ]; then
echo "Copying from $INSTALL_ROOT to $SYSROOT"
mkdir -p $SYSROOT
cp -rH $INSTALL_ROOT/lib $SYSROOT/
mkdir $SYSROOT/usr
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt
else
echo "Skipping copying to $SYSROOT"
fi
if [ ! -d $DEVKIT_ROOT/tools ]; then
# Some of the tools in sysroot are needed in the OpenJDK build. We need
# to copy them into a tools dir, including their specific libraries.
mkdir -p $DEVKIT_ROOT/tools/usr/bin $DEVKIT_ROOT/tools/lib/sparcv9 \
$DEVKIT_ROOT/tools/usr/gnu/bin $DEVKIT_ROOT/tools/usr/bin/sparcv9
cp $INSTALL_ROOT/usr/bin/{as,ar,nm,strip,ld,pigz,ldd} \
$DEVKIT_ROOT/tools/usr/bin/
cp $INSTALL_ROOT/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/
cp $INSTALL_ROOT/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/
cp -rH $INSTALL_ROOT/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/
cp $INSTALL_ROOT/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} $DEVKIT_ROOT/tools/lib/sparcv9/
for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do
if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then
ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t
fi
done
else
echo "Skipping copying to tools dir $DEVKIT_ROOT/tools"
fi
if [ ! -d $SOLARIS_STUDIO_DIR ]; then
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC"
mkdir -p ${SOLARIS_STUDIO_DIR}
cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/
# Solaris Studio 12.6 requires libmmheap.so.1 and libsunmath.so.1 to run, but
# these libs are not installed by default on all Solaris systems.
# Sneak them in from the sysroot to make it run OOTB on more systems.
cp $SYSROOT/lib/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
cp $SYSROOT/lib/sparcv9/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/
cp $SYSROOT/lib/sparcv9/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/
else
echo "Skipping copying of Solaris Studio"
fi
# Create the devkit.info file
echo Creating devkit.info
INFO_FILE=$DEVKIT_ROOT/devkit.info
rm -f $INFO_FILE
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE
if [ ! -e $BUNDLE ]; then
GZIP=$(command -v pigz)
if [ -z "$GZIP" ]; then
GZIP="gzip"
fi
echo "Creating $BUNDLE from $DEVKIT_ROOT"
(cd $DEVKIT_ROOT && tar cf - . | $GZIP - > "$BUNDLE")
else
echo "Skipping creation of $BUNDLE"
fi

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

@ -1,242 +0,0 @@
#
# Copyright (c) 2014, 2016, 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.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include IdlCompilation.gmk
include SetupJavaCompilers.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_CORBA, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(TOPDIR)/make/corba/src/classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes))
TOOL_LOGUTIL_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes \
build.tools.logutil.MC
$(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(TOPDIR)/src/java.corba/share/classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/idlj_classes, \
COPY := .prp, \
INCLUDES := com/sun/tools/corba/se/idl, \
EXCLUDE_FILES := ResourceBundleUtil.java module-info.java))
# Force the language to english for predictable source code generation.
TOOL_IDLJ_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/idlj_classes \
-Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
################################################################################
EXCEPTION_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging
LOGWRAPPER_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/_logwrappers
# Generate LogWrapper classes
$(EXCEPTION_DIR)/%SystemException.java: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(call LogInfo, Generating class file from $*.mc)
$(call MakeDir, $(@D))
$(RM) -f $(@D)/_the_wrappers.d
$(TOOL_LOGUTIL_CMD) make-class $< $(@D)
# Generate LogWrapper properties file by concatening resource files
$(EXCEPTION_DIR)/LogStrings.properties: \
$(LOGWRAPPER_DIR)/ActivationSystemException.resource \
$(LOGWRAPPER_DIR)/IORSystemException.resource \
$(LOGWRAPPER_DIR)/InterceptorsSystemException.resource \
$(LOGWRAPPER_DIR)/NamingSystemException.resource \
$(LOGWRAPPER_DIR)/OMGSystemException.resource \
$(LOGWRAPPER_DIR)/ORBUtilSystemException.resource \
$(LOGWRAPPER_DIR)/POASystemException.resource \
$(LOGWRAPPER_DIR)/UtilSystemException.resource
$(call LogInfo, Concatenating 8 resource files into $(@F))
$(call MakeDir, $(@D))
$(CAT) $^ > $@
# The resources files are generated from lisp-like .mc files.
$(LOGWRAPPER_DIR)/%SystemException.resource: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(call LogInfo, Generating resource file from $*.mc)
$(call MakeDir, $(@D))
$(RM) -f $(@D)/_the_wrappers.d
$(TOOL_LOGUTIL_CMD) make-resource $< $(@D)
LOGWRAPPER_TARGETS := \
$(EXCEPTION_DIR)/ActivationSystemException.java \
$(EXCEPTION_DIR)/IORSystemException.java \
$(EXCEPTION_DIR)/InterceptorsSystemException.java \
$(EXCEPTION_DIR)/NamingSystemException.java \
$(EXCEPTION_DIR)/OMGSystemException.java \
$(EXCEPTION_DIR)/ORBUtilSystemException.java \
$(EXCEPTION_DIR)/POASystemException.java \
$(EXCEPTION_DIR)/UtilSystemException.java \
$(EXCEPTION_DIR)/LogStrings.properties
################################################################################
# Build the IDLs.
IDL_DELETES := \
org/omg/DynamicAny/*POA* \
org/omg/DynamicAny/*Holder* \
org/omg/DynamicAny/DynValueBoxHelper.java \
org/omg/DynamicAny/DynValueCommonHelper.java \
org/omg/DynamicAny/_DynValueCommonStub.java \
org/omg/DynamicAny/_DynValueBoxStub.java \
org/omg/DynamicAny/DynAnyPackage/TypeMismatchHolder.java \
org/omg/DynamicAny/DynAnyPackage/InvalidValueHolder.java \
org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHolder.java \
org/omg/IOP/BI_DIR_IIOP.java \
org/omg/IOP/ChainBypassCheck.java \
org/omg/IOP/ChainBypassInfo.java \
org/omg/IOP/FORWARDED_IDENTITY.java \
org/omg/IOP/INVOCATION_POLICIES.java \
org/omg/IOP/LogicalThreadId.java \
org/omg/IOP/SendingContextRunTime.java \
org/omg/IOP/UnknownExceptionInfo.java \
org/omg/IOP/TaggedComponentSeqHolder.java \
org/omg/PortableServer/CurrentPackage/NoContextHolder.java \
org/omg/PortableServer/ForwardRequestHolder.java \
org/omg/PortableServer/IdAssignmentPolicyValueHelper.java \
org/omg/PortableServer/IdAssignmentPolicyValueHolder.java \
org/omg/PortableServer/IdUniquenessPolicyValueHelper.java \
org/omg/PortableServer/IdUniquenessPolicyValueHolder.java \
org/omg/PortableServer/ImplicitActivationPolicyValueHelper.java \
org/omg/PortableServer/ImplicitActivationPolicyValueHolder.java \
org/omg/PortableServer/LifespanPolicyValueHelper.java \
org/omg/PortableServer/LifespanPolicyValueHolder.java \
org/omg/PortableServer/ServantRetentionPolicyValueHelper.java \
org/omg/PortableServer/ServantRetentionPolicyValueHolder.java \
org/omg/PortableServer/ObjectIdHelper.java \
org/omg/PortableServer/ObjectIdHolder.java \
org/omg/PortableServer/POAListHelper.java \
org/omg/PortableServer/POAListHolder.java \
org/omg/PortableServer/POAManagerPackage/AdapterInactiveHolder.java \
org/omg/PortableServer/POAManagerPackage/StateHelper.java \
org/omg/PortableServer/POAManagerPackage/StateHolder.java \
org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHolder.java \
org/omg/PortableServer/POAPackage/AdapterNonExistentHolder.java \
org/omg/PortableServer/POAPackage/InvalidPolicyHolder.java \
org/omg/PortableServer/POAPackage/NoServantHolder.java \
org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHolder.java \
org/omg/PortableServer/POAPackage/ObjectNotActiveHolder.java \
org/omg/PortableServer/POAPackage/ServantAlreadyActiveHolder.java \
org/omg/PortableServer/POAPackage/ServantNotActiveHolder.java \
org/omg/PortableServer/POAPackage/WrongAdapterHolder.java \
org/omg/PortableServer/POAPackage/WrongPolicyHolder.java \
org/omg/PortableServer/RequestProcessingPolicyValueHelper.java \
org/omg/PortableServer/RequestProcessingPolicyValueHolder.java \
org/omg/PortableServer/ServantActivatorHolder.java \
org/omg/PortableServer/ServantLocatorHolder.java \
org/omg/PortableServer/ThreadPolicyValueHelper.java \
org/omg/PortableServer/ThreadPolicyValueHolder.java \
org/omg/PortableInterceptor/ClientRequestInfoHelper.java \
org/omg/PortableInterceptor/ClientRequestInterceptorHelper.java \
org/omg/PortableInterceptor/IORInfoHelper.java \
org/omg/PortableInterceptor/IORInterceptorHelper.java \
org/omg/PortableInterceptor/InterceptorHelper.java \
org/omg/PortableInterceptor/ORBInitInfoHelper.java \
org/omg/PortableInterceptor/ORBInitializerHelper.java \
org/omg/PortableInterceptor/PolicyFactoryHelper.java \
org/omg/PortableInterceptor/ReplyStatusHelper.java \
org/omg/PortableInterceptor/RequestInfoHelper.java \
org/omg/PortableInterceptor/ServerRequestInfoHelper.java \
org/omg/PortableInterceptor/ServerRequestInterceptorHelper.java \
org/omg/PortableInterceptor/SlotIdHelper.java \
org/omg/PortableInterceptor/ClientRequestInfoHolder.java \
org/omg/PortableInterceptor/ClientRequestInterceptorHolder.java \
org/omg/PortableInterceptor/CurrentHolder.java \
org/omg/PortableInterceptor/ForwardRequestHolder.java \
org/omg/PortableInterceptor/IORInfoHolder.java \
org/omg/PortableInterceptor/IORInterceptorHolder.java \
org/omg/PortableInterceptor/InterceptorHolder.java \
org/omg/PortableInterceptor/InvalidSlotHolder.java \
org/omg/PortableInterceptor/ORBInitInfoHolder.java \
org/omg/PortableInterceptor/ORBInitializerHolder.java \
org/omg/PortableInterceptor/PolicyFactoryHolder.java \
org/omg/PortableInterceptor/RequestInfoHolder.java \
org/omg/PortableInterceptor/ServerRequestInfoHolder.java \
org/omg/PortableInterceptor/ServerRequestInterceptorHolder.java \
org/omg/PortableInterceptor/TaggedComponentSeqHolder.java \
org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHolder.java \
org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHolder.java \
org/omg/IOP/CodecPackage/FormatMismatchHolder.java \
org/omg/IOP/CodecPackage/InvalidTypeForEncodingHolder.java \
org/omg/IOP/CodecPackage/TypeMismatchHolder.java \
org/omg/IOP/CodecHelper.java \
org/omg/IOP/EncodingFormatHelper.java \
org/omg/IOP/EncodingHelper.java \
org/omg/IOP/CodecFactoryPackage/UnknownEncodingHolder.java \
org/omg/IOP/CodecFactoryHolder.java \
org/omg/IOP/CodecHolder.java \
org/omg/IOP/EncodingHolder.java \
org/omg/IOP/TaggedComponentSeqHelper.java \
org/omg/Dynamic/ContextListHelper.java \
org/omg/Dynamic/ExceptionListHelper.java \
org/omg/Dynamic/ParameterHolder.java \
org/omg/Dynamic/ParameterListHolder.java \
org/omg/Dynamic/ExceptionListHolder.java \
org/omg/Dynamic/ParameterHelper.java \
org/omg/Dynamic/ParameterListHelper.java \
org/omg/Dynamic/RequestContextHelper.java \
org/omg/CORBA/OctetSeqHelper.java \
org/omg/CORBA/OctetSeqHolder.java \
org/omg/CORBA/PolicyError.java \
org/omg/CORBA/RepositoryIdHelper.java \
#
$(eval $(call SetupIdlCompilation,BUILD_IDLS, \
IDLJ := $(TOOL_IDLJ_CMD), \
SRC := $(TOPDIR)/src/java.corba/share/classes, \
BIN := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
EXCLUDES := com/sun/tools/corba/se/idl/% \
org/omg/CORBA/% \
com/sun/corba/se/GiopIDL/% \
org/omg/PortableServer/corba.idl, \
INCLUDES := %, \
OLDIMPLBASES := com/sun/corba/se/PortableActivationIDL/activation.idl \
com/sun/corba/se/spi/activation/activation.idl, \
DELETES := $(IDL_DELETES)))
$(BUILD_IDLS): $(BUILD_IDLJ)
################################################################################
# zh_HK is just a copy of zh_TW
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
$(install-file)
################################################################################
all: $(BUILD_IDLS) $(LOGWRAPPER_TARGETS) \
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties

View File

@ -123,7 +123,7 @@ TARGETS += $(GENSRC_DIR)/_gensrc_proc_done
$(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
($(CD) $(GENSRC_DIR)/META-INF/providers && \
p=""; \
for i in $$($(LS)); do \
for i in $$($(LS) | $(SORT)); do \
c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
if test x$$p != x$$c; then \
if test x$$p != x; then \
@ -137,7 +137,7 @@ $(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
$(ECHO) " ;" >> $@; \
$(ECHO) "uses org.graalvm.compiler.options.OptionDescriptors;" >> $@; \
$(ECHO) "provides org.graalvm.compiler.options.OptionDescriptors with" >> $@; \
for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java'); do \
for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java' | $(SORT)); do \
c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.internal\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \
$(ECHO) " $$c," >> $@; \
done; \

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

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -53,7 +53,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
# Set the C++ standard if supported
ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
# hurt.
ADLC_CFLAGS += -DASSERT
@ -63,6 +63,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
NAME := adlc, \
TYPE := EXECUTABLE, \
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
SRC := $(TOPDIR)/src/hotspot/share/adlc, \
EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
@ -71,7 +73,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
LIBS := $(ADLC_LIBS), \
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
PROGRAM := adlc, \
DEBUG_SYMBOLS := false, \
DISABLED_WARNINGS_clang := tautological-compare, \
DISABLED_WARNINGS_solstudio := notemsource, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -46,6 +46,8 @@ ifeq ($(call check-jvm-feature, dtrace), true)
# in the libjvm.so, using JVM_CFLAGS as setup in CompileJvm.gmk. Otherwise
# this would preferrably have been done as a part of GensrcDtrace.gmk.
$(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
NAME := dtraceGenOffsets, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/make/hotspot/src/native/dtrace, \
CC := $(BUILD_CXX), \
CXX := $(BUILD_CXX), \
@ -56,7 +58,6 @@ ifeq ($(call check-jvm-feature, dtrace), true)
LIBS := -lc, \
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
PROGRAM := dtraceGenOffsets, \
))
DTRACE_GEN_OFFSETS_TOOL := $(BUILD_DTRACE_GEN_OFFSETS_TARGET)
@ -178,7 +179,7 @@ ifeq ($(call check-jvm-feature, dtrace), true)
LIBJVM_DTRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm_dtrace
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DTRACE, \
LIBRARY := jvm_dtrace, \
NAME := jvm_dtrace, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_dtrace, \
CFLAGS := -m64 -G -mt -KPIC, \
@ -193,7 +194,7 @@ ifeq ($(call check-jvm-feature, dtrace), true)
# Note that libjvm_db.c has tests for COMPILER2, but this was never set by
# the old build.
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DB, \
LIBRARY := jvm_db, \
NAME := jvm_db, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(TOPDIR)/src/java.base/solaris/native/libjvm_db, \
CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 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,8 +63,8 @@ endif
# exclusive to the gtest libjvm.so.
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
SRC := $(GTEST_TEST_SRC), \
@ -87,6 +87,7 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
DISABLED_WARNINGS_clang := undef switch format-nonliteral \
tautological-undefined-compare $(BUILD_LIBJVM_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_solstudio := identexpected, \
DISABLED_WARNINGS_CXX_microsoft := 4996, \
LDFLAGS := $(JVM_LDFLAGS), \
LDFLAGS_solaris := -library=stlport4 $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_aix := -bbigtoc, \
@ -107,7 +108,8 @@ TARGETS += $(BUILD_GTEST_LIBJVM)
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LAUNCHER, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
PROGRAM := gtestLauncher, \
NAME := gtestLauncher, \
TYPE := EXECUTABLE, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -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 \
#
@ -210,8 +210,8 @@ JVM_STRIPFLAGS ?= $(STRIPFLAGS)
# Now set up the actual compilation of the main hotspot native library
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
LIBRARY := jvm, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(JVM_SRC_DIRS), \
EXCLUDES := $(JVM_EXCLUDES), \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -90,7 +90,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
$(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
LIBRARY := jsig, \
NAME := jsig, \
SRC := $(LIBJSIG_SRC_DIR), \
OUTPUT_DIR := $(LIB_OUTPUTDIR), \
LANG := C, \

View File

@ -32,6 +32,8 @@ $(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk))
ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0
BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
endif
ifeq ($(OPENJDK_TARGET_OS), linux)

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) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -144,8 +144,6 @@ public class GenGraphs {
ranks.add(Set.of("java.sql"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));
ranks.add(Set.of("java.corba", "java.xml.ws"));
ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation"));
this.attrs = attrs;
}

View File

@ -1,11 +1,10 @@
<html>
<head>
<title>JCP Technologies in JDK 9</title>
<title>JCP Technologies in JDK 11</title>
<style type="text/css">
table { border: 1px solid black; border-collapse: collapse; }
tr.se-base { background-color: yellow; }
tr.se-misc { background-color: bisque; }
tr.se-ee { background-color: sandybrown; }
tr.se-ext { background-color: pink; }
tr.non-se { background-color: lightsteelblue; }
td { font-family: monospace; padding: 5px; border: 1px solid; }
@ -13,19 +12,18 @@ td.agg { background-color: lightgray; }
</style>
</head>
<h1>JCP Technologies in JDK 9</h1>
<h1>JCP Technologies in JDK 11</h1>
<p><em>Last updated 2017-06-08</em></p>
<p><em>Last updated 2018-02-07</em></p>
<p><a href="module-summary.html">JDK 9 Module Summary</a> | Technologies in the <a href="https://docs.oracle.com/javase/8/docs/">Java SE 8 Documentation</a></p>
<p><a href="module-summary.html">JDK 11 Module Summary</a> | Technologies in the <a href="https://docs.oracle.com/javase/9/docs/">Java SE 9 Documentation</a></p>
<table>
<tr><th>Legend</th></tr>
<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- in java.base</a></td></tr>
<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- not in java.base</a></td></tr>
<tr class="se-ee"><td><a href="https://jcp.org/en/jsr/platform?listBy=3&listByType=platform">JCP technology in the Java SE Platform derived from the Java EE Platform</a></a></td></tr>
<tr class="se-ext"><td><a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">JCP technology in the Java SE Platform derived from non-JCP standards</a></a></td></tr>
<tr class="non-se"><td>JCP technology in neither the Java SE or EE Platforms</td></tr>
<tr class="non-se"><td>JCP technology not included in the Java SE Platform</td></tr>
</table>
<br/>
@ -50,7 +48,7 @@ td.agg { background-color: lightgray; }
<td>boot</td>
<td>No</td>
<td></td>
<td class="agg" rowspan=37><a href="module-summary.html#java.se"/>java.se</a></td>
<td class="agg" rowspan=38><a href="module-summary.html#java.se"/>java.se</a></td>
</tr>
<tr class="se-misc">
@ -403,6 +401,15 @@ td.agg { background-color: lightgray; }
<td>No</td>
<td></td>
</tr>
<tr class="se-misc">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.sql">java.sql</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<tr class="se-ext">
<td>(W3C)</td>
@ -414,102 +421,6 @@ td.agg { background-color: lightgray; }
<td>Formerly an <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">Endorsed Standard</a></td>
</tr>
<tr class="se-ext">
<td>(OMG)</td>
<td>RMI-IIOP, IDL</td>
<td>UJSR for Java SE</td>
<td><a href="module-summary.html#java.corba"/>java.corba</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly an <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">Endorsed Standard</a></td>
<td class="agg" rowspan=7><a href="module-summary.html#java.se.ee"/>java.se.ee</a></td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=67">67</a></td>
<td>SAAJ</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (f.k.a. JAXM)</td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=181">181</a></td>
<td>Web Services Metadata</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=222">222</a></td>
<td>JAXB</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.bind">java.xml.bind</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a></td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=224">224</a></td>
<td>JAXWS</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a></td>
</tr>
<!-- The Java SE Platform incorporates a smaller version of the javax.annotation package than the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=250">250</a></td>
<td>Common Annotations</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws.annotation">java.xml.ws.annotation</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<!-- The Java SE Platform incorporates a smaller version of the javax.transaction package than the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (non-XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.transaction">java.transaction</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<!-- The Java SE Platform incorporates the same version of the javax.transaction.xa package as the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.sql"/>java.sql</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
<td class="agg"><a href="module-summary.html#java.se"/>java.se</a></td>
</tr>
<tr class="se-misc">
<td><a href="https://jcp.org/en/jsr/detail?id=925">925</a></td>
<td>JAF</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.activation">java.activation</a></a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
<td class="agg"><a href="module-summary.html#java.se.ee"/>java.se.ee</a></td>
</tr>
<tr class="non-se">
<td><a href="https://jcp.org/en/jsr/detail?id=56">56</a></td>
<td>JNLP</td>

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 = "module-graph.png";
int thumbnailHeight = -1;
String hoverImage = "";
if (!moduleName.equals("java.base")) {

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
@ -73,6 +73,8 @@ $(eval $(call SetupBuildLauncher, keytool, \
ifeq ($(OPENJDK_TARGET_OS), linux)
$(eval $(call SetupNativeCompilation, BUILD_JEXEC, \
NAME := jexec, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
INCLUDE_FILES := jexec.c, \
OPTIMIZATION := LOW, \
@ -83,7 +85,6 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
PROGRAM := jexec, \
))
TARGETS += $(BUILD_JEXEC)
@ -93,6 +94,8 @@ endif
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
$(eval $(call SetupNativeCompilation, BUILD_JSPAWNHELPER, \
NAME := jspawnhelper, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
@ -100,7 +103,6 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
PROGRAM := jspawnhelper, \
))
TARGETS += $(BUILD_JSPAWNHELPER)

View File

@ -1,50 +0,0 @@
#
# Copyright (c) 2011, 2015, 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.
#
include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, idlj, \
MAIN_CLASS := com.sun.tools.corba.se.idl.toJavaPortable.Compile, \
))
$(eval $(call SetupBuildLauncher, orbd, \
MAIN_CLASS := com.sun.corba.se.impl.activation.ORBD, \
JAVA_ARGS := \
-Dcom.sun.CORBA.activation.DbDir=./orb.db \
-Dcom.sun.CORBA.activation.Port=1049 \
-Dcom.sun.CORBA.POA.ORBServerId=1, \
))
$(eval $(call SetupBuildLauncher, servertool, \
MAIN_CLASS := com.sun.corba.se.impl.activation.ServerTool, \
))
$(eval $(call SetupBuildLauncher, tnameserv, \
MAIN_CLASS := com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
JAVA_ARGS := \
-Dcom.sun.CORBA.activation.DbDir=./orb.db \
-Djava.util.logging.LoggingPermission=contol \
-Dcom.sun.CORBA.POA.ORBServerId=1, \
))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 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
@ -33,7 +33,9 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
JABSWITCH_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/jabswitch
ACCESSBRIDGE_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/common
$(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
$(eval $(call SetupNativeCompilation, BUILD_JABSWITCH, \
NAME := jabswitch, \
TYPE := EXECUTABLE, \
SRC := $(JABSWITCH_SRC), \
INCLUDE_FILES := jabswitch.cpp, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
@ -44,7 +46,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBS := advapi32.lib version.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jabswitch, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jabswitch.exe" \
@ -70,6 +71,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
$$(eval $$(call SetupNativeCompilation, BUILD_JACCESSINSPECTOR$1, \
NAME := jaccessinspector$1, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
@ -77,7 +80,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBS := advapi32.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jaccessinspector$1, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccessinspector$1.exe" \
@ -96,7 +98,9 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
$$(eval $$(call SetupNativeCompilation,BUILD_JACCESSWALKER$1, \
$$(eval $$(call SetupNativeCompilation, BUILD_JACCESSWALKER$1, \
NAME := jaccesswalker$1, \
TYPE := EXECUTABLE, \
SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
@ -104,7 +108,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \
PROGRAM := jaccesswalker$1, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=jaccesswalker$1.exe" \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2015, 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
@ -60,3 +60,6 @@ $(eval $(call SetupBuildLauncher, jstat, \
$(eval $(call SetupBuildLauncher, jcmd, \
MAIN_CLASS := sun.tools.jcmd.JCmd, \
))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, launcher/Launcher-jdk.jcmd-post.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -28,3 +28,6 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, jstatd, \
MAIN_CLASS := sun.tools.jstatd.Jstatd, \
))
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, launcher/Launcher-jdk.jstatd-post.gmk))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -73,7 +73,9 @@ else
UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200
endif
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
$(eval $(call SetupNativeCompilation, BUILD_UNPACKEXE, \
NAME := unpack200, \
TYPE := EXECUTABLE, \
SRC := $(UNPACKEXE_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
@ -82,7 +84,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) \
@ -91,7 +93,6 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE), \
PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack200.exe" \

View File

@ -1,34 +0,0 @@
#
# Copyright (c) 2011, 2015, 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.
#
include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, schemagen, \
MAIN_CLASS := com.sun.tools.internal.jxc.SchemaGenerator, \
))
$(eval $(call SetupBuildLauncher, xjc, \
MAIN_CLASS := com.sun.tools.internal.xjc.Driver, \
))

View File

@ -1,34 +0,0 @@
#
# Copyright (c) 2011, 2015, 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.
#
include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, wsgen, \
MAIN_CLASS := com.sun.tools.internal.ws.WsGen, \
))
$(eval $(call SetupBuildLauncher, wsimport, \
MAIN_CLASS := com.sun.tools.internal.ws.WsImport, \
))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -183,6 +183,8 @@ define SetupBuildLauncherBody
endif
$$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
NAME := $1, \
TYPE := EXECUTABLE, \
EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
OPTIMIZATION := $$($1_OPTIMIZATION), \
CFLAGS := $$($1_CFLAGS) \
@ -211,7 +213,6 @@ define SetupBuildLauncherBody
$$($1_LIBS_windows), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$1_objs, \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
PROGRAM := $1, \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -48,8 +48,8 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
LIBRARY := mlib_image, \
$(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE, \
NAME := mlib_image, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMLIB_SRC), \
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
@ -107,8 +107,8 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
LIBMLIB_IMAGE_V_CFLAGS += $(filter-out -DMLIB_NO_LIBSUNMATH, $(BUILD_LIBMLIB_CFLAGS))
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE_V, \
LIBRARY := mlib_image_v, \
$(eval $(call SetupNativeCompilation, BUILD_LIBMLIB_IMAGE_V, \
NAME := mlib_image_v, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMLIB_IMAGE_V_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
@ -226,8 +226,8 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
LIBAWT_CFLAGS += -fgcse-after-reload
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LIBRARY := awt, \
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT, \
NAME := awt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_DIRS), \
EXCLUDES := $(LIBAWT_EXCLUDES), \
@ -347,8 +347,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
LIBRARY := awt_xawt, \
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_XAWT, \
NAME := awt_xawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_XAWT_DIRS), \
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
@ -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, \
@ -405,8 +406,8 @@ else
LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
LIBRARY := lcms, \
$(eval $(call SetupNativeCompilation, BUILD_LIBLCMS, \
NAME := lcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBLCMS_SRC), \
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
@ -482,8 +483,8 @@ else
BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
LIBRARY := javajpeg, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJAVAJPEG, \
NAME := javajpeg, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVAJPEG_SRC), \
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
@ -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), \
@ -546,8 +547,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
LIBRARY := awt_headless, \
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_HEADLESS, \
NAME := awt_headless, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_HEADLESS_DIRS), \
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
@ -656,8 +657,8 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
LIBRARY := fontmanager, \
$(eval $(call SetupNativeCompilation, BUILD_LIBFONTMANAGER, \
NAME := fontmanager, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
SRC := $(LIBFONTMANAGER_SRC), \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
@ -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 \
@ -743,8 +744,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU), x86)
KERNEL32_LIB := kernel32.lib
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \
NAME := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
@ -803,8 +804,8 @@ else # OPENJDK_TARGET_OS not windows
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJAWT, \
NAME := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(JAWT_FILES), \
@ -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)
@ -925,16 +935,17 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
LIBRARY := splashscreen, \
$(eval $(call SetupNativeCompilation, BUILD_LIBSPLASHSCREEN, \
NAME := splashscreen, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSPLASHSCREEN_DIRS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
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) \
@ -997,8 +1008,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/java.desktop/unix/native/common/awt/medialib
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_LWAWT, \
LIBRARY := awt_lwawt, \
$(eval $(call SetupNativeCompilation, BUILD_LIBAWT_LWAWT, \
NAME := awt_lwawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAWT_LWAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
@ -1046,8 +1057,8 @@ endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
LIBRARY := osxui, \
$(eval $(call SetupNativeCompilation, BUILD_LIBOSXUI, \
NAME := osxui, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxui, \
OPTIMIZATION := LOW, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -55,8 +55,9 @@ LIBFDLIBM_SRC := $(TOPDIR)/src/java.base/share/native/libfdlibm
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
$(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
NAME := fdlibm, \
TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBFDLIBM_SRC), \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
@ -67,7 +68,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, \
@ -77,12 +78,12 @@ else
# On macosx the old build does partial (incremental) linking of fdlibm instead of
# a plain static library.
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
$(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM_MAC, \
NAME := fdlibm, \
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, \
))
@ -107,12 +108,13 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
LIBRARY := verify, \
$(eval $(call SetupNativeCompilation, BUILD_LIBVERIFY, \
NAME := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
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) \
@ -154,8 +156,8 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBRARY := java, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJAVA, \
NAME := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_SRC_DIRS), \
OPTIMIZATION := HIGH, \
@ -217,18 +219,19 @@ ifeq ($(LIBZIP_CAN_USE_MMAP), true)
BUILD_LIBZIP_MMAP := -DUSE_MMAP
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LIBRARY := zip, \
$(eval $(call SetupNativeCompilation, BUILD_LIBZIP, \
NAME := zip, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
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 +239,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), \
@ -260,8 +263,8 @@ JIMAGELIB_CPPFLAGS := \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
LIBRARY := jimage, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJIMAGE, \
NAME := jimage, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
@ -270,6 +273,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 +345,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 \
@ -354,14 +359,15 @@ ifneq ($(USE_EXTERNAL_LIBZ), true)
)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
LIBRARY := jli, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI, \
NAME := jli, \
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
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 +396,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),\
@ -410,8 +416,9 @@ TARGETS += $(BUILD_LIBJLI)
# with the shared library, so the static library is given a different name. No harm
# in doing it for all platform to reduce complexity.
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
NAME := jli_static, \
TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
@ -429,15 +436,15 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
# On macosx they do partial (incremental) linking of libjli_static.a
# code it here...rather than add support to NativeCompilation
# as this is first time I see it
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
LIBRARY := jli_static, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
NAME := jli_static, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
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, \
))
@ -452,8 +459,9 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
else ifeq ($(OPENJDK_TARGET_OS), aix)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \
STATIC_LIBRARY := jli_static, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
NAME := jli_static, \
TYPE := STATIC_LIBRARY, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, 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
@ -49,8 +49,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
$(eval $(call SetupNativeCompilation, BUILD_LIBINSTRUMENT, \
NAME := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
OPTIMIZATION := LOW, \
@ -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

@ -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
@ -44,8 +44,8 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
$(eval $(call SetupNativeCompilation, BUILD_LIBMANAGEMENT, \
NAME := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBMANAGEMENT_SRC), \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
@ -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

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2015, 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
@ -33,8 +33,8 @@ else
LIBPREF_SRC_DIRS := $(TOPDIR)/src/java.prefs/$(OPENJDK_TARGET_OS_TYPE)/native/libprefs
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
LIBRARY := prefs, \
$(eval $(call SetupNativeCompilation, BUILD_LIBPREFS, \
NAME := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBPREF_SRC_DIRS), \
OPTIMIZATION := HIGH, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 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
@ -27,8 +27,8 @@ include LibCommon.gmk
################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBRMI, \
LIBRARY := rmi, \
$(eval $(call SetupNativeCompilation, BUILD_LIBRMI, \
NAME := rmi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/java.rmi/share/native/librmi, \
OPTIMIZATION := LOW, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2015, 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
@ -32,8 +32,8 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
$(TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_TYPE)/native/libj2gss \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
LIBRARY := j2gss, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJ2GSS, \
NAME := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2GSS_SRC), \
OPTIMIZATION := LOW, \
@ -74,8 +74,8 @@ ifneq ($(BUILD_CRYPTO), false)
ifneq ($(BUILD_LIBKRB5_NAME), )
# libosxkrb5 needs to call deprecated krb5 APIs so that java
# can use the native credentials cache.
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
LIBRARY := $(BUILD_LIBKRB5_NAME), \
$(eval $(call SetupNativeCompilation, BUILD_LIBKRB5, \
NAME := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
OPTIMIZATION := LOW, \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2015, 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
@ -33,8 +33,8 @@ LIBJ2PCSC_CPPFLAGS := $(addprefix -I,$(LIBJ2PCSC_SRC)) \
-I$(TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pcsc/MUSCLE \
-I$(SUPPORT_OUTPUTDIR)/headers/java.smartcardio
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
$(eval $(call SetupNativeCompilation, BUILD_LIBJ2PCSC, \
NAME := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2PCSC_SRC), \
CFLAGS_unix := -D__sun_jdk, \

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