This commit is contained in:
Alexandre Iline 2018-03-16 03:17:12 -07:00
commit 771a76dd9e
1333 changed files with 190932 additions and 21281 deletions

View File

@ -471,3 +471,7 @@ e569e83139fdfbecfeb3cd9014d560917787f158 jdk-10+38
107413b070b92c88bde6230ceb4a19b579781068 jdk-10+43
dfa46cfe56346884a61efdc30dc50f7505d66761 jdk-11+1
03ae177c26b016353e5ea1cab6ffd051dfa086ca jdk-11+2
663f20fc51091bd7f95d18448850ba091207b7bd jdk-10+44
4f96cf952e71cb8a127334494faf28880c26181b jdk-10+45
1fd4d6068f54561cfc67d54fc9ca84af7212c4f8 jdk-11+3
e59941f7247d451fa7df9eaef3fce0f492f8420c jdk-11+4

View File

@ -44,10 +44,7 @@
<li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
</ul></li>
<li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
<li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
<li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
<li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
<li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
<li><a href="#getting-jdk-binaries">Getting JDK binaries</a></li>
</ul></li>
<li><a href="#external-library-requirements">External Library Requirements</a><ul>
<li><a href="#freetype">FreeType</a></li>
@ -194,7 +191,7 @@
<p>Windows XP is not a supported platform, but all newer Windows should be able to build OpenJDK.</p>
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
<p>Windows is the only non-POSIX OS supported by OpenJDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. For OpenJDK 9, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require a community effort to implement.)</p>
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-freetype=/cygdrive/c/freetype</code> rather than <code>--with-freetype=c:\freetype</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
<h4 id="cygwin">Cygwin</h4>
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building OpenJDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the OpenJDK build process, and that can cause unexpected build problems.</p>
@ -364,37 +361,24 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
<p>Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the &quot;boot JDK&quot;. The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be an JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to &quot;build itself&quot;, so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to &quot;build itself&quot;, so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
<p>Early in the release cycle, version <em>N-1</em> may not yet have been released. In that case, the preferred boot JDK will be version <em>N-2</em> until version <em>N-1</em> is available.</p>
<p>If the Boot JDK is not automatically detected, or the wrong JDK is picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
<h3 id="jdk-8-on-linux">JDK 8 on Linux</h3>
<p>On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-8-jdk</code> is typically enough to install OpenJDK 8. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-1.8.0-openjdk-devel</code>.</p>
<h3 id="jdk-8-on-windows">JDK 8 on Windows</h3>
<p>No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for Windows.</p>
<h3 id="jdk-8-on-macos">JDK 8 on macOS</h3>
<p>No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>, or to install it using <code>brew cask install java</code>. Another option is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for macOS.</p>
<h3 id="jdk-8-on-aix">JDK 8 on AIX</h3>
<p>No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the time of writing. A starting point for working with OpenJDK on AIX is the <a href="http://openjdk.java.net/projects/ppc-aix-port/">PowerPC/AIX Port Project</a>.</p>
<h3 id="getting-jdk-binaries">Getting JDK binaries</h3>
<p>OpenJDK binaries for Linux, Windows and macOS can be downloaded from <a href="http://jdk.java.net">jdk.java.net</a>. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for various platforms.</p>
<p>On Linux you can also get OpenJDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-&lt;VERSION&gt;-jdk</code> is typically enough to install OpenJDK &lt;VERSION&gt;. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-&lt;VERSION&gt;-openjdk-devel</code>.</p>
<h2 id="external-library-requirements">External Library Requirements</h2>
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-&lt;LIB&gt;=&lt;path&gt;</code> or <code>--with-&lt;LIB&gt;-include=&lt;path to include&gt; --with-&lt;LIB&gt;-lib=&lt;path to lib&gt;</code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
<h3 id="freetype">FreeType</h3>
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is required on all platforms. At least version 2.3 is required.</p>
<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling OpenJDK's own copy.</p>
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libcups2-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install cups-devel</code>.</li>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
<li>To install on Solaris, try running <code>pkg install system/library/freetype-2</code>.</li>
<li>To install on macOS, try running <code>brew install freetype</code>.</li>
<li>To install on Windows, see <a href="#building-freetype-on-windows">below</a>.</li>
</ul>
<p>Use <code>--with-freetype=&lt;path&gt;</code> if <code>configure</code> does not properly locate your FreeType files.</p>
<h4 id="building-freetype-on-windows">Building FreeType on Windows</h4>
<p>On Windows, there is no readily available compiled version of FreeType. OpenJDK can help you compile FreeType from source. Download the FreeType sources and unpack them into an arbitrary directory:</p>
<pre><code>wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
tar -xzf freetype-2.5.3.tar.gz</code></pre>
<p>Then run <code>configure</code> with <code>--with-freetype-src=&lt;freetype_src&gt;</code>. This will automatically build the freetype library into <code>&lt;freetype_src&gt;/lib64</code> for 64-bit builds or into <code>&lt;freetype_src&gt;/lib32</code> for 32-bit builds. Afterwards you can always use <code>--with-freetype-include=&lt;freetype_src&gt;/include</code> and <code>--with-freetype-lib=&lt;freetype_src&gt;/lib[32|64]</code> for other builds.</p>
<p>Alternatively you can unpack the sources like this to use the default directory:</p>
<pre><code>tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz</code></pre>
<p>Use <code>--with-freetype-include=&lt;path&gt;</code> and <code>--with-freetype-lib=&lt;path&gt;</code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
<h3 id="cups">CUPS</h3>
<p>CUPS, <a href="http://www.cups.org">Common UNIX Printing System</a> header files are required on all platforms, except Windows. Often these files are provided by your operating system.</p>
<ul>
@ -758,12 +742,7 @@ 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 <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 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 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>

View File

@ -173,8 +173,8 @@ require a community effort to implement.)
Internally in the build system, all paths are represented as Unix-style paths,
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
rule also applies to input to the build system, e.g. in arguments to
`configure`. So, use `--with-freetype=/cygdrive/c/freetype` rather than
`--with-freetype=c:\freetype`. For details on this conversion, see the section
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
on [Fixpath](#fixpath).
#### Cygwin
@ -401,43 +401,31 @@ porting OpenJDK to a new platform, chances are that there already exists
another JDK for that platform that is usable as boot JDK.
The rule of thumb is that the boot JDK for building JDK major version *N*
should be an JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
suitable as boot JDK. However, OpenJDK should be able to "build itself", so an
up-to-date build of the current OpenJDK source is an acceptable alternative. If
you are following the *N-1* rule, make sure you got the latest update version,
since JDK 8 GA might not be able to build JDK 9 on all platforms.
you are following the *N-1* rule, make sure you've got the latest update
version, since JDK 8 GA might not be able to build JDK 9 on all platforms.
Early in the release cycle, version *N-1* may not yet have been released. In
that case, the preferred boot JDK will be version *N-2* until version *N-1*
is available.
If the Boot JDK is not automatically detected, or the wrong JDK is picked, use
`--with-boot-jdk` to point to the JDK to use.
### JDK 8 on Linux
### Getting JDK binaries
On apt-based distros (like Debian and Ubuntu), `sudo apt-get install
openjdk-8-jdk` is typically enough to install OpenJDK 8. On rpm-based distros
(like Fedora and Red Hat), try `sudo yum install java-1.8.0-openjdk-devel`.
OpenJDK binaries for Linux, Windows and macOS can be downloaded from
[jdk.java.net](http://jdk.java.net). An alternative is to download the
[Oracle JDK](http://www.oracle.com/technetwork/java/javase/downloads). Another
is the [Adopt OpenJDK Project](https://adoptopenjdk.net/), which publishes
experimental prebuilt binaries for various platforms.
### JDK 8 on Windows
No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the
time of writing. An alternative is to download the [Oracle JDK](
http://www.oracle.com/technetwork/java/javase/downloads). Another is the [Adopt
OpenJDK Project](https://adoptopenjdk.net/), which publishes experimental
prebuilt binaries for Windows.
### JDK 8 on macOS
No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the
time of writing. An alternative is to download the [Oracle JDK](
http://www.oracle.com/technetwork/java/javase/downloads), or to install it
using `brew cask install java`. Another option is the [Adopt OpenJDK Project](
https://adoptopenjdk.net/), which publishes experimental prebuilt binaries for
macOS.
### JDK 8 on AIX
No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the
time of writing. A starting point for working with OpenJDK on AIX is
the [PowerPC/AIX Port Project](http://openjdk.java.net/projects/ppc-aix-port/).
On Linux you can also get OpenJDK from the Linux distribution. On apt-based
distros (like Debian and Ubuntu), `sudo apt-get install openjdk-<VERSION>-jdk`
is typically enough to install OpenJDK \<VERSION\>. On rpm-based distros (like
Fedora and Red Hat), try `sudo yum install java-<VERSION>-openjdk-devel`.
## External Library Requirements
@ -456,43 +444,19 @@ and the lib directory separately.
### FreeType
FreeType2 from [The FreeType Project](http://www.freetype.org/) is required on
all platforms. At least version 2.3 is required.
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
on any platform. The exception is on Unix-based platforms when configuring such
that the build artifacts will reference a system installed library,
rather than bundling OpenJDK's own copy.
* To install on an apt-based Linux, try running `sudo apt-get install
libcups2-dev`.
libfreetype6-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
cups-devel`.
freetype-devel`.
* To install on Solaris, try running `pkg install system/library/freetype-2`.
* To install on macOS, try running `brew install freetype`.
* To install on Windows, see [below](#building-freetype-on-windows).
Use `--with-freetype=<path>` if `configure` does not properly locate your
FreeType files.
#### Building FreeType on Windows
On Windows, there is no readily available compiled version of FreeType. OpenJDK
can help you compile FreeType from source. Download the FreeType sources and
unpack them into an arbitrary directory:
```
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
tar -xzf freetype-2.5.3.tar.gz
```
Then run `configure` with `--with-freetype-src=<freetype_src>`. This will
automatically build the freetype library into `<freetype_src>/lib64` for 64-bit
builds or into `<freetype_src>/lib32` for 32-bit builds. Afterwards you can
always use `--with-freetype-include=<freetype_src>/include` and
`--with-freetype-lib=<freetype_src>/lib[32|64]` for other builds.
Alternatively you can unpack the sources like this to use the default
directory:
```
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz
```
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
if `configure` does not automatically locate the platform FreeType files.
### CUPS

View File

@ -252,6 +252,10 @@ java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,
################################################################################
java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
################################################################################
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS

View File

@ -61,7 +61,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
$(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub)
# URLs
JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase9&amp;id=homepage
JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase10&amp;id=homepage
BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/
COPYRIGHT_URL := {@docroot}/../legal/copyright.html
LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html

View File

@ -435,7 +435,7 @@ else # $(HAS_SPEC)=true
define PrepareCompareBuild
$(ECHO) "Preparing for comparison rebuild"
# Apply patch, if any
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(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
@ -455,7 +455,7 @@ else # $(HAS_SPEC)=true
# Cleanup after a compare build
define CleanupCompareBuild
# If running with a COMPARE_BUILD patch, reverse-apply it
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
# Move this build away and restore the original build
$(MKDIR) -p $(topdir)/build/compare-build
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)

View File

@ -48,6 +48,7 @@ $(INTERIM_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
$(RM) -r $(INTERIM_IMAGE_DIR)
$(JLINK_TOOL) \
--output $(INTERIM_IMAGE_DIR) \
--disable-plugin generate-jli-classes \
--add-modules $(INTERIM_MODULES_LIST)
$(TOUCH) $@

View File

@ -399,10 +399,13 @@ docs-zip:
update-build-docs:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateBuildDocs.gmk)
update-x11wrappers:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UpdateX11Wrappers.gmk)
ALL_TARGETS += docs-jdk-api-javadoc docs-jdk-api-modulegraph \
docs-javase-api-javadoc docs-javase-api-modulegraph \
docs-reference-api-javadoc docs-reference-api-modulegraph docs-jdk-specs \
docs-jdk-index docs-zip update-build-docs
docs-jdk-index docs-zip update-build-docs update-x11wrappers
################################################################################
# Cross compilation support
@ -724,9 +727,9 @@ else
# 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)
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
@ -830,7 +833,7 @@ else
# 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: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
docs-jdk-index
@ -894,6 +897,8 @@ else
generate-summary: jmods buildtools-modules
update-x11wrappers: java.base-copy buildtools-jdk
endif
################################################################################

View File

@ -60,6 +60,18 @@ define SetTestOpt
endif
endef
# Setup _NT_SYMBOL_PATH on Windows
ifeq ($(OPENJDK_TARGET_OS), windows)
ifndef _NT_SYMBOL_PATH
# Can't use PathList here as it adds quotes around the value.
_NT_SYMBOL_PATH := \
$(subst $(SPACE),;, $(foreach p, $(sort $(dir $(wildcard \
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), $(call FixPath, $p)))
export _NT_SYMBOL_PATH
$(info _NT_SYMBOL_PATH $(_NT_SYMBOL_PATH))
endif
endif
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, RunTests.gmk))
@ -496,6 +508,11 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR
# Some tests needs to find a boot JDK using the JDK8_HOME variable.
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable
# symbol lookup in hserr files
ifeq ($$(OPENJDK_TARGET_OS), windows)
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
endif
$1_JTREG_BASIC_OPTIONS += \
$$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \

View File

@ -113,6 +113,7 @@ $(eval $(call SetupVariable,JT_HOME))
# These can have default values based on the ones above
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols))
# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
@ -245,6 +246,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
MAKE := $(MAKE), \
BASH := $(BASH), \
JIB_JAR := $(JIB_JAR), \

101
make/UpdateX11Wrappers.gmk Normal file
View File

@ -0,0 +1,101 @@
#
# 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
# 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 NativeCompilation.gmk
include ToolsJdk.gmk
################################################################################
# This file is responsible for extracting the x11 native struct offsets to
# the xawt Java library. The tool needs to be run on the os/arch that
# will host the final jvm, thus the tool cannot be used when cross compiling.
#
# Two versions of the generated offset file, sizes-32.txt and sizes-64.txt are
# committed into the source code repository. These are the ones used in
# GensrcX11Wrappers.gmk to generate the Java code during the build.
################################################################################
ifeq ($(COMPILE_TYPE), cross)
$(error It is not possible to update the x11wrappers when cross-compiling)
endif
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
BITS := $(OPENJDK_TARGET_CPU_BITS)
# Generate the C code for the program that will output the offset file.
$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
$(call LogInfo, Generating X11 wrapper data generator source code)
$(call MakeDir, $(@D))
$(call ExecuteWithLog, $@, \
$(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
DATA_GENERATOR_INCLUDES := \
-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 \
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
#
# Compile the generated C code into an executable.
$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
PROGRAM := data_generator, \
OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LIBS := $(X_LIBS), \
OBJECT_DIR := $(X11WRAPPERS_OUTPUT)/objs, \
))
# Run the executable to create the data file.
$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
$(call LogInfo, Generating X11 wrapper data files)
$(call MakeDir, $(@D))
$(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
$(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
$(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
$(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
$(ECHO) updated them for $(BITS) bit platforms only.
TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
################################################################################
all: $(TARGETS)
.PHONY: all default

View File

@ -1127,6 +1127,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
fi
fi
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
fi
])

View File

@ -77,10 +77,11 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`]
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
| $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
if test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Boot JDK must be version 9 or 10)])
AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
BOOT_JDK_FOUND=no
else
# We're done! :-)
@ -510,10 +511,10 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`]
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
if test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Build JDK must be version 10)])
AC_MSG_NOTICE([(Your Build JDK must be version $VERSION_FEATURE)])
BUILD_JDK_FOUND=no
else
# We're done!

View File

@ -163,10 +163,9 @@ JDKOPT_SETUP_STATIC_BUILD
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
# User supplied flags should be used when configure detects compilers
FLAGS_SETUP_USER_SUPPLIED_FLAGS
# The sysroot cflags are needed for configure to be able to run the compilers
FLAGS_SETUP_SYSROOT_FLAGS
# The global flags are needed for configure to be able to run the compilers
# correctly.
FLAGS_PRE_TOOLCHAIN
# Then detect the actual binaries needed
TOOLCHAIN_PRE_DETECTION
@ -184,17 +183,15 @@ TOOLCHAIN_SETUP_JTREG
# Setup Jib dependency tool
TOOLCHAIN_SETUP_JIB
FLAGS_SETUP_INIT_FLAGS
# After toolchain setup, we need to process some flags to be able to continue.
FLAGS_POST_TOOLCHAIN
# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools
FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
FLAGS_SETUP_COMPILER_FLAGS_MISC
FLAGS_SETUP_FLAGS
# Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS

View File

@ -0,0 +1,840 @@
#
# 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
# 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.
#
################################################################################
#
# Setup flags for C/C++ compiler
#
###############################################################################
#
# How to compile shared libraries.
#
AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
[
if test "x$TOOLCHAIN_TYPE" = xgcc; then
C_FLAG_REORDER=''
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
elif test "x$TOOLCHAIN_TYPE" = xclang; then
C_FLAG_REORDER=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Linking is different on MacOSX
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
else
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
# arm specific settings
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
# '-Wl,-z,origin' isn't used on arm.
SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
else
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
C_FLAG_REORDER='-xF'
SHARED_LIBRARY_FLAGS="-G"
SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN[$]1'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-h [$]1'
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
C_FLAG_REORDER=''
SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
SET_EXECUTABLE_ORIGIN=""
SET_SHARED_LIBRARY_ORIGIN=''
SET_SHARED_LIBRARY_NAME=''
SET_SHARED_LIBRARY_MAPFILE=''
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
C_FLAG_REORDER=''
SHARED_LIBRARY_FLAGS="-dll"
SET_EXECUTABLE_ORIGIN=''
SET_SHARED_LIBRARY_ORIGIN=''
SET_SHARED_LIBRARY_NAME=''
SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
fi
AC_SUBST(C_FLAG_REORDER)
AC_SUBST(SET_EXECUTABLE_ORIGIN)
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
AC_SUBST(SET_SHARED_LIBRARY_NAME)
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
AC_SUBST(SHARED_LIBRARY_FLAGS)
])
AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
[
# Debug symbols
if test "x$TOOLCHAIN_TYPE" = xgcc; then
CFLAGS_DEBUG_SYMBOLS="-g"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
CFLAGS_DEBUG_SYMBOLS="-g"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
# -g0 enables debug symbols without disabling inlining.
CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
CFLAGS_DEBUG_SYMBOLS="-g"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
fi
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
])
AC_DEFUN([FLAGS_SETUP_WARNINGS],
[
AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
[do not consider native warnings to be an error @<:@enabled@:>@])])
AC_MSG_CHECKING([if native warnings are errors])
if test "x$enable_warnings_as_errors" = "xyes"; then
AC_MSG_RESULT([yes (explicitly set)])
WARNINGS_AS_ERRORS=true
elif test "x$enable_warnings_as_errors" = "xno"; then
AC_MSG_RESULT([no])
WARNINGS_AS_ERRORS=false
elif test "x$enable_warnings_as_errors" = "x"; then
AC_MSG_RESULT([yes (default)])
WARNINGS_AS_ERRORS=true
else
AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument])
fi
AC_SUBST(WARNINGS_AS_ERRORS)
case "${TOOLCHAIN_TYPE}" in
microsoft)
DISABLE_WARNING_PREFIX="-wd"
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
;;
solstudio)
DISABLE_WARNING_PREFIX="-erroff="
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
;;
gcc)
DISABLE_WARNING_PREFIX="-Wno-"
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
# CFLAGS since any target specific flags will likely not work with the
# build compiler
CC_OLD="$CC"
CXX_OLD="$CXX"
CC="$BUILD_CC"
CXX="$BUILD_CXX"
CFLAGS_OLD="$CFLAGS"
CFLAGS=""
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
CC="$CC_OLD"
CXX="$CXX_OLD"
CFLAGS="$CFLAGS_OLD"
;;
clang)
DISABLE_WARNING_PREFIX="-Wno-"
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
xlc)
DISABLE_WARNING_PREFIX="-qsuppress="
CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
;;
esac
AC_SUBST(DISABLE_WARNING_PREFIX)
AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
])
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
[
# bounds, memory and behavior checking options
if test "x$TOOLCHAIN_TYPE" = xgcc; then
case $DEBUG_LEVEL in
release )
# no adjustment
;;
fastdebug )
# no adjustment
;;
slowdebug )
# FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
# get's added conditionally on whether we produce debug symbols or not.
# This is most likely not really correct.
# Add runtime stack smashing and undefined behavior checks.
CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -fstack-protector-all --param ssp-buffer-size=1"
;;
esac
fi
])
AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
[
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
C_O_FLAG_HIGHEST_JVM="-xO4"
C_O_FLAG_DEBUG_JVM=""
C_O_FLAG_SIZE=""
C_O_FLAG_DEBUG=""
C_O_FLAG_NONE=""
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST"
C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 \
-xprefetch=auto,explicit -xchip=ultra $CC_HIGHEST"
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
fi
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
C_O_FLAG_NORM="-O2"
C_O_FLAG_SIZE="-Os"
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_NONE="-O0"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# On MacOSX we optimize for size, something
# we should do for all platforms?
C_O_FLAG_HIGHEST_JVM="-Os"
C_O_FLAG_HIGHEST="-Os"
C_O_FLAG_HI="-Os"
C_O_FLAG_NORM="-Os"
C_O_FLAG_DEBUG_JVM=""
else
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
C_O_FLAG_NORM="-O2"
C_O_FLAG_DEBUG_JVM="-O0"
fi
C_O_FLAG_SIZE="-Os"
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_NONE="-O0"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
C_O_FLAG_HI="-O3 -qinline -qinlglue"
C_O_FLAG_NORM="-O2"
C_O_FLAG_DEBUG="-qnoopt"
# FIXME: Value below not verified.
C_O_FLAG_DEBUG_JVM=""
C_O_FLAG_NONE="-qnoopt"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
C_O_FLAG_HIGHEST="-O2"
C_O_FLAG_HI="-O1"
C_O_FLAG_NORM="-O1"
C_O_FLAG_DEBUG="-Od"
C_O_FLAG_DEBUG_JVM=""
C_O_FLAG_NONE="-Od"
C_O_FLAG_SIZE="-Os"
fi
# Now copy to C++ flags
CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
CXX_O_FLAG_HI="$C_O_FLAG_HI"
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
# In solstudio, also add this to C (but not C++) flags...
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xalias_level=basic"
fi
# Adjust optimization flags according to debug level.
case $DEBUG_LEVEL in
release )
# no adjustment
;;
fastdebug )
# Not quite so much optimization
C_O_FLAG_HI="$C_O_FLAG_NORM"
CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
;;
slowdebug )
# Disable optimization
C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
C_O_FLAG_HI="$C_O_FLAG_DEBUG"
C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
;;
esac
AC_SUBST(C_O_FLAG_HIGHEST_JVM)
AC_SUBST(C_O_FLAG_HIGHEST)
AC_SUBST(C_O_FLAG_HI)
AC_SUBST(C_O_FLAG_NORM)
AC_SUBST(C_O_FLAG_NONE)
AC_SUBST(C_O_FLAG_SIZE)
AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
AC_SUBST(CXX_O_FLAG_HIGHEST)
AC_SUBST(CXX_O_FLAG_HI)
AC_SUBST(CXX_O_FLAG_NORM)
AC_SUBST(CXX_O_FLAG_NONE)
AC_SUBST(CXX_O_FLAG_SIZE)
])
AC_DEFUN([FLAGS_SETUP_CFLAGS],
[
### CFLAGS
FLAGS_SETUP_CFLAGS_HELPER
FLAGS_OS=$OPENJDK_TARGET_OS
FLAGS_OS_TYPE=$OPENJDK_TARGET_OS_TYPE
FLAGS_CPU=$OPENJDK_TARGET_CPU
FLAGS_CPU_ARCH=$OPENJDK_TARGET_CPU_ARCH
FLAGS_CPU_BITS=$OPENJDK_TARGET_CPU_BITS
FLAGS_CPU_ENDIAN=$OPENJDK_TARGET_CPU_ENDIAN
FLAGS_CPU_LEGACY=$OPENJDK_TARGET_CPU_LEGACY
FLAGS_CPU_LEGACY_LIB=$OPENJDK_TARGET_CPU_LEGACY_LIB
FLAGS_SETUP_CFLAGS_CPU_DEP([TARGET])
FLAGS_OS=$OPENJDK_BUILD_OS
FLAGS_OS_TYPE=$OPENJDK_BUILD_OS_TYPE
FLAGS_CPU=$OPENJDK_BUILD_CPU
FLAGS_CPU_ARCH=$OPENJDK_BUILD_CPU_ARCH
FLAGS_CPU_BITS=$OPENJDK_BUILD_CPU_BITS
FLAGS_CPU_ENDIAN=$OPENJDK_BUILD_CPU_ENDIAN
FLAGS_CPU_LEGACY=$OPENJDK_BUILD_CPU_LEGACY
FLAGS_CPU_LEGACY_LIB=$OPENJDK_BUILD_CPU_LEGACY_LIB
FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
# Tests are only ever compiled for TARGET
CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
CFLAGS_TESTEXE="$CFLAGS_JDKEXE"
CXXFLAGS_TESTEXE="$CXXFLAGS_JDKEXE"
AC_SUBST(CFLAGS_TESTLIB)
AC_SUBST(CFLAGS_TESTEXE)
AC_SUBST(CXXFLAGS_TESTLIB)
AC_SUBST(CXXFLAGS_TESTEXE)
])
################################################################################
# platform independent
AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
[
#### OS DEFINES, these should be independent on toolchain
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CFLAGS_OS_DEF_JVM="-DLINUX"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
CFLAGS_OS_DEF_JVM="-DSOLARIS"
CFLAGS_OS_DEF_JDK="-D__solaris__"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
CFLAGS_OS_DEF_JVM="-DAIX"
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
fi
# Setup target OS define. Use OS target name but in upper case.
OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
#### GLOBAL DEFINES
# Set some common defines. These works for all compilers, but assume
# -D is universally accepted.
# Always enable optional macros for VM.
ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
# Setup some hard coded includes
ALWAYS_CFLAGS_JDK=" \
-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/hotspot/share/include \
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
###############################################################################
# Adjust flags according to debug level.
# Setup debug/release defines
if test "x$DEBUG_LEVEL" = xrelease; then
DEBUG_CFLAGS_JDK="-DNDEBUG"
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK -DTRIMMED"
fi
else
DEBUG_CFLAGS_JDK="-DDEBUG"
if test "x$TOOLCHAIN_TYPE" = xxlc; then
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
# Hotspot now overflows its 64K TOC (currently only for debug),
# so for debug we build with '-qpic=large -bbigtoc'.
DEBUG_CFLAGS_JVM="-qpic=large"
fi
fi
if test "x$DEBUG_LEVEL" != xrelease; then
DEBUG_OPTIONS_FLAGS_JDK="$CFLAGS_DEBUG_OPTIONS"
DEBUG_SYMBOLS_CFLAGS_JDK="$CFLAGS_DEBUG_SYMBOLS"
fi
#### TOOLCHAIN DEFINES
if test "x$TOOLCHAIN_TYPE" = xgcc; then
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
ALWAYS_DEFINES_JVM="-DSPARC_WORKS -D_Crun_inline_placement"
ALWAYS_DEFINES_JDK="-DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
ALWAYS_DEFINES_JDK_CXXONLY="-DCC_NOEX"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
ALWAYS_DEFINES_JVM="-D_REENTRANT"
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
fi
###############################################################################
#
#
# CFLAGS BASIC
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# COMMON to gcc and clang
TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new"
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX (but since this gives *worse* performance, use no-strict-aliasing everywhere!)
CXXSTD_CXXFLAG="-std=gnu++98"
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CXXSTD_CXXFLAG -Werror],
IF_FALSE: [CXXSTD_CXXFLAG=""])
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$CXXSTD_CXXFLAG"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CXXSTD_CXXFLAG"
ADLC_CXXFLAG="$CXXSTD_CXXFLAG"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
# Restrict the debug information created by Clang to avoid
# too big object files and speed the build up a little bit
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
if test "x$OPENJDK_TARGET_OS" = xlinux; then
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
TOOLCHAIN_CFLAGS_JDK="-mt"
TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -v -W0,-noglobal" # C only
TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
-library=stlport4 -mt -features=no%except"
if test "x$DEBUG_LEVEL" = xslowdebug; then
# Previously -g was used instead of -g0 for slowdebug; this is equivalent
# to setting +d.
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
fi
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
TOOLCHAIN_CFLAGS_JDK="-qchars=signed -qfullpath -qsaveopt" # add on both CFLAGS
TOOLCHAIN_CFLAGS_JVM="-qtune=balanced \
-qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
-qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
fi
# CFLAGS WARNINGS STUFF
# Set JVM_CFLAGS warning handling
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# COMMON to gcc and clang
WARNING_CFLAGS_JVM="-Wpointer-arith -Wsign-compare -Wunused-function"
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
# Non-zero builds have stricter warnings
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wundef -Wformat=2"
fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wunused-value -Woverloaded-virtual"
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
# Non-zero builds have stricter warnings
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wreturn-type"
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-deprecated"
if test "x$OPENJDK_TARGET_OS" = xlinux; then
WARNING_CFLAGS_JVM="$WARNING_CFLAGS_JVM -Wno-sometimes-uninitialized"
WARNING_CFLAGS_JDK="-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2"
fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
WARNING_CFLAGS_JDK_CONLY="-errshort=tags"
WARNING_CFLAGS_JDK_CXXONLY="+w"
WARNING_CFLAGS_JDK="-errtags=yes -errfmt"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
WARNING_CFLAGS="-W3"
WARNING_CFLAGS_JDK="-wd4800"
fi
# Set some additional per-OS defines.
# Additional macosx handling
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OS_CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
-mmacosx-version-min=$MACOSX_VERSION_MIN"
if test -n "$MACOSX_VERSION_MAX"; then
OS_CFLAGS="$OS_CFLAGS \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
fi
fi
# Where does this really belong??
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
PICFLAG="-fPIC"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
PICFLAG="-KPIC"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
# '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
# one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
# will have to patch this single instruction with a call to some out-of-order code which
# does the load from the TOC. This is of course slow. But in that case we also would have
# to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
# With 'qpic=large' the compiler will by default generate a two-instruction sequence which
# can be patched directly by the linker and does not require a jump to out-of-order code.
# Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
# instead. This creates a distinct TOC for every compilation unit (and thus requires two
# loads for accessing a global variable). But there are rumors that this may be seen as a
# 'performance feature' because of improved code locality of the symbols used in a
# compilation unit.
PICFLAG="-qpic"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
PICFLAG=""
fi
JVM_PICFLAG="$PICFLAG"
JDK_PICFLAG="$PICFLAG"
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Linking is different on MacOSX
JDK_PICFLAG=''
if test "x$STATIC_BUILD" = xtrue; then
JVM_PICFLAG=""
fi
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
fi
# Optional POSIX functionality needed by the JVM
#
# Check if clock_gettime is available and in which library. This indicates
# availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
# don't let it update LIBS.
save_LIBS="$LIBS"
AC_SEARCH_LIBS(clock_gettime, rt, [HAS_CLOCK_GETTIME=true], [])
if test "x$LIBS" = "x-lrt "; then
CLOCK_GETTIME_IN_LIBRT=true
fi
LIBS="$save_LIBS"
if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DSUPPORTS_CLOCK_MONOTONIC"
if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
OS_CFLAGS_JVM="$OS_CFLAGS_JVM -DNEEDS_LIBRT"
fi
fi
# EXPORT
AC_SUBST(ADLC_CXXFLAG)
])
################################################################################
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
# conditionals against.
# $2 - Optional prefix for each variable defined.
AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
[
#### CPU DEFINES, these should (in theory) be independent on toolchain
# Setup target CPU
# Setup endianness
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
$1_DEFINES_CPU_JVM="-DVM_LITTLE_ENDIAN"
fi
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN="
else
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN="
fi
else
if test "x$FLAGS_CPU_ENDIAN" = xlittle; then
$1_DEFINES_CPU_JDK="-D_LITTLE_ENDIAN"
else
$1_DEFINES_CPU_JDK="-D_BIG_ENDIAN"
fi
fi
# setup CPU bit size
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
-D$FLAGS_CPU_LEGACY"
if test "x$FLAGS_CPU_BITS" = x64; then
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
# unpack200.exe.
if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
fi
if test "x$FLAGS_OS" != xsolaris && test "x$FLAGS_OS" != xaix; then
# Solaris does not have _LP64=1 in the old build.
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
fi
fi
# toolchain dependend, per-cpu
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x$FLAGS_CPU_ARCH" = xx86; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DcpuIntel -Di586 -D$FLAGS_CPU_LEGACY_LIB"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
if test "x$FLAGS_CPU" = xx86_64; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
else
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86"
fi
fi
# CFLAGS PER CPU
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# COMMON to gcc and clang
if test "x$FLAGS_CPU" = xx86; then
# Force compatibility with i586 on 32 bit intel platforms.
$1_CFLAGS_CPU="-march=i586"
fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x$FLAGS_CPU" = xarm; then
# -Wno-psabi to get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
$1_CFLAGS_CPU_JVM="-DARM"
elif test "x$FLAGS_CPU" = xaarch64; then
if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
$1_CFLAGS_CPU_JVM="-fsigned-char -DARM"
fi
elif test "x$FLAGS_CPU_ARCH" = xppc; then
$1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
if test "x$FLAGS_CPU" = xppc64; then
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
# Use ppc64 instructions, but schedule for power5
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
elif test "x$FLAGS_CPU" = xppc64le; then
# Little endian machine uses ELFv2 ABI.
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
fi
elif test "x$FLAGS_CPU" = xs390x; then
$1_CFLAGS_CPU="-mbackchain -march=z10"
fi
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
# for all archs except arm and ppc, prevent gcc to omit frame pointer
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$FLAGS_OS" = xlinux; then
# ppc test not really needed for clang
if test "x$FLAGS_CPU_ARCH" != xarm && test "x$FLAGS_CPU_ARCH" != xppc; then
# for all archs except arm and ppc, prevent gcc to omit frame pointer
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x$FLAGS_CPU" = xx86_64; then
# NOTE: -xregs=no%frameptr is supposed to be default on x64
$1_CFLAGS_CPU_JDK="-xregs=no%frameptr"
elif test "x$FLAGS_CPU" = xsparcv9; then
$1_CFLAGS_CPU_JVM="-xarch=sparc"
$1_CFLAGS_CPU_JDK_LIBONLY="-xregs=no%appl"
fi
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
if test "x$FLAGS_CPU" = xppc64; then
$1_CFLAGS_CPU_JVM="-qarch=ppc64"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
if test "x$FLAGS_CPU" = xx86; then
$1_CFLAGS_CPU_JVM="-arch:IA32"
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$DEBUG_LEVEL" != xrelease; then
# NOTE: This is probably redundant; -homeparams is default on
# non-release builds.
$1_CFLAGS_CPU_JVM="-homeparams"
fi
fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: 6, PREFIX: $2, IF_AT_LEAST: FLAGS_SETUP_GCC6_COMPILER_FLAGS($1))
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
fi
# EXPORT to API
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM $TOOLCHAIN_CFLAGS_JVM \
$OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG"
CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
$OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
$WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK"
# Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
# (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
# change in the future.)
CFLAGS_JDK_COMMON_CONLY="$TOOLCHAIN_CFLAGS_JDK_CONLY \
$WARNING_CFLAGS_JDK_CONLY ${$2EXTRA_CFLAGS}"
CFLAGS_JDK_COMMON_CXXONLY="$ALWAYS_DEFINES_JDK_CXXONLY $TOOLCHAIN_CFLAGS_JDK_CXXONLY \
$WARNING_CFLAGS_JDK_CXXONLY ${$2EXTRA_CXXFLAGS}"
$1_CFLAGS_JVM="${$1_DEFINES_CPU_JVM} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JVM} ${$1_TOOLCHAIN_CFLAGS} ${$1_WARNING_CFLAGS_JVM}"
$1_CFLAGS_JDK="${$1_DEFINES_CPU_JDK} ${$1_CFLAGS_CPU} ${$1_CFLAGS_CPU_JDK} ${$1_TOOLCHAIN_CFLAGS}"
$2JVM_CFLAGS="$CFLAGS_JVM_COMMON ${$1_CFLAGS_JVM} ${$2EXTRA_CXXFLAGS}"
$2CFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CONLY ${$1_CFLAGS_JDK}"
$2CXXFLAGS_JDKEXE="$CFLAGS_JDK_COMMON $CFLAGS_JDK_COMMON_CXXONLY ${$1_CFLAGS_JDK}"
$2CFLAGS_JDKLIB="${$2CFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
$2CXXFLAGS_JDKLIB="${$2CXXFLAGS_JDKEXE} $JDK_PICFLAG ${$1_CFLAGS_CPU_JDK_LIBONLY}"
AC_SUBST($2JVM_CFLAGS)
AC_SUBST($2CFLAGS_JDKLIB)
AC_SUBST($2CFLAGS_JDKEXE)
AC_SUBST($2CXXFLAGS_JDKLIB)
AC_SUBST($2CXXFLAGS_JDKEXE)
])
# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
# Arguments:
# $1 - Prefix for each variable defined.
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
[
# These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
# runs afoul of the more aggressive versions of these optimisations.
# Notably, value range propagation now assumes that the this pointer of C++
# member functions is non-null.
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
dnl IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
dnl Argument check is disabled until FLAGS_COMPILER_CHECK_ARGUMENTS handles cross-compilation
dnl FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG -Werror],
dnl IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
AC_MSG_NOTICE([GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}])
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
])
# Documentation on common flags used for solstudio in HIGHEST.
#
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
# done with care, there are some assumptions below that need to
# be understood about the use of pointers, and IEEE behavior.
#
# -fns: Use non-standard floating point mode (not IEEE 754)
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
# -fsingle: Use single precision floating point with 'float'
# -xalias_level=basic: Assume memory references via basic pointer types do not alias
# (Source with excessing pointer casting and data access with mixed
# pointer types are not recommended)
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
# (If you expect perfect errno behavior, do not use this)
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
# -xrestrict: Pointer parameters to functions do not overlap
# (Similar to -xalias_level=basic usage, but less obvious sometimes.
# If you pass in multiple pointers to the same data, do not use this)
# -xlibmil: Inline some library routines
# (If you expect perfect errno behavior, do not use this)
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
# (If you expect perfect errno behavior, do not use this)
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now

View File

@ -0,0 +1,212 @@
#
# 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
# 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.
#
################################################################################
#
AC_DEFUN([FLAGS_SETUP_LDFLAGS],
[
FLAGS_SETUP_LDFLAGS_HELPER
# Setup the target toolchain
# On some platforms (mac) the linker warns about non existing -L dirs.
# For any of the variants server, client or minimal, the dir matches the
# variant name. The "main" variant should be used for linking. For the
# rest, the dir is just server.
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
else
TARGET_JVM_VARIANT_PATH=server
fi
FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
# Setup the build toolchain
# When building a buildjdk, it's always only the server variant
BUILD_JVM_VARIANT_PATH=server
FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE ${TARGET_LDFLAGS_JDK_LIBPATH}"
AC_SUBST(LDFLAGS_TESTLIB)
AC_SUBST(LDFLAGS_TESTEXE)
])
################################################################################
# CPU independent LDFLAGS setup, used for both target and build toolchain.
AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
[
# Setup basic LDFLAGS
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why?
# We have previously set HAS_GNU_HASH if this is the case
if test -n "$HAS_GNU_HASH"; then
BASIC_LDFLAGS="-Wl,--hash-style=both"
LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
fi
# Add -z defs, to forbid undefined symbols in object files.
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs"
BASIC_LDFLAGS_JVM_ONLY="-Wl,-z,noexecstack -Wl,-O1 -Wl,-z,relro"
BASIC_LDFLAGS_JDK_LIB_ONLY="-Wl,-z,noexecstack"
LIBJSIG_NOEXECSTACK_LDFLAGS="-Wl,-z,noexecstack"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
-stdlib=libstdc++ -fPIC"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
BASIC_LDFLAGS="-Wl,-z,defs"
BASIC_LDFLAGS_ONLYCXX="-norunpath"
BASIC_LDFLAGS_ONLYCXX_JDK_ONLY="-xnolib"
BASIC_LDFLAGS_JDK_ONLY="-ztext"
BASIC_LDFLAGS_JVM_ONLY="-library=%none -mt -z noversion"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
BASIC_LDFLAGS="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K \
-bdatapsize:64K -bstackpsize:64K"
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
BASIC_LDFLAGS="-nologo -opt:ref"
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000"
fi
# Setup OS-dependent LDFLAGS
if test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Assume clang or gcc.
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
OS_LDFLAGS_JDK_ONLY="-mmacosx-version-min=$MACOSX_VERSION_MIN"
fi
fi
# Setup debug level-dependent LDFLAGS
if test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x$OPENJDK_TARGET_OS" = xlinux; then
if test x$DEBUG_LEVEL = xrelease; then
DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
else
# mark relocations read only on (fast/slow) debug builds
DEBUGLEVEL_LDFLAGS_JDK_ONLY="-Wl,-z,relro"
fi
if test x$DEBUG_LEVEL = xslowdebug; then
# do relocations at load
DEBUGLEVEL_LDFLAGS="-Wl,-z,now"
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
# We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
# Hotspot now overflows its 64K TOC (currently only for debug),
# so we build with '-qpic=large -bbigtoc'.
if test "x$DEBUG_LEVEL" != xrelease; then
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
fi
fi
# Setup LDFLAGS for linking executables
if test "x$TOOLCHAIN_TYPE" = xgcc; then
EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
fi
# Export some intermediate variables for compatibility
LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
AC_SUBST(LDFLAGS_CXX_JDK)
AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
])
################################################################################
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
# conditionals against.
# $2 - Optional prefix for each variable defined.
AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
[
# Setup CPU-dependent basic LDFLAGS. These can differ between the target and
# build toolchain.
if test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x${OPENJDK_$1_CPU}" = xx86; then
$1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
elif test "x$OPENJDK_$1_CPU" = xarm; then
$1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
elif test "x$FLAGS_CPU" = xaarch64; then
if test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
$1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
fi
fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x${OPENJDK_$1_CPU}" = "xsparcv9"; then
$1_CPU_LDFLAGS_JVM_ONLY="-xarch=sparc"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
if test "x${OPENJDK_$1_CPU}" = "xx86"; then
$1_CPU_LDFLAGS="-safeseh"
# NOTE: Old build added -machine. Probably not needed.
$1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
$1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
else
$1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
$1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
fi
fi
# JVM_VARIANT_PATH depends on if this is build or target...
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
$1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
else
$1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
fi
# Export variables according to old definitions, prefix with $2 if present.
LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
$OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
${$1_CPU_EXECUTABLE_LDFLAGS}"
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
AC_SUBST($2LDFLAGS_JDKLIB)
AC_SUBST($2LDFLAGS_JDKEXE)
AC_SUBST($2JVM_LDFLAGS)
])

View File

@ -0,0 +1,126 @@
#
# 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
# 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.
#
################################################################################
#
# Setup flags for other tools than C/C++ compiler
#
AC_DEFUN([FLAGS_SETUP_ARFLAGS],
[
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ARFLAGS="-r -mmacosx-version-min=$MACOSX_VERSION_MIN"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
ARFLAGS="-X64"
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
# lib.exe is used as AR to create static libraries.
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
else
ARFLAGS=""
fi
AC_SUBST(ARFLAGS)
])
AC_DEFUN([FLAGS_SETUP_STRIPFLAGS],
[
## Setup strip.
# FIXME: should this really be per platform, or should it be per toolchain type?
# strip is not provided by clang or solstudio; so guessing platform makes most sense.
# FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
if test "x$OPENJDK_TARGET_OS" = xlinux; then
STRIPFLAGS="-g"
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
STRIPFLAGS="-x"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
STRIPFLAGS="-S"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
STRIPFLAGS="-X32_64"
fi
AC_SUBST(STRIPFLAGS)
])
AC_DEFUN([FLAGS_SETUP_RCFLAGS],
[
# On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l0x409"
JVM_RCFLAGS="-nologo"
if test "x$DEBUG_LEVEL" = xrelease; then
RC_FLAGS="$RC_FLAGS -DNDEBUG"
JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
fi
# The version variables used to create RC_FLAGS may be overridden
# in a custom configure script, or possibly the command line.
# Let those variables be expanded at make time in spec.gmk.
# The \$ are escaped to the shell, and the $(...) variables
# are evaluated by make.
RC_FLAGS="$RC_FLAGS \
-D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-D\"JDK_VER=\$(VERSION_NUMBER)\" \
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
-D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
JVM_RCFLAGS="$JVM_RCFLAGS \
-D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
-D\"HS_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
-D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
-D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
-D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
-D\"HS_FNAME=jvm.dll\" \
-D\"HS_INTERNAL_NAME=jvm\""
fi
AC_SUBST(RC_FLAGS)
AC_SUBST(JVM_RCFLAGS)
])
################################################################################
# platform independent
AC_DEFUN([FLAGS_SETUP_ASFLAGS],
[
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
JVM_BASIC_ASFLAGS="-x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
fi
])
################################################################################
# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
# conditionals against.
# $2 - Optional prefix for each variable defined.
AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
[
# Misuse EXTRA_CFLAGS to mimic old behavior
$2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
AC_SUBST($2JVM_ASFLAGS)
])

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
[
# Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetype, cups, alsa etc
# $1 is the help tag: cups, alsa etc
MISSING_DEPENDENCY=$1
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@ -76,24 +76,6 @@ cygwin_help() {
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
freetype)
HELP_MSG="
The freetype library can now be build during the configure process.
Download the freetype sources and unpack them into an arbitrary directory:
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
tar -xzf freetype-2.5.3.tar.gz
Then run configure with '--with-freetype-src=<freetype_src>'. This will
automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
builds or into '<freetype_src>/lib32' for 32-bit builds.
Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
and '--with-freetype-lib=<freetype_src>/lib[32|64]' for other builds.
Alternatively you can unpack the sources like this to use the default directory:
tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
;;
esac
}

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
@ -277,13 +277,9 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
if test "x$OPENJDK_TARGET_CPU" = xarm; then
HOTSPOT_TARGET_CPU=arm_32
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
HOTSPOT_TARGET_CPU=arm_64
HOTSPOT_TARGET_CPU_ARCH=arm
JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
fi
# Verify that dependencies are met for explicitly set features.

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
@ -23,91 +23,6 @@
# questions.
#
################################################################################
# Build the freetype lib from source
################################################################################
AC_DEFUN([LIB_BUILD_FREETYPE],
[
FREETYPE_SRC_PATH="$1"
BUILD_FREETYPE=yes
# Check if the freetype sources are acessible..
if ! test -d $FREETYPE_SRC_PATH; then
AC_MSG_WARN([--with-freetype-src specified, but can not find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
BUILD_FREETYPE=no
fi
# ..and contain a vc2010 project file
vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
AC_MSG_WARN([Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
BUILD_FREETYPE=no
fi
# Now check if configure found a version of 'msbuild.exe'
if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
BUILD_FREETYPE=no
fi
# Ready to go..
if test "x$BUILD_FREETYPE" = xyes; then
# msbuild requires trailing slashes for output directories
freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
freetype_lib_path_unix="$freetype_lib_path"
freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
freetype_platform=x64
else
freetype_platform=win32
fi
# The original freetype project file is for VS 2010 (i.e. 'v100'),
# so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
# Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
# 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
# First we try to build the freetype.dll
$ECHO -e "@echo off\n"\
"$MSBUILD $vcxproj_path "\
"/p:PlatformToolset=$PLATFORM_TOOLSET "\
"/p:Configuration=\"Release Multithreaded\" "\
"/p:Platform=$freetype_platform "\
"/p:ConfigurationType=DynamicLibrary "\
"/p:TargetName=freetype "\
"/p:OutDir=\"$freetype_lib_path\" "\
"/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
cmd /c freetype.bat
if test -s "$freetype_lib_path_unix/freetype.dll"; then
# If that succeeds we also build freetype.lib
$ECHO -e "@echo off\n"\
"$MSBUILD $vcxproj_path "\
"/p:PlatformToolset=$PLATFORM_TOOLSET "\
"/p:Configuration=\"Release Multithreaded\" "\
"/p:Platform=$freetype_platform "\
"/p:ConfigurationType=StaticLibrary "\
"/p:TargetName=freetype "\
"/p:OutDir=\"$freetype_lib_path\" "\
"/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
cmd /c freetype.bat
if test -s "$freetype_lib_path_unix/freetype.lib"; then
# Once we build both, lib and dll, set freetype lib and include path appropriately
POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
else
BUILD_FREETYPE=no
fi
else
BUILD_FREETYPE=no
fi
fi
])
################################################################################
# Check if a potential freeype library match is correct and usable
################################################################################
@ -122,7 +37,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
# First look for the canonical freetype main include file ft2build.h.
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
# Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
# Oh no! Let's try in the freetype2 directory.
POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
# Fail.
@ -130,33 +45,16 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
fi
fi
if test "x$FOUND_FREETYPE" = xyes; then
if test "x$FOUND_FREETYPE" = "xyes"; then
# Include file found, let's continue the sanity check.
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
# Reset to default value
FREETYPE_BASE_NAME=freetype
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
if test "x$OPENJDK_TARGET_OS" = xmacosx \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
# On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
# for the .6 version explicitly.
FREETYPE_BASE_NAME=freetype.6
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
else
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
FOUND_FREETYPE=no
fi
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
FOUND_FREETYPE=no
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
if test "x$OPENJDK_TARGET_OS" = "xsolaris" \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
@ -165,10 +63,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
fi
fi
if test "x$FOUND_FREETYPE" = xyes; then
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
if test "x$FOUND_FREETYPE" = "xyes"; then
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
AC_MSG_CHECKING([for freetype includes])
AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
@ -184,293 +79,147 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
[
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
[specify prefix directory for the freetype package
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
[specify whether to use 'system' or 'bundled' freetype. Other values are errors.
The selected option applies to both build time and run time.
The default behaviour can be platform dependent.
If using 'system' and either the include files or libraries cannot be
located automatically, then additionally specify both using
--with-freetype-include and --with-freetype-lib.])])
AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
[specify directory for the freetype include files])])
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
[specify directory for the freetype library])])
AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
[specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
[disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
AC_ARG_WITH(freetype-license, [AS_HELP_STRING([--with-freetype-license],
[if bundling freetype, also bundle this license file])])
# Need to specify explicitly since it needs to be overridden on some versions of macosx
# This setup is to verify access to system installed freetype header and libraries.
# On Windows and MacOS this does not apply and using these options will report an error.
# On other platforms (Linux, Solaris, and perhaps AIX), they will default to using
# the system libraries. If they are found automatically, nothing need be done.
# If they are not found, the configure "--with-freetype-*" options may be used to fix that.
# If the preference is to bundle on these platforms then use --with-freetype=bundled
FREETYPE_BASE_NAME=freetype
FREETYPE_CFLAGS=
FREETYPE_LIBS=
FREETYPE_BUNDLE_LIB_PATH=
if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
if (test "x$with_freetype" != x && test "x$with_freetype" != xno) || \
(test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
(test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
(test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
AC_MSG_WARN([[freetype not used, so --with-freetype[-*] is ignored]])
fi
if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
fi
else
# freetype is needed to build; go get it!
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
AC_MSG_ERROR(['must specify both or neither of --with_freetype_include and --with_freetype_lib])
fi
BUNDLE_FREETYPE="$enable_freetype_bundling"
if test "x$with_freetype_src" != x; then
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# Try to build freetype if --with-freetype-src was given on Windows
LIB_BUILD_FREETYPE([$with_freetype_src])
if test "x$BUILD_FREETYPE" = xyes; then
# Okay, we built it. Check that it works.
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
if test "x$FOUND_FREETYPE" != xyes; then
AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
fi
else
AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
fi
else
AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
fi
fi
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
# User has specified settings
if test "x$BUNDLE_FREETYPE" = x; then
# If not specified, default is to bundle freetype
BUNDLE_FREETYPE=yes
fi
if test "x$with_freetype" != x; then
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
fi
# Allow --with-freetype-lib and --with-freetype-include to override
if test "x$with_freetype_include" != x; then
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
fi
if test "x$with_freetype_lib" != x; then
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
fi
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
# Okay, we got it. Check that it works.
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
if test "x$FOUND_FREETYPE" != xyes; then
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
fi
else
# User specified only one of lib or include. This is an error.
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
else
AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
fi
FREETYPE_TO_USE=bundled
if (test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_OS" != "xmacosx"); then
FREETYPE_TO_USE=system
fi
if (test "x$with_freetype" != "x"); then
if (test "x$with_freetype" = "xsystem"); then
FREETYPE_TO_USE=system
elif (test "x$with_freetype" = "xbundled"); then
FREETYPE_TO_USE=bundled
if (test "x$with_freetype_include" != "x" || test "x$with_freetype_lib" != "x"); then
AC_MSG_ERROR(['bundled' cannot be specified with --with_freetype_include and --with_freetype_lib])
fi
else
# User did not specify settings, but we need freetype. Try to locate it.
AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
fi
fi
if test "x$BUNDLE_FREETYPE" = x; then
# If not specified, default is to bundle freetype only on windows
if test "x$OPENJDK_TARGET_OS" = xwindows; then
BUNDLE_FREETYPE=yes
else
BUNDLE_FREETYPE=no
fi
if (test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" != "x"); then
FREETYPE_TO_USE=system
fi
if (test "x$FREETYPE_TO_USE" = "xsystem") && \
(test "x$OPENJDK_TARGET_OS" = "xwindows" || test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
fi
if (test "x$with_freetype_include" != "x"); then
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
fi
if (test "x$with_freetype_lib" != "x"); then
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
fi
if (test "x$FREETYPE_TO_USE" = "xsystem"); then
if (test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x"); then
# Okay, we got it. Check that it works.
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
if (test "x$FOUND_FREETYPE" != "xyes"); then
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype-lib|include])
fi
else
# User did not specify a location, but asked for system freetype. Try to locate it.
# If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
if test "x$SYSROOT" = x; then
if test "x$FOUND_FREETYPE" != xyes; then
if (test "x$SYSROOT" = "x"); then
if (test "x$FOUND_FREETYPE" != "xyes"); then
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
if test "x$PKG_CONFIG" != x; then
if (test "x$PKG_CONFIG" != "x"); then
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
if test "x$FOUND_FREETYPE" = xyes; then
if (test "x$FOUND_FREETYPE" = "xyes"); then
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if (test "x$OPENJDK_TARGET_OS" = "xsolaris" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
# PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
if test "x$BUNDLE_FREETYPE" = xyes; then
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
FOUND_FREETYPE=no
else
AC_MSG_CHECKING([for freetype])
AC_MSG_RESULT([yes (using pkg-config)])
fi
AC_MSG_CHECKING([for freetype])
AC_MSG_RESULT([yes (using pkg-config)])
fi
fi
fi
fi
if test "x$FOUND_FREETYPE" != xyes; then
if (test "x$FOUND_FREETYPE" != "xyes"); then
# Check in well-known locations
if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
FREETYPE_BASE_DIR="$SYSROOT/usr"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
if (test "x$FOUND_FREETYPE" != "xyes"); then
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$HOME/freetype"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
else
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
fi
if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
&& test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
# Source is available, as a last resort try to build freetype in default location
LIB_BUILD_FREETYPE($FREETYPE_BASE_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
else
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
fi
fi
fi
else
fi
if (test "x$FOUND_FREETYPE" != "xyes"); then
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if (test "x$FOUND_FREETYPE" != "xyes"); then
FREETYPE_BASE_DIR="$SYSROOT/usr"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr/local"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$FOUND_FREETYPE" != xyes; then
# Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
fi
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
else
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
if test "x$FOUND_FREETYPE" != xyes; then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
fi
if (test "x$OPENJDK_TARGET_CPU_BITS" = "x64"); then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
else
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
if (test "x$FOUND_FREETYPE" != "xyes"); then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
fi
fi
fi
fi # end check in well-known locations
if test "x$FOUND_FREETYPE" != xyes; then
if (test "x$FOUND_FREETYPE" != "xyes"); then
HELP_MSG_MISSING_DEPENDENCY([freetype])
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
fi
fi # end user specified settings
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
if test "x$FREETYPE_CFLAGS" = x; then
BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
if (test "x$FREETYPE_CFLAGS" = "x"); then
if (test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype); then
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
else
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
fi
fi
if test "x$FREETYPE_LIBS" = x; then
BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
else
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
if (test "x$FREETYPE_LIBS" = "x"); then
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
fi
# Try to compile it
AC_MSG_CHECKING([if we can compile and link with freetype])
AC_LANG_PUSH(C++)
PREV_CXXCFLAGS="$CXXFLAGS"
PREV_LIBS="$LIBS"
PREV_CXX="$CXX"
CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS"
CXX="$FIXPATH $CXX"
AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include<ft2build.h>
#include FT_FREETYPE_H
int main () {
FT_Init_FreeType(NULL);
return 0;
}
]])],
[
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
HELP_MSG_MISSING_DEPENDENCY([freetype])
AC_MSG_RESULT([Using freetype: $FREETYPE_TO_USE])
AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
]
)
CXXCFLAGS="$PREV_CXXFLAGS"
LIBS="$PREV_LIBS"
CXX="$PREV_CXX"
AC_LANG_POP(C++)
AC_MSG_CHECKING([if we should bundle freetype])
if test "x$BUNDLE_FREETYPE" = xyes; then
FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
fi
AC_MSG_RESULT([$BUNDLE_FREETYPE])
if test "x$BUNDLE_FREETYPE" = xyes; then
FREETYPE_LICENSE=""
AC_MSG_CHECKING([for freetype license])
if test "x$with_freetype_license" = "xyes"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([--with-freetype-license must have a value])
elif test "x$with_freetype_license" != "x"; then
AC_MSG_RESULT([$with_freetype_license])
FREETYPE_LICENSE="$with_freetype_license"
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
if test ! -f "$FREETYPE_LICENSE"; then
AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found])
fi
else
if test "x$with_freetype" != "x" && test -f $with_freetype/freetype.md; then
FREETYPE_LICENSE="$with_freetype/freetype.md"
AC_MSG_RESULT([$FREETYPE_LICENSE])
BASIC_FIXUP_PATH(FREETYPE_LICENSE)
else
AC_MSG_RESULT([no])
fi
fi
fi
fi # end freetype needed
AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
AC_SUBST(FREETYPE_TO_USE)
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_LICENSE)
])

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
@ -81,6 +81,9 @@ AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
LIBCXX_JVM="-lCrun"
fi
AC_SUBST(LIBCXX)

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
@ -101,6 +101,67 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
LIB_SETUP_SOLARIS_STLPORT
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
GLOBAL_LIBS="-lc"
else
GLOBAL_LIBS=""
fi
BASIC_JDKLIB_LIBS=""
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
BASIC_JDKLIB_LIBS="-ljava -ljvm"
fi
# Math library
if test "x$OPENJDK_TARGET_OS" != xsolaris; then
BASIC_JVM_LIBS="$LIBM"
else
# FIXME: This hard-coded path is not really proper.
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
BASIC_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
BASIC_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
fi
BASIC_JVM_LIBS="$BASIC_SOLARIS_LIBM_LIBS"
fi
# Dynamic loading library
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
fi
# Threading library
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
-lrt"
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
wsock32.lib winmm.lib version.lib psapi.lib"
fi
JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
JDKEXE_LIBS=""
JVM_LIBS="$BASIC_JVM_LIBS"
OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
AC_SUBST(JDKLIB_LIBS)
AC_SUBST(JDKEXE_LIBS)
AC_SUBST(JVM_LIBS)
AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
AC_SUBST(GLOBAL_LIBS)
])
################################################################################

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
@ -403,15 +403,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
if test "x$OPENJDK_$1_CPU_BITS" = x64; then
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
# unpack200.exe. This variable is used in
# FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
if test "x$OPENJDK_$1_OS" = xlinux || test "x$OPENJDK_$1_OS" = xmacosx; then
OPENJDK_$1_ADD_LP64="-D_LP64=1"
fi
fi
if test "x$COMPILE_TYPE" = "xcross"; then
# FIXME: ... or should this include reduced builds..?
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_$1_CPU_LEGACY"
@ -563,31 +554,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
AC_SUBST(OS_VERSION_MICRO)
])
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
# Add -mX to various FLAGS variables.
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
[
# When we add flags to the "official" CFLAGS etc, we need to
# keep track of these additions in ADDED_CFLAGS etc. These
# will later be checked to make sure only controlled additions
# have been made to CFLAGS etc.
ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[
###############################################################################
@ -597,22 +563,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
# is made at runtime.)
#
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
# Always specify -m flag on Solaris
# And -q on AIX because otherwise the compiler produces 32-bit objects by default
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
# Specify -m if running reduced on unix platforms
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
fi
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
fi
# Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
@ -635,33 +585,14 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
# This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
# Let's try to implicitely set the compilers target architecture and retry the test
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
# We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
unset ac_cv_sizeof_int_p
# And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
cat >>confdefs.h <<_ACEOF
#undef SIZEOF_INT_P
_ACEOF
AC_CHECK_SIZEOF([int *], [1111])
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
if test "x$COMPILE_TYPE" = xreduced; then
HELP_MSG_MISSING_DEPENDENCY([reduced])
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
elif test "x$COMPILE_TYPE" = xcross; then
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
AC_MSG_ERROR([Cannot continue.])
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
if test "x$COMPILE_TYPE" = xreduced; then
HELP_MSG_MISSING_DEPENDENCY([reduced])
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
elif test "x$COMPILE_TYPE" = xcross; then
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
AC_MSG_ERROR([Cannot continue.])
fi
fi

View File

@ -332,10 +332,9 @@ TEST_JOBS?=@TEST_JOBS@
# Default make target
DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
FREETYPE_TO_USE:=@FREETYPE_TO_USE@
FREETYPE_LIBS:=@FREETYPE_LIBS@
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
FREETYPE_LICENSE=@FREETYPE_LICENSE@
FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
CUPS_CFLAGS:=@CUPS_CFLAGS@
ALSA_LIBS:=@ALSA_LIBS@
@ -423,7 +422,7 @@ CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
ADLC_CXXFLAG=@ADLC_CXXFLAG@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
@ -436,11 +435,10 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
LDFLAGS_NO_EXEC_STACK := @LDFLAGS_NO_EXEC_STACK@
LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
JVM_CFLAGS := @JVM_CFLAGS@
JVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
JVM_LDFLAGS := @JVM_LDFLAGS@
JVM_ASFLAGS := @JVM_ASFLAGS@
JVM_LIBS := @JVM_LIBS@
@ -469,6 +467,7 @@ USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
JDKLIB_LIBS:=@JDKLIB_LIBS@
GLOBAL_LIBS:=@GLOBAL_LIBS@
# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
@ -524,7 +523,6 @@ SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
# Options for C/CXX compiler to be used if linking is performed
# using reorder file
C_FLAG_REORDER:=@C_FLAG_REORDER@
CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
#
# Options for generating debug symbols
@ -533,7 +531,6 @@ COPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@
ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
#
# Compress (or not) jars
@ -710,6 +707,7 @@ CYGPATH:=@CYGPATH@
LDD:=@LDD@
OTOOL:=@OTOOL@
READELF:=@READELF@
ELFEDIT:=@ELFEDIT@
EXPR:=@EXPR@
FILE:=@FILE@
DOT:=@DOT@

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
@ -52,11 +52,14 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
TOOLCHAIN_MINIMUM_VERSION_gcc="4.8"
TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Minimum supported linker versions, empty means unspecified
TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.18"
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
# $1 - optional variable prefix for compiler and version variables (BUILD_)
@ -114,6 +117,57 @@ BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
fi
])
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
# Must have LD_VERSION_NUMBER.
# $1 - optional variable prefix for compiler and version variables (BUILD_)
# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
AC_DEFUN([TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS],
[
if [ [[ "[$]$1LD_VERSION_NUMBER" =~ (.*\.){4} ]] ]; then
AC_MSG_WARN([Linker version number has more than four parts (W.X.Y.Z): [$]$1LD_VERSION_NUMBER. Comparisons might be wrong.])
fi
if [ [[ "[$]$1LD_VERSION_NUMBER" =~ [0-9]{6} ]] ]; then
AC_MSG_WARN([Linker version number has a part larger than 99999: [$]$1LD_VERSION_NUMBER. Comparisons might be wrong.])
fi
$2COMPARABLE_ACTUAL_LD_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "[$]$1LD_VERSION_NUMBER"`
])
# Check if the configured linker is of a specific version or
# newer. TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS must have been called before.
#
# Arguments:
# VERSION: The version string to check against the found version
# IF_AT_LEAST: block to run if the compiler is at least this version (>=)
# IF_OLDER_THAN: block to run if the compiler is older than this version (<)
# PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_LINKER_VERSION],
[*VERSION PREFIX IF_AT_LEAST IF_OLDER_THAN], [$@],
[
# Need to assign to a variable since m4 is blocked from modifying parts in [].
REFERENCE_VERSION=ARG_VERSION
if [ [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ]; then
AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only four parts (W.X.Y.Z) is supported])
fi
if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
AC_MSG_ERROR([Internal error: Cannot compare to ARG_VERSION, only parts < 99999 is supported])
fi
# Version comparison method inspired by http://stackoverflow.com/a/24067243
COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$REFERENCE_VERSION"`
if test [$]ARG_PREFIX[COMPARABLE_ACTUAL_LD_VERSION] -ge $COMPARABLE_REFERENCE_VERSION ; then
:
ARG_IF_AT_LEAST
else
:
ARG_IF_OLDER_THAN
fi
])
# Setup a number of variables describing how native output files are
# named on this platform/toolchain.
AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
@ -241,6 +295,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_MINIMUM_LD_VERSION_$TOOLCHAIN_TYPE
TOOLCHAIN_MINIMUM_LD_VERSION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
@ -524,6 +580,76 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
])
# Retrieve the linker version number and store it in LD_VERSION_NUMBER
# (as a dotted number), and
# the full version string in LD_VERSION_STRING.
#
# $1 = linker to test (LD or BUILD_LD)
# $2 = human readable name of linker (Linker or BuildLinker)
AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
[
LINKER=[$]$1
LINKER_NAME=$2
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
# cc -Wl,-V output typically looks like
# ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2329
# solstudio cc requires us to have an existing file to pass as argument,
# but it need not be a syntactically correct C file, so just use
# ourself. :)
LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
LINKER_VERSION_STRING="Unknown"
LINKER_VERSION_NUMBER="0.0"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# There is no specific version flag, but all output starts with a version string.
# First line typically looks something like:
# Microsoft (R) Incremental Linker Version 12.00.31101.0
LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
# gcc -Wl,-version output typically looks like
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
# Copyright (C) 2015 Free Software Foundation, Inc.
# This program is free software; [...]
LINKER_VERSION_STRING=`$LD -Wl,-version 2>&1 | $HEAD -n 1`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
elif test "x$TOOLCHAIN_TYPE" = xclang; then
# clang -Wl,-v output typically looks like
# @(#)PROGRAM:ld PROJECT:ld64-305
# configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
# Library search paths: [...]
# or
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
LINKER_VERSION_STRING=`$LD -Wl,-v 2>&1 | $HEAD -n 1`
# Check if we're using the GNU ld
$ECHO "$LINKER_VERSION_STRING" | $GREP "GNU" > /dev/null
if test $? -eq 0; then
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
else
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.*-\([0-9][0-9]*\)/\1/'` ]
fi
fi
$1_VERSION_NUMBER="$LINKER_VERSION_NUMBER"
$1_VERSION_STRING="$LINKER_VERSION_STRING"
AC_MSG_NOTICE([Using $TOOLCHAIN_TYPE $LINKER_NAME version $LINKER_VERSION_NUMBER @<:@$LINKER_VERSION_STRING@:>@])
])
# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
# archiver (AR). Verify that the compilers are correct according to the
@ -591,6 +717,17 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)
AC_SUBST(LDCXX)
TOOLCHAIN_EXTRACT_LD_VERSION([LD], [linker])
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS
if test "x$TOOLCHAIN_MINIMUM_LD_VERSION" != x; then
TOOLCHAIN_CHECK_LINKER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_LD_VERSION,
IF_OLDER_THAN: [
AC_MSG_WARN([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.])
]
)
fi
#
# Setup the assembler (AS)
#
@ -783,7 +920,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
@ -819,6 +955,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
TOOLCHAIN_EXTRACT_COMPILER_VERSION(BUILD_CC, [BuildC])
TOOLCHAIN_EXTRACT_COMPILER_VERSION(BUILD_CXX, [BuildC++])
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
TOOLCHAIN_EXTRACT_LD_VERSION(BUILD_LD, [build linker])
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
else
# If we are not cross compiling, use the normal target compilers for
# building the build platform executables.
@ -830,11 +968,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
BUILD_AS="$AS"
BUILD_OBJCOPY="$OBJCOPY"
BUILD_STRIP="$STRIP"
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
BUILD_AR="$AR"
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS([], [OPENJDK_BUILD_])
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS([BUILD_], [OPENJDK_BUILD_])
fi
AC_SUBST(BUILD_CC)
@ -843,8 +980,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
AC_SUBST(BUILD_LDCXX)
AC_SUBST(BUILD_NM)
AC_SUBST(BUILD_AS)
AC_SUBST(BUILD_SYSROOT_CFLAGS)
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
AC_SUBST(BUILD_AR)
])
@ -876,24 +1011,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
# If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
# This is later checked when setting flags.
# "-Og" suppported for GCC 4.8 and later
CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$CFLAG_OPTIMIZE_DEBUG_FLAG],
IF_TRUE: [HAS_CFLAG_OPTIMIZE_DEBUG=true],
IF_FALSE: [HAS_CFLAG_OPTIMIZE_DEBUG=false])
# "-z relro" supported in GNU binutils 2.17 and later
LINKER_RELRO_FLAG="-Wl,-z,relro"
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_RELRO_FLAG],
IF_TRUE: [HAS_LINKER_RELRO=true],
IF_FALSE: [HAS_LINKER_RELRO=false])
# "-z now" supported in GNU binutils 2.11 and later
LINKER_NOW_FLAG="-Wl,-z,now"
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$LINKER_NOW_FLAG],
IF_TRUE: [HAS_LINKER_NOW=true],
IF_FALSE: [HAS_LINKER_NOW=false])
fi
# Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed

View File

@ -77,7 +77,7 @@ 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_EDITIONS_2017="BuildTools Community Professional Enterprise"
VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=

View File

@ -32,6 +32,7 @@ DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_DATE=2018-09-18
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11"
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK

View File

@ -0,0 +1,119 @@
#
# 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.
#
ifndef _JDK_NATIVE_COMPILATION_GMK
_JDK_NATIVE_COMPILATION_GMK := 1
ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JdkNativeCompilation.gmk)
endif
include NativeCompilation.gmk
# Setup make rules for creating a native shared library with suitable defaults
# for the OpenJDK project.
#
# 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 are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
SetupJdkLibrary = $(NamedParamsMacroTemplate)
define SetupJdkLibraryBody
ifeq ($$($1_OUTPUT_DIR), )
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE))
endif
ifeq ($$($1_OBJECT_DIR), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME)
endif
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).dll" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x2L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1, ))
endef
# Setup make rules for creating a native executable with suitable defaults for
# the OpenJDK project.
#
# 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 are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
SetupJdkExecutable = $(NamedParamsMacroTemplate)
define SetupJdkExecutableBody
$1_TYPE := EXECUTABLE
ifeq ($$($1_OUTPUT_DIR), )
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE))
endif
ifeq ($$($1_OBJECT_DIR), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME)
endif
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).exe" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x01L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1))
endef
endif # _JDK_NATIVE_COMPILATION_GMK

View File

@ -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
@ -518,12 +518,14 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
define install-file
$(call MakeTargetDir)
$(RM) '$(call DecodeSpace, $@)'
if [ '$(call DecodeSpace, $(dir $@))' != \
if [ '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))' != \
'$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \
$(CP) -f -r -P '$(call DecodeSpace, $<)' '$(call DecodeSpace, $(@D))'; \
if [ '$(call DecodeSpace, $(@F))' != \
$(CP) -f -r -P '$(call DecodeSpace, $<)' \
'$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))'; \
if [ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $@)))' != \
'$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \
$(MV) '$(call DecodeSpace, $(@D)/$(<F))' '$(call DecodeSpace, $@)'; \
$(MV) '$(call DecodeSpace, $(dir $(call EncodeSpace, $@))/$(notdir $(call EncodeSpace, $<)))' \
'$(call DecodeSpace, $@)'; \
fi; \
else \
if [ -L '$(call DecodeSpace, $<)' ]; then \
@ -1024,6 +1026,12 @@ ExecuteWithLog = \
FindLibDirForModule = \
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
################################################################################
# Find executable dir for module
# Param 1 - module name
FindExecutableDirForModule = \
$(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
################################################################################
# Return a string suitable for use after a -classpath or --module-path option. It
# will be correct and safe to use on all platforms. Arguments are given as space

View File

@ -94,6 +94,7 @@ PLATFORM_MODULES += \
java.smartcardio \
java.sql \
java.sql.rowset \
java.transaction.xa \
java.xml.crypto \
jdk.accessibility \
jdk.charsets \

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
@ -150,7 +150,7 @@ NATIVE_SOURCE_EXTENSIONS := %.s %.S %.c %.cpp %.cc %.m %.mm
define replace_with_obj_extension
$(strip \
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
$(patsubst $(extension),%$(OBJ_SUFFIX),$(filter $(extension),$1))) \
$(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
)
endef
@ -183,150 +183,160 @@ DEPENDENCY_TARGET_SED_PATTERN := \
-e 's/$$$$/ :/' \
#
define add_native_source
# param 1 = BUILD_MYPACKAGE
# parma 2 = the source file name (..../alfa.c or .../beta.cpp)
# param 3 = the bin dir that stores all .o (.obj) and .d files.
# param 4 = the c flags to the compiler
# param 5 = the c compiler
# param 6 = the c++ flags to the compiler
# param 7 = the c++ compiler
# param 8 = the flags to the assembler
# param 9 = set to disable THIS_FILE
################################################################################
# Create the recipe needed to compile a single native source file.
#
# Parameter 1 is the name of the rule, based on the name of the library/
# program being build and the name of the source code file, e.g.
# BUILD_LIBFOO_fooMain.cpp.
#
# Remaining parameters are named arguments:
# FILE - The full path of the source file to compiler
# BASE - The name of the rule for the entire binary to build ($1)
# DISABLE_THIS_FILE_DEFINE - Set to true to disable the THIS_FILE define.
#
SetupCompileNativeFile = $(NamedParamsMacroTemplate)
define SetupCompileNativeFileBody
$1_FILENAME := $$(notdir $$($1_FILE))
ifeq ($9, )
$1_$2_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
endif
# The target file to be generated.
$1_OBJ := $$($$($1_BASE)_OBJECT_DIR)/$$(call replace_with_obj_extension, \
$$($1_FILENAME))
ifeq ($$($1_$(notdir $2)_OPTIMIZATION), )
$1_$(notdir $2)_OPT_CFLAGS := $$($1_OPT_CFLAGS)
$1_$(notdir $2)_OPT_CXXFLAGS := $$($1_OPT_CXXFLAGS)
else
ifeq (NONE, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NONE)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
else ifeq (LOW, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_NORM)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
else ifeq (HIGH, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HI)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
else ifeq (HIGHEST, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
else ifeq (HIGHEST_JVM, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
else ifeq (SIZE, $$($1_$(notdir $2)_OPTIMIZATION))
$1_$(notdir $2)_OPT_CFLAGS := $(C_O_FLAG_SIZE)
$1_$(notdir $2)_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
# 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_OBJ), $$($$($1_BASE)_OBJS_SO_FAR)), )
$$($1_BASE)_OBJS_SO_FAR += $$($1_OBJ)
# This is the definite source file to use for $1_FILENAME.
$1_SRC_FILE := $$($1_FILE)
ifneq ($$($1_DISABLE_THIS_FILE_DEFINE), true)
$1_THIS_FILE = -DTHIS_FILE='"$$(<F)"'
endif
ifeq ($$($1_OPTIMIZATION), )
$1_OPT_CFLAGS := $$($$($1_BASE)_OPT_CFLAGS)
$1_OPT_CXXFLAGS := $$($$($1_BASE)_OPT_CXXFLAGS)
else
$$(error Unknown value for OPTIMIZATION: $$($1_$(notdir $2)_OPTIMIZATION))
endif
endif
ifneq ($$($1_PRECOMPILED_HEADER), )
ifeq ($$(filter $$(notdir $2), $$($1_PRECOMPILED_HEADER_EXCLUDE)), )
$1_$2_USE_PCH_FLAGS := $$($1_USE_PCH_FLAGS)
endif
endif
ifneq (,$$(filter %.c,$2))
# Compile as a C file
$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))
# Compile as an Objective-C file
$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))
# 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))
# Compile as a C++ or Objective-C++ file
$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)
else
$$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
endif
# Generate the .o (.obj) file name and place it in the bin dir.
$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))
# And this is the dependency file for this obj file.
$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))
# Include previously generated dependency information. (if it exists)
-include $$($1_$2_DEP)
-include $$($1_$2_DEP_TARGETS)
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_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ))))
ifeq ($$($1_OPTIMIZATION), NONE)
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
else ifeq ($$($1_OPTIMIZATION), LOW)
$1_OPT_CFLAGS := $(C_O_FLAG_NORM)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NORM)
else ifeq ($$($1_OPTIMIZATION), HIGH)
$1_OPT_CFLAGS := $(C_O_FLAG_HI)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HI)
else ifeq ($$($1_OPTIMIZATION), HIGHEST)
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST)
else ifeq ($$($1_OPTIMIZATION), HIGHEST_JVM)
$1_OPT_CFLAGS := $(C_O_FLAG_HIGHEST_JVM)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_HIGHEST_JVM)
else ifeq ($$($1_OPTIMIZATION), SIZE)
$1_OPT_CFLAGS := $(C_O_FLAG_SIZE)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_SIZE)
else
$$(error Unknown value for file OPTIMIZATION: $$($1_OPTIMIZATION))
endif
endif
ifneq ($$(strip $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
$$($1_$(notdir $2)_OPTIMIZATION)), )
$1_$2_VARDEPS := $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) \
$$($1_$(notdir $2)_OPT_CFLAGS) $$($1_$(notdir $2)_OPT_CXXFLAGS)
$1_$2_VARDEPS_FILE := $$(call DependOnVariable, $1_$2_VARDEPS, $$($1_$2_OBJ).vardeps)
ifneq ($$($$($1_BASE)_PRECOMPILED_HEADER), )
ifeq ($$(filter $$($1_FILENAME), $$($$($1_BASE)_PRECOMPILED_HEADER_EXCLUDE)), )
$1_USE_PCH_FLAGS := $$($$($1_BASE)_USE_PCH_FLAGS)
endif
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 MakeDir, $$(@D) $$(@D)/pdb)
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS)
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
ifneq ($$(filter %.c, $$($1_FILENAME)), )
# Compile as a C file
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
$$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
$1_COMPILER := $$($$($1_BASE)_CC)
$1_DEP_FLAG := $(C_FLAG_DEPS)
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
# Compile as an Objective-C file
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
$1_COMPILER := $$($$($1_BASE)_CC)
$1_DEP_FLAG := $(C_FLAG_DEPS)
else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), )
# Compile as assembler file
$1_FLAGS := $$($$($1_BASE)_ASFLAGS)
$1_COMPILER := $(AS)
$1_DEP_FLAG :=
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
# Compile as a C++ or Objective-C++ file
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
$1_COMPILER := $$($$($1_BASE)_CXX)
$1_DEP_FLAG := $(CXX_FLAG_DEPS)
else
$$(error Internal error in NativeCompilation.gmk: no compiler for file $$($1_FILENAME))
endif
ifeq ($$(filter %.s %.S, $$($1_FILENAME)), )
# And this is the dependency file for this obj file.
$1_DEP := $$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_OBJ))
# The dependency target file lists all dependencies as empty targets to
# avoid make error "No rule to make target" for removed files
$1_DEP_TARGETS := $$(patsubst %$(OBJ_SUFFIX),%.d.targets,$$($1_OBJ))
# Include previously generated dependency information. (if it exists)
-include $$($1_DEP)
-include $$($1_DEP_TARGETS)
endif
ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), )
$1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \
$$($1_OPT_CXXFLAGS)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps)
endif
$$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
$$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO)
$$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME)))
$$(call MakeDir, $$(@D))
ifneq ($(TOOLCHAIN_TYPE), microsoft)
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.
ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s, $$($1_FILENAME)), 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, $$@, \
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
$(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
$$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
$(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP)
else
$$(call ExecuteWithLog, $$@, \
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
$$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))
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),)
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
ifneq ($$($1_DEP), )
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
endif
else
# The Visual Studio compiler lacks a feature for generating make dependencies, but by
# setting -showIncludes, all included files are printed. These are filtered out and
# parsed into make dependences.
# Keep as much as possible on one execution line for best performance on Windows.
# No need to save exit code from compilation since pipefail is always active on
# Windows.
# The Visual Studio compiler lacks a feature for generating make
# dependencies, but by setting -showIncludes, all included files are
# printed. These are filtered out and parsed into make dependences.
#
# Keep as much as possible on one execution line for best performance
# on Windows. No need to save exit code from compilation since
# pipefail is always active on Windows.
$$(call ExecuteWithLog, $$@, \
$$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2) \
| $(GREP) -v -e "^Note: including file:" \
-e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
$(ECHO) $$@: \\ > $$($1_$2_DEP) ; \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_OBJ).log \
| $(SORT) -u >> $$($1_$2_DEP) ; \
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
$$($1_COMPILER) $$($1_FLAGS) -showIncludes \
$(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) \
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
-e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \
$(ECHO) $$@: \\ > $$($1_DEP) ; \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_OBJ).log \
| $(SORT) -u >> $$($1_DEP) ; \
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_DEP) > $$($1_DEP_TARGETS)
endif
endif
endef
@ -338,6 +348,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 +360,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!
@ -377,114 +388,66 @@ endef
# COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
# ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol
# zipping
# CFLAGS_DEBUG_SYMBOLS Overrides the default cflags for enabling debug symbols
# CXXFLAGS_DEBUG_SYMBOLS Overrides the default cxxflags for enabling debug symbols
# STRIPFLAGS Optionally change the flags given to the strip command
# PRECOMPILED_HEADER Header file to use as precompiled header
# PRECOMPILED_HEADER_EXCLUDE List of source files that should not use PCH
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 +462,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 +498,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,64 +528,62 @@ 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)
$$(call SetIfEmpty, $1_CFLAGS_DEBUG_SYMBOLS, $(CFLAGS_DEBUG_SYMBOLS))
$$(call SetIfEmpty, $1_CXXFLAGS_DEBUG_SYMBOLS, $(CXXFLAGS_DEBUG_SYMBOLS))
$1_EXTRA_CFLAGS += $$($1_CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS)
endif
ifneq (,$$($1_REORDER))
ifneq ($$($1_REORDER), )
$1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
$1_EXTRA_CXXFLAGS += $$(C_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 +594,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)
@ -692,11 +647,12 @@ define SetupNativeCompilationBody
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
$$(eval $$(call add_native_source,$1,$$($1_GENERATED_PCH_SRC), \
$$($1_OBJECT_DIR),,, \
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS) \
-Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
$$($1_CXX),,no_this_file))
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
FILE := $$($1_GENERATED_PCH_SRC), \
BASE := $1, \
EXTRA_CXXFLAGS := -Fp$$($1_PCH_FILE) -Yc$$(notdir $$($1_PRECOMPILED_HEADER)), \
DISABLE_THIS_FILE_DEFINE := true, \
))
$1_USE_PCH_FLAGS := \
-Fp$$($1_PCH_FILE) -Yu$$(notdir $$($1_PRECOMPILED_HEADER))
@ -739,18 +695,18 @@ define SetupNativeCompilationBody
endif
endif
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
$$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS), \
$$($1_CC), \
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_SYSROOT_CFLAGS), \
$$($1_CXX), $$($1_ASFLAGS))))
# Now call SetupCompileNativeFile for each source file we are going to compile.
$$(foreach file, $$($1_SRCS), \
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$(file)),\
FILE := $$(file), \
BASE := $1, \
)) \
)
# 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 +719,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,11 +731,11 @@ 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)$$@ \
$$($1_VERSIONINFO_RESOURCE))
$$($1_VERSIONINFO_RESOURCE) 2>&1 )
# Windows RC compiler does not support -showIncludes, so we mis-use CL
# for this. Filter out RC specific arguments that are unknown to CL.
# For some unknown reason, in this case CL actually outputs the show
@ -790,7 +746,7 @@ define SetupNativeCompilationBody
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
$(CC_OUT_OPTION)$$($1_RES_DEP).obj -P -Fi$$($1_RES_DEP).pp \
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
| $(GREP) -v -e "^Note: including file:" \
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEP) ; \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEP).obj.log >> $$($1_RES_DEP) ; \
@ -798,10 +754,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 +771,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 +791,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,22 +855,22 @@ 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
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
@ -924,7 +880,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.
@ -968,8 +924,8 @@ define SetupNativeCompilationBody
ifeq ($(OPENJDK_TARGET_OS), windows)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
$$($1_EXTRA_LIBS)) \
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
test "$$$$?" = "1" ; \
$$($1_CREATE_DEBUGINFO_CMDS)
@ -978,15 +934,15 @@ define SetupNativeCompilationBody
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
$$($1_EXTRA_LIBS)) ; \
$(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
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 +956,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,10 +969,10 @@ 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) \
$$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
$$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
@ -1035,16 +991,16 @@ define SetupNativeCompilationBody
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(EXE_OUT_OPTION)$$($1_TARGET) \
$$($1_ALL_OBJS) $$($1_RES) \
$$($1_LIBS) $$($1_EXTRA_LIBS))
$$(GLOBAL_LIBS) $$($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

@ -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
@ -44,6 +44,7 @@ include NativeCompilation.gmk
# TYPE Must be either PROGRAM or LIBRARY.
# SOURCE_DIRS A list of source directories to search
# OUTPUT_DIR Where to put the resulting files
# EXCLUDE A list of filenames to exclude from compilation
SetupTestFilesCompilation = $(NamedParamsMacroTemplate)
define SetupTestFilesCompilationBody
@ -59,13 +60,15 @@ define SetupTestFilesCompilationBody
ifeq ($$($1_TYPE), LIBRARY)
$1_PREFIX = lib
$1_OUTPUT_SUBDIR := lib
$1_CFLAGS := $(CFLAGS_TESTLIB) $(CFLAGS_WARNINGS_ARE_ERRORS)
$1_CFLAGS := $(CFLAGS_TESTLIB)
$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_CFLAGS := $(CFLAGS_TESTEXE)
$1_LDFLAGS := $(LDFLAGS_TESTEXE)
$1_COMPILATION_TYPE := EXECUTABLE
else
$$(error Unknown type: $$($1_TYPE))
endif
@ -74,19 +77,23 @@ define SetupTestFilesCompilationBody
$1_FILE_LIST := \
$$(shell $$(FIND) $$($1_SOURCE_DIRS) -type f -name "$$($1_PREFIX)*.c")
$1_EXCLUDE_PATTERN := $$(addprefix %/, $$($1_EXCLUDE))
$1_FILTERED_FILE_LIST := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_FILE_LIST))
# Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILE_LIST),\
$$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
$$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
$$($1_TYPE) := $$(name), \
NAME := $$(unprefixed_name), \
TYPE := $$($1_COMPILATION_TYPE), \
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
INCLUDE_FILES := $$(notdir $$(file)), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$($1_PREFIX)$$(name), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
LANG := C, \
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
LIBS := $$($1_LIBS_$$(name)), \
OPTIMIZATION := LOW, \
COPY_DEBUG_SYMBOLS := false, \
STRIP_SYMBOLS := false, \

View File

@ -232,7 +232,8 @@ var getJibProfilesCommon = function (input, data) {
common.main_profile_names = [
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
"solaris-sparcv9", "windows-x64", "windows-x86",
"linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
"linux-aarch64", "linux-arm64", "linux-arm-vfp-hflt",
"linux-arm-vfp-hflt-dyn"
];
// These are the base setttings for all the main build profiles.
@ -429,7 +430,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit", "autoconf", "freetype"],
dependencies: ["devkit", "autoconf"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.7.0"),
},
@ -453,7 +454,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"windows-x64": {
target_os: "windows",
target_cpu: "x64",
dependencies: ["devkit", "autoconf", "freetype"],
dependencies: ["devkit", "autoconf"],
configure_args: concat(common.configure_args_64bit),
},
@ -461,10 +462,20 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: "windows",
target_cpu: "x86",
build_cpu: "x64",
dependencies: ["devkit", "autoconf", "freetype"],
dependencies: ["devkit", "autoconf"],
configure_args: concat(common.configure_args_32bit),
},
"linux-aarch64": {
target_os: "linux",
target_cpu: "aarch64",
build_cpu: "x64",
dependencies: ["devkit", "autoconf", "build_devkit", "cups"],
configure_args: [
"--openjdk-target=aarch64-linux-gnu"
],
},
"linux-arm64": {
target_os: "linux",
target_cpu: "aarch64",
@ -517,6 +528,32 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles[debugName] = concatObjects(profiles[name],
common.slowdebug_profile_base);
});
// Generate testmake profiles for the main profile of each build host
// platform. This profile only runs the makefile tests.
// Ant is needed to run the idea project generator test.
var testmakeBase = {
dependencies: [ "ant" ],
environment: {
"ANT_HOME": input.get("ant", "install_path") + "/apache-ant-1.7.1"
}
};
[ "linux-x64", "macosx-x64", "solaris-sparcv9", "solaris-x64", "windows-x64"]
.forEach(function (name) {
var maketestName = name + "-testmake";
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
profiles[maketestName].default_make_targets = [ "test-make" ];
});
// Generate cmp-baseline profiles for each main profile. This profile does
// a compare build run with no changes to verify that the compare script
// has a clean baseline
common.main_profile_names.forEach(function (name) {
var cmpBaselineName = name + "-cmp-baseline";
profiles[cmpBaselineName] = clone(profiles[name]);
// Only compare the images target. This should pressumably be expanded
// to include more build targets when possible.
profiles[cmpBaselineName].default_make_targets = [ "images" ];
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
});
// Profiles for building the zero jvm variant. These are used for verification
// in JPRT.
@ -582,6 +619,9 @@ var getJibProfilesProfiles = function (input, common, data) {
"windows-x86": {
platform: "windows-x86",
},
"linux-aarch64": {
platform: "linux-aarch64",
},
"linux-arm64": {
platform: "linux-arm64-vfp-hflt",
},
@ -743,11 +783,22 @@ var getJibProfilesProfiles = function (input, common, data) {
dependencies: [ "devkit" ],
environment_path: input.get("devkit", "install_path")
+ "/Xcode.app/Contents/Developer/usr/bin"
}
};
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
profiles["run-test-jprt"] = concatObjects(profiles["run-test-jprt"], macosxRunTestExtra);
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
}
// On windows we want the debug symbols available at test time
if (input.build_os == "windows") {
windowsRunTestPrebuiltExtra = {
dependencies: [ testedProfile + ".jdk_symbols" ],
environment: {
"PRODUCT_SYMBOLS_HOME": input.get(testedProfile + ".jdk_symbols", "home_path"),
}
};
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
windowsRunTestPrebuiltExtra);
}
// Generate the missing platform attributes
profiles = generatePlatformAttributes(profiles);
@ -770,7 +821,9 @@ var getJibProfilesDependencies = function (input, common) {
solaris_x64: "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_aarch64: (input.profile != null && input.profile.indexOf("arm64") >= 0
? "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0"
: "gcc7.3.0-Fedora27+1.0"),
linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
: "arm-linaro-4.7+1.0")
@ -783,12 +836,6 @@ var getJibProfilesDependencies = function (input, common) {
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
+ "-" + input.build_cpu;
var freetype_version = {
windows_x64: "2.7.1-v120+1.1",
windows_x86: "2.7.1-v120+1.1",
macosx_x64: "2.7.1-Xcode6.3-MacOSX10.9+1.0"
}[input.target_platform];
var makeBinDir = (input.build_os == "windows"
? input.get("gnumake", "install_path") + "/cygwin/bin"
: input.get("gnumake", "install_path") + "/bin");
@ -865,13 +912,6 @@ var getJibProfilesDependencies = function (input, common) {
environment_path: input.get("autoconf", "install_path")
},
freetype: {
organization: common.organization,
ext: "tar.gz",
revision: freetype_version,
module: "freetype-" + input.target_platform
},
graphviz: {
organization: common.organization,
ext: "tar.gz",
@ -899,7 +939,15 @@ var getJibProfilesDependencies = function (input, common) {
environment_name: "JIB_JAR",
environment_value: input.get("jib", "install_path")
+ "/jib-3.0-SNAPSHOT-distribution/lib/jib-3.0-SNAPSHOT.jar"
}
},
ant: {
organization: common.organization,
ext: "zip",
revision: "1.7.1+1.0",
configure_args: "",
},
};
// Need to add a value for the Visual Studio tools variable to make

View File

@ -29,52 +29,6 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
################################################################################
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime
# as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris), )
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype).6
else
FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype)
endif
# We can't use $(install-file) in this rule because it preserves symbolic links and
# libfreetype.so is usually a symbolic link to something like libfreetype.so.6 on Unix.
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(MKDIR) -p $(@D)
$(CP) $< $@
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
TARGETS += $(FREETYPE_TARGET_LIB)
$(eval $(call SetupCopyFiles, COPY_FREETYPE_LICENSE, \
FILES := $(FREETYPE_LICENSE), \
DEST := $(LEGAL_DST_DIR), \
))
TARGETS += $(COPY_FREETYPE_LICENSE)
endif
################################################################################
$(CONF_DST_DIR)/sound.properties: $(TOPDIR)/src/java.desktop/share/conf/sound.properties
$(call install-file)

View File

@ -1,26 +0,0 @@
!XGetWindowProperty|int
w long
property Atom
long_offset long
long_length long
delete Bool
req_type Atom
actual_type Atom out
actual_format int out
number_of_items long out
bytes_after long out
data pointer out free
!XQueryTree|int
w long
root long out
parent long out
children pointer out free
nchildren int out
!XTranslateCoordinates|int
scr_w long
dest_w long
src_x int
src_y int
dest_x int out
dest_y int out
child long out

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
//
//
// This file is used for automated generation of java classes to wrap native structures.
// The detail on format of this file see WrapperGenerator.java
// For details on format of this file, see WrapperGenerator.java
//
// WARNING: if you modified this file, you need to regenerate sizes.64-solaris-i386
// WARNING: If you modify this file, you need to regenerate sizes-32.txt and sizes-64.txt.
// Run "make update-x11wrappers" to do this.
//
XExtData

View File

@ -41,7 +41,7 @@
# To build the full set of crosstools for additional platforms, use a command
# line looking like this:
#
# make tars platforms="x86_64-unknown-linux-gnu sparc64-unknown-linux-gnu"
# make cross_compile_target="aarch64-linux-gnu" BASE_OS=Fedora27
#
# This is the makefile which iterates over all host and target platforms.
#
@ -57,8 +57,13 @@ $(info Building on platform $(me))
#
# By default just build for the current platform, which is assumed to be Linux
#
platforms := $(me)
host_platforms := $(platforms)
ifeq ($(cross_compile_target), )
platforms := $(me)
host_platforms := $(platforms)
else
platforms := $(cross_compile_target)
host_platforms := $(me)
endif
target_platforms := $(platforms)
$(info host_platforms $(host_platforms))
$(info target_platforms $(target_platforms))

View File

@ -46,6 +46,16 @@ $(info BUILD=$(BUILD))
ARCH := $(word 1,$(subst -, ,$(TARGET)))
$(info ARCH=$(ARCH))
ifeq ($(BASE_OS), OEL6)
OEL_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
LINUX_VERSION := OEL6.4
else ifeq ($(BASE_OS), Fedora27)
OEL_URL := https://dl.fedoraproject.org/pub/fedora-secondary/releases/27/Everything/$(ARCH)/os/Packages/
LINUX_VERSION := Fedora 27
else
$(error Unknown base OS $(BASE_OS))
endif
##########################################################################################
# Define external dependencies
@ -79,10 +89,7 @@ GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
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
# RPMs used by all BASE_OS
RPM_LIST := \
kernel-headers \
glibc glibc-headers glibc-devel \
@ -180,10 +187,10 @@ ifeq ($(ARCH),x86_64)
RPM_ARCHS += i386 i686
endif
endif
else ifeq ($(ARCH),i686))
RPM_ARCHS := i386 i686
else ifeq ($(ARCH),i686)
RPM_ARCHS := i386 i686 noarch
else
RPM_ARCHS := $(ARCH)
RPM_ARCHS := $(ARCH) noarch
endif
RPM_FILE_LIST := $(sort $(foreach a, $(RPM_ARCHS), \
@ -453,6 +460,12 @@ ifeq ($(HOST), $(TARGET))
@echo 'done'
$(gdb): $(gcc)
else
$(BUILDDIR)/$(gdb_ver)/Makefile:
$(info Faking $@, not used when cross-compiling)
mkdir -p $(@D)
echo "install:" > $@
@echo 'done'
endif
##########################################################################################
@ -531,7 +544,7 @@ $(PREFIX)/devkit.info: FRC
echo '' >> $@
echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$(TARGET)/sysroot"' >> $@
echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@
##########################################################################################

View File

@ -30,10 +30,10 @@ $(eval $(call IncludeCustomExtension, gensrc/Gensrc-java.desktop.gmk))
ifneq ($(OPENJDK_TARGET_OS), windows)
include GensrcIcons.gmk
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
include GensrcX11Wrappers.gmk
endif
ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris aix), )
include GensrcX11Wrappers.gmk
endif
include GensrcSwing.gmk

View File

@ -1,5 +1,5 @@
#
# 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
@ -23,106 +23,30 @@
# questions.
#
# This file is responsible for extracting the x11 native struct offsets to
# the xawt Java library. The tool needs to be run on the os/arch that
# will host the final jvm, thus the tool cannot be used when cross compiling.
# Generate java sources using the X11 offsets that are precalculated in files
# make/data/x11wrappergen/sizes-<address size>.txt.
# To enable cross compiling, the two versions of the generated offset file,
# sizes.32 and sizes.64 are committed into the source code repository.
# These are the ones used.
GENSRC_X11WRAPPERS_OUTPUT_TOP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
# However when not cross compiling, the offset generator tool is built and
# run, to verify that it still generates the same sizes.32 and sizes.64.
GENSRC_X11WRAPPERS_MARKER := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/_x11wrappers.marker
GENSRC_X11WRAPPERS :=
# Put temporary c-code and executable to calculate offsets here.
# Also put verification offset file here as well.
GENSRC_X11WRAPPERS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_x11wrappers
# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
GENSRC_X11WRAPPERS_OUTPUTDIR := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/sun/awt/X11
# The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(TOPDIR)/make/data/x11wrappergen
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt
# Normal case is to generate only according to target bits
GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
ifneq ($(OPENJDK_TARGET_OS), linux)
# On all 64-bit systems except Linux, generate both 32 and 64 bit versions
GENSRC_X11_VERSION := 32 64
endif
else
ifeq ($(OPENJDK_TARGET_OS), solaris)
# As a special case, solaris 32-bit also generates the 64-bit version
GENSRC_X11_VERSION := 32 64
endif
endif
GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_X11_VERSION))
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
# file prefix it is given so those not needed need to be hidden.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
$(call MakeDir, $(@D))
$(RM) '$@'
$(SORT) $< > $@
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(call MakeDir, $(GENSRC_X11WRAPPERS_DST))
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
# Run the tool on the offset files to generate several Java classes used in awt.
$(GENSRC_X11WRAPPERS_MARKER): $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt
$(call MakeDir, $(GENSRC_X11WRAPPERS_OUTPUTDIR))
$(call LogInfo, Generating X11 wrapper source files)
$(call ExecuteWithLog, $@, \
$(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
$(OPENJDK_TARGET_CPU_BITS))
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated.x11
ifneq ($(COMPILE_TYPE), cross)
# This is not a cross compile, regenerate the offset file, so that we
# can compare it with the version in the source code repository.
# Generate the C code for the program that will output the offset file.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
$(call LogInfo, Generating X11 wrapper ($*-bit version))
$(call MakeDir, $(@D))
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
# use -m32/-m64 only if the compiler supports it
ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
endif
SIZER_CFLAGS := \
-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 \
-I$(TOPDIR)/src/java.desktop/share/native/common/awt/debug \
-I$(TOPDIR)/src/java.desktop/share/native/libawt/awt/image/cvutils \
#
# Compile the C code into an executable.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(call MakeDir, $(@D))
(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
$(X_CFLAGS) \
$(X_LIBS) \
$(SIZER_CFLAGS) -lc)
.PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
# Run the executable create the offset file and check that it is identical
# to the offset file in the source code repository.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
$(call LogInfo, Verifying X11 wrapper sizes)
$(call MakeDir, $(@D))
$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
mv $@.tmp $@
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
endif
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS)
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS_MARKER)

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
@ -52,8 +52,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
endif
# Set the C++ standard if supported
ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
ADLC_CFLAGS += $(ADLC_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, 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
@ -46,7 +46,7 @@ ifeq ($(call check-jvm-feature, dtrace), true)
$(call LogInfo, Generating dtrace header file $(@F))
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
( $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d ) )
($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
# Process all .d files in DTRACE_SOURCE_DIR. They are:

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,17 +46,14 @@ 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), \
LDEXE := $(BUILD_CXX), \
generateJvmOffsets.cpp_CXXFLAGS := $(JVM_CFLAGS) -mt -xnolib -norunpath, \
generateJvmOffsetsMain.c_CFLAGS := -mt -m64 -norunpath -z nodefs, \
TOOLCHAIN := $(TOOLCHAIN_BUILD), \
LDFLAGS := -m64, \
LIBS := -lc, \
CFLAGS := -m64 $(JVM_CFLAGS), \
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)
@ -77,24 +74,11 @@ ifeq ($(call check-jvm-feature, dtrace), true)
JVM_OFFSETS_INDEX_H := $(DTRACE_SUPPORT_DIR)/JvmOffsetsIndex.h
# Run the dtrace-gen-offset tool to generate these three files.
# The generated JvmOffsets.cpp is compiled with the rest of libjvm.
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_H), header))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_INDEX_H), index))
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_CPP), table))
############################################################################
# Compile JVM_OFFSETS_OBJ which is linked with libjvm.so.
# JvmOffsets.cpp is compiled without the common JVM_CFLAGS. Otherwise, the
# natural way would have been to included this source code in BUILD_LIBJVM.
JVM_OFFSETS_CFLAGS := -m64
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
JVM_OFFSETS_CFLAGS += -xarch=sparc
endif
$(JVM_OFFSETS_OBJ): $(JVM_OFFSETS_CPP) $(JVM_OFFSETS_H)
$(call LogInfo, Compiling dtrace file JvmOffsets.cpp (for libjvm.so))
$(call ExecuteWithLog, $@, $(CXX) -c -I$(<D) -o $@ $(JVM_OFFSETS_CFLAGS) $<)
############################################################################
# Generate DTRACE_OBJ which is linked with libjvm.so.
@ -146,8 +130,8 @@ ifeq ($(call check-jvm-feature, dtrace), true)
$(DTRACE_OBJ): $(JVM_OUTPUTDIR)/objs/dtrace.d $(DTRACE_INSTRUMENTED_OBJS)
$(call LogInfo, Generating $(@F) from $(<F) and object files)
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
$(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
($(CPP) $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -xlazyload -o $@ \
-s $(DTRACE_SUPPORT_DIR)/$(@F).d $(sort $(DTRACE_INSTRUMENTED_OBJS)))
@ -156,21 +140,29 @@ ifeq ($(call check-jvm-feature, dtrace), true)
# Unfortunately dtrace generates incorrect types for some symbols in
# dtrace_jhelper.o, resulting in "warning: symbol X has differing types"
# This is tracked in JDK-6890703.
$(DTRACE_JHELPER_OBJ): $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d \
$(JVM_OFFSETS_INDEX_H)
$(call LogInfo, Running dtrace for $(<F))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) $(DTRACE_CPP_FLAGS) -C \
-I$(DTRACE_SUPPORT_DIR) -o $@ -s $<)
# See JDK-6890703 for details.
# We work around this by fixing the types for these symbols using elfedit,
# after dtrace has generated the .o file.
JHELPER_DTRACE_SRC := $(TOPDIR)/src/hotspot/os/solaris/dtrace/jhelper.d
# NOTE: We should really do something like this, but unfortunately this
# results in a compilation error. :-(
# $(call MakeDir, $(DTRACE_SUPPORT_DIR))
# $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
# $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
# > $(DTRACE_SUPPORT_DIR)/$(@F).d)
# $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
# -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
GetElfeditCommands = \
$(foreach symbol, \
$(shell $(GREP) ^extern $(JHELPER_DTRACE_SRC) | $(AWK) '{ gsub(";","") ; print $$3 }'), \
-e 'sym:st_type $(symbol) 1')
# Make sure we run our selected compiler for preprocessing instead of letting
# the dtrace tool pick it on it's own.
$(DTRACE_JHELPER_OBJ): $(JHELPER_DTRACE_SRC) $(JVM_OFFSETS_INDEX_H)
$(call LogInfo, Running dtrace for $(<F))
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
($(CPP) $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
> $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
-s $(DTRACE_SUPPORT_DIR)/$(@F).d)
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
$(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(call GetElfeditCommands) $@)
endif
############################################################################
# Build the stand-alone dtrace libraries
@ -178,12 +170,12 @@ 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, \
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
LIBS := $(LIBDL) -lc -lthread -ldoor, \
LIBS := $(LIBDL) -lthread -ldoor, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_dtrace/mapfile-vers, \
OBJECT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR)/objs, \
))
@ -193,13 +185,12 @@ 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) \
-m64 -G -mt -KPIC, \
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
LIBS := -lc, \
MAPFILE := $(TOPDIR)/make/mapfiles/libjvm_db/mapfile-vers, \
OBJECT_DIR := $(LIBJVM_DB_OUTPUTDIR)/objs, \
))

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
@ -29,8 +29,11 @@ ifeq ($(call check-jvm-feature, dtrace), true)
# CompileJvm.gmk
DTRACE_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace.o
DTRACE_JHELPER_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace_jhelper.o
JVM_OFFSETS_OBJ := $(JVM_OUTPUTDIR)/objs/JvmOffsets.o
DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ)
DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ) $(JVM_OFFSETS_OBJ)
# Since we cannot generate JvmOffsets.cpp as part of the gensrc step,
# we need this special hook to get it to compile with the rest of libjvm.
JVM_OFFSETS_CPP := $(DTRACE_SUPPORT_DIR)/JvmOffsets.cpp
DTRACE_EXTRA_SOURCE_FILES := $(JVM_OFFSETS_CPP)
endif
endif

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), \
@ -81,12 +81,11 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
CFLAGS_aix := -qpic=large, \
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
DISABLED_WARNINGS_gcc := undef, \
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,14 +106,13 @@ 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, \
CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
-I$(GTEST_FRAMEWORK_SRC)/include, \
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -library=stlport4, \

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
@ -210,17 +210,16 @@ 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), \
EXTRA_FILES := $(DTRACE_EXTRA_SOURCE_FILES), \
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
CFLAGS := $(JVM_CFLAGS), \
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
DISABLED_WARNINGS_clang := tautological-compare, \

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
@ -36,7 +36,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(STATIC_BUILD), false)
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS)
LIBJSIG_LIBS := $(LIBDL)
# NOTE: The old build compiled this library without -soname.
@ -76,7 +76,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS)
else
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
endif
@ -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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -297,3 +297,30 @@ int generateJvmOffsets(GEN_variant gen_variant) {
fflush(stdout);
return 0;
}
const char *HELP =
"HELP: generateJvmOffsets {-header | -index | -table} \n";
int main(int argc, const char *argv[]) {
GEN_variant gen_var;
if (argc != 2) {
printf("%s", HELP);
return 1;
}
if (0 == strcmp(argv[1], "-header")) {
gen_var = GEN_OFFSET;
}
else if (0 == strcmp(argv[1], "-index")) {
gen_var = GEN_INDEX;
}
else if (0 == strcmp(argv[1], "-table")) {
gen_var = GEN_TABLE;
}
else {
printf("%s", HELP);
return 1;
}
return generateJvmOffsets(gen_var);
}

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
@ -24,6 +24,7 @@
JVM_ActiveProcessorCount
JVM_ArrayCopy
JVM_AssertionStatusDirectives
JVM_BeforeHalt
JVM_CallStackWalk
JVM_Clone
JVM_ConstantPoolGetClassAt

View File

@ -142,6 +142,7 @@ public class GenGraphs {
ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
ranks.add(Set.of("java.sql"));
ranks.add(Set.of("java.transaction.xa"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));

View File

@ -20,8 +20,8 @@ td.agg { background-color: lightgray; }
<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-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform -- 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 -- not in java.base</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 not included in the Java SE Platform</td></tr>
</table>
@ -402,10 +402,10 @@ td.agg { background-color: lightgray; }
<td></td>
</tr>
<tr class="se-misc">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>---</td>
<td>JTA (XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.sql">java.sql</a></td>
<td>UJSR for Java SE</td>
<td><a href="module-summary.html#java.transaction.xa">java.transaction.xa</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>

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
@ -49,14 +49,14 @@ import static jdk.javadoc.doclet.Taglet.Location.*;
* will produce the following html
* <p>
* {@code
* Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase9&id=Borealis">a spectacular</a> sight.
* Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase10&id=Borealis">a spectacular</a> sight.
* }
*/
public class ExtLink implements Taglet {
static final String TAG_NAME = "extLink";
static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase9&amp;id=";
static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase10&amp;id=";
static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -1109,7 +1109,6 @@ public class WrapperGenerator {
}
public void writeJavaWrapperClass(String outputDir) {
// (new File(outputDir, package_path)).mkdirs();
try {
for (Enumeration e = symbolTable.elements() ; e.hasMoreElements() ;) {
BaseType tp = (BaseType) e.nextElement();
@ -1126,7 +1125,6 @@ public class WrapperGenerator {
}
}
public void writeNativeSizer(String file)
{
int type;
@ -1136,7 +1134,6 @@ public class WrapperGenerator {
StructType stp;
Enumeration eo;
try {
FileOutputStream fs = new FileOutputStream(file);
@ -1158,7 +1155,6 @@ public class WrapperGenerator {
pw.println(" unsigned long status;\n");
pw.println("} PropMwmHints;\n");
pw.println("\n\nint main(){");
j=0;
for ( eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
@ -1182,7 +1178,6 @@ public class WrapperGenerator {
pw.println("printf(\"Atom\t%d\\n\",(int)sizeof(Atom));");
pw.println("printf(\"Window\t%d\\n\",(int)sizeof(Window));");
for (eo = symbolTable.elements() ; eo.hasMoreElements() ;) {
@ -1234,7 +1229,8 @@ public class WrapperGenerator {
symbolTable.put("Atom", new AtomicType(AtomicType.TYPE_ATOM, "", "Atom"));
symbolTable.put("ulong", new AtomicType(AtomicType.TYPE_ULONG, "", "ulong"));
}
public WrapperGenerator(String outputDir, String xlibFilename) {
public WrapperGenerator(String xlibFilename) {
initTypes();
try {
BufferedReader in = new BufferedReader(new FileReader(xlibFilename));
@ -1303,33 +1299,19 @@ public class WrapperGenerator {
catch (Exception e) {
e.printStackTrace();
}
}
private void makeSizer(String outputDir) {
if (wide) {
sizerFileName = "sizer.64.c";
} else {
sizerFileName = "sizer.32.c";
}
File fp = new File(outputDir, sizerFileName);
private void makeSizer(String sizerFileName) {
File fp = new File(sizerFileName);
writeNativeSizer(fp.getAbsolutePath());
}
private boolean readSizeInfo(String sizeInfo) {
private boolean readFileSizeInfo(String filename, boolean wide) {
try {
File f = new File(sizeInfo+".32");
boolean res = true;
FileInputStream fis = null;
if (f.exists()) {
fis = new FileInputStream(f);
res = readSizeInfo(fis, false);
fis.close();
}
f = new File(sizeInfo+".64");
if (f.exists()) {
fis = new FileInputStream(f);
res &= readSizeInfo(fis, true);
fis.close();
}
FileInputStream fis = new FileInputStream(filename);
res = readSizeInfo(fis, wide);
fis.close();
return res;
} catch (Exception e) {
e.printStackTrace();
@ -1337,8 +1319,8 @@ public class WrapperGenerator {
}
}
private void startGeneration(String outputDir, String sizeInfo) {
if (readSizeInfo(sizeInfo))
private void startGeneration(String outputDir, String filename, boolean wide) {
if (readFileSizeInfo(filename, wide))
{
writeJavaWrapperClass(outputDir);
}
@ -1348,21 +1330,22 @@ public class WrapperGenerator {
}
public static void main(String[] args) {
if (args.length < 4) {
System.out.println("Usage:\nWrapperGenerator <output_dir> <xlibtypes.txt> <action> [<platform> | <sizes info file>]");
System.out.println("Where <action>: gen, sizer");
System.out.println(" <platform>: 32, 64");
System.out.println("Usage:\nWrapperGenerator gen_java <output_dir> <xlibtypes.txt> <sizes-*.txt> <platform>");
System.out.println(" or");
System.out.println("WrapperGenerator gen_c_source <output_file> <xlibtypes.txt> <platform>");
System.out.println("Where <platform>: 32, 64");
System.exit(1);
}
WrapperGenerator xparser = new WrapperGenerator(args[0], args[1]);
if (args[2].equals("sizer")) {
WrapperGenerator xparser = new WrapperGenerator(args[2]);
if (args[0].equals("gen_c_source")) {
xparser.wide = args[3].equals("64");
xparser.makeSizer(args[0]);
} else if (args[2].equals("gen")) {
xparser.startGeneration(args[0], args[3]);
xparser.makeSizer(args[1]);
} else if (args[0].equals("gen_java")) {
boolean wide = args[4].equals("64");
xparser.startGeneration(args[1], args[3], wide);
}
}
}

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

View File

@ -4,7 +4,9 @@
*
* 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.
* 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

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
@ -27,8 +27,8 @@ include LauncherCommon.gmk
$(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk))
JAVA_RC_FLAGS += -I $(TOPDIR)/src/java.base/windows/native/common
JAVA_RC_FLAGS += -I $(TOPDIR)/src/java.base/windows/native/launcher/icons
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/common
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
################################################################################
@ -39,7 +39,7 @@ $(eval $(call SetupBuildLauncher, java, \
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR), \
LIBS_windows := user32.lib comctl32.lib, \
RC_FLAGS := $(JAVA_RC_FLAGS), \
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \
OPTIMIZATION := HIGH, \
@ -58,7 +58,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupBuildLauncher, javaw, \
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
LIBS_windows := user32.lib comctl32.lib, \
RC_FLAGS := $(JAVA_RC_FLAGS), \
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
WINDOWS_STATIC_LINK := true, \
NO_JAVA_MS := true, \
@ -72,7 +72,8 @@ $(eval $(call SetupBuildLauncher, keytool, \
################################################################################
ifeq ($(OPENJDK_TARGET_OS), linux)
$(eval $(call SetupNativeCompilation, BUILD_JEXEC, \
$(eval $(call SetupJdkExecutable, BUILD_JEXEC, \
NAME := jexec, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
INCLUDE_FILES := jexec.c, \
OPTIMIZATION := LOW, \
@ -81,9 +82,7 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
PROGRAM := jexec, \
))
TARGETS += $(BUILD_JEXEC)
@ -92,15 +91,14 @@ endif
################################################################################
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
$(eval $(call SetupNativeCompilation, BUILD_JSPAWNHELPER, \
$(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \
NAME := jspawnhelper, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \
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,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,8 @@ 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 SetupJdkExecutable, BUILD_JABSWITCH, \
NAME := jabswitch, \
SRC := $(JABSWITCH_SRC), \
INCLUDE_FILES := jabswitch.cpp, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
@ -42,14 +43,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
DISABLED_WARNINGS_microsoft := 4267 4996, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
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" \
-D "JDK_INTERNAL_NAME=jabswitch" \
-D "JDK_FTYPE=0x01L", \
MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))
@ -69,20 +63,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
$$(eval $$(call SetupNativeCompilation, BUILD_JACCESSINSPECTOR$1, \
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
NAME := jaccessinspector$1, \
SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
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" \
-D "JDK_INTERNAL_NAME=jaccessinspector$1" \
-D "JDK_FTYPE=0x01L", \
))
TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
@ -96,20 +84,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# Parameter 1 File name suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
$$(eval $$(call SetupNativeCompilation,BUILD_JACCESSWALKER$1, \
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
NAME := jaccesswalker$1, \
SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
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" \
-D "JDK_INTERNAL_NAME=jaccesswalker$1" \
-D "JDK_FTYPE=0x01L", \
))
TARGETS += $$(BUILD_JACCESSWALKER$1)

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,8 @@ else
UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200
endif
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
$(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \
NAME := unpack200, \
SRC := $(UNPACKEXE_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
@ -88,15 +89,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \
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" \
-D "JDK_INTERNAL_NAME=unpack200" \
-D "JDK_FTYPE=0x1L", \
MANIFEST := $(TOPDIR)/src/jdk.pack/windows/native/unpack200/unpack200_proto.exe.manifest, \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))

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
@ -23,7 +23,7 @@
# questions.
#
include NativeCompilation.gmk
include JdkNativeCompilation.gmk
ifeq ($(OPENJDK_TARGET_OS), macosx)
DISABLE_MAPFILES := true
@ -85,14 +85,6 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
SetupBuildLauncher = $(NamedParamsMacroTemplate)
define SetupBuildLauncherBody
# Setup default values (unless overridden)
ifeq ($$($1_VERSION_INFO_RESOURCE), )
$1_VERSION_INFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE)
endif
ifeq ($$($1_OUTPUT_DIR), )
$1_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/$(MODULE)
endif
ifeq ($$($1_OPTIMIZATION), )
$1_OPTIMIZATION := LOW
endif
@ -182,7 +174,8 @@ define SetupBuildLauncherBody
endif
endif
$$(eval $$(call SetupNativeCompilation, BUILD_LAUNCHER_$1, \
$$(eval $$(call SetupJdkExecutable, BUILD_LAUNCHER_$1, \
NAME := $1, \
EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \
OPTIMIZATION := $$($1_OPTIMIZATION), \
CFLAGS := $$($1_CFLAGS) \
@ -204,20 +197,14 @@ define SetupBuildLauncherBody
MAPFILE := $$($1_MAPFILE), \
LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \
LIBS_unix := $$($1_LIBS_unix), \
LIBS_linux := -lpthread -ljli $(LIBDL) -lc, \
LIBS_solaris := -ljli -lthread $(LIBDL) -lc, \
LIBS_linux := -lpthread -ljli $(LIBDL), \
LIBS_solaris := -ljli -lthread $(LIBDL), \
LIBS_windows := $$($1_WINDOWS_JLI_LIB) \
$(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib advapi32.lib \
$$($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)" \
-D "JDK_INTERNAL_NAME=$1" \
-D "JDK_FTYPE=0x1L" \
$$($1_RC_FLAGS), \
EXTRA_RC_FLAGS := $$($1_EXTRA_RC_FLAGS), \
MANIFEST := $(JAVA_MANIFEST), \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
CODESIGN := $$($1_CODESIGN), \

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,9 +48,8 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMLIB_LDLIBS += $(LIBM) $(LIBDL)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
LIBRARY := mlib_image, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \
NAME := mlib_image, \
SRC := $(BUILD_LIBMLIB_SRC), \
EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
OPTIMIZATION := HIGHEST, \
@ -61,13 +60,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(BUILD_LIBMLIB_LDLIBS) \
$(JDKLIB_LIBS), \
LIBS_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=mlib_image.dll" \
-D "JDK_INTERNAL_NAME=mlib_image" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image, \
))
$(BUILD_LIBMLIB_IMAGE): $(call FindLib, java.base, java)
@ -107,9 +99,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, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE_V, \
NAME := mlib_image_v, \
SRC := $(LIBMLIB_IMAGE_V_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
OPTIMIZATION := HIGHEST, \
@ -119,8 +110,7 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -ljava -ljvm -lc $(BUILD_LIBMLIB_LDLIBS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmlib_image_v, \
LIBS := -ljava -ljvm $(BUILD_LIBMLIB_LDLIBS), \
))
$(BUILD_LIBMLIB_IMAGE_V): $(call FindLib, java.base, java)
@ -226,9 +216,8 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
LIBAWT_CFLAGS += -fgcse-after-reload
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
LIBRARY := awt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
NAME := awt, \
SRC := $(LIBAWT_DIRS), \
EXCLUDES := $(LIBAWT_EXCLUDES), \
EXCLUDE_FILES := $(LIBAWT_EXFILES), \
@ -250,7 +239,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
-delayload:comctl32.dll -delayload:shlwapi.dll, \
LIBS_unix := -ljvm -ljava $(LIBM), \
LIBS_linux := $(LIBDL), \
LIBS_solaris := $(LIBDL) -lc, \
LIBS_solaris := $(LIBDL), \
LIBS_aix := $(LIBDL),\
LIBS_macosx := -lmlib_image \
-framework Cocoa \
@ -268,7 +257,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt, \
))
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
@ -330,7 +318,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
endif
endif
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBAWT_XAWT_LIBS += -lpthread
@ -347,9 +335,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, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \
NAME := awt_xawt, \
SRC := $(LIBAWT_XAWT_DIRS), \
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
OPTIMIZATION := LOW, \
@ -367,12 +354,10 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
LIBS := $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=xawt.dll" \
-D "JDK_INTERNAL_NAME=xawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_xawt, \
))
$(BUILD_LIBAWT_XAWT): $(call FindLib, java.base, java)
@ -406,9 +391,8 @@ else
LIBLCMS_CPPFLAGS += $(addprefix -I, $(LIBLCMS_SRC))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
LIBRARY := lcms, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
NAME := lcms, \
SRC := $(LIBLCMS_SRC), \
INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
OPTIMIZATION := HIGHEST, \
@ -429,15 +413,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
LIBS_unix := -lawt -ljvm -ljava $(LCMS_LIBS), \
LIBS_linux := $(LIBM), \
LIBS_macosx := $(LIBM), \
LIBS_solaris := -lc, \
LIBS_aix := $(LIBM),\
LIBS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=lcms.dll" \
-D "JDK_INTERNAL_NAME=lcms" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/liblcms, \
))
TARGETS += $(BUILD_LIBLCMS)
@ -483,9 +460,8 @@ else
BUILD_LIBJAVAJPEG_HEADERS := $(addprefix -I, $(LIBJAVAJPEG_SRC))
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
LIBRARY := javajpeg, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \
NAME := javajpeg, \
SRC := $(LIBJAVAJPEG_SRC), \
INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
OPTIMIZATION := HIGHEST, \
@ -498,13 +474,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=javajpeg.dll" \
-D "JDK_INTERNAL_NAME=javajpeg" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavajpeg, \
))
$(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java)
@ -547,9 +517,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS, \
LIBRARY := awt_headless, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
NAME := awt_headless, \
SRC := $(LIBAWT_HEADLESS_DIRS), \
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
OPTIMIZATION := LOW, \
@ -569,8 +538,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
REORDER := $(LIBAWT_HEADLESS_REORDER), \
LIBS_unix := -lawt -ljvm -ljava, \
LIBS_linux := $(LIBM) $(LIBDL), \
LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX) -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_headless, \
LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \
))
# AIX warning explanation:
@ -585,6 +553,38 @@ endif
################################################################################
ifeq ($(FREETYPE_TO_USE), system)
LIBFREETYPE_CFLAGS := $(FREETYPE_CFLAGS)
LIBFREETYPE_LIBS := $(FREETYPE_LIBS)
else
LIBFREETYPE_SRC := $(TOPDIR)/src/java.desktop/share/native/libfreetype
BUILD_LIBFREETYPE_HEADERS := $(addprefix -I, $(LIBFREETYPE_SRC)/include)
LIBFREETYPE_CFLAGS := $(BUILD_LIBFREETYPE_HEADERS)
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBFREETYPE_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype/freetype.lib
else
LIBFREETYPE_LIBS := -lfreetype
endif
$(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \
NAME := freetype, \
SRC := $(LIBFREETYPE_SRC)/src, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFREETYPE_HEADERS) \
-DFT2_BUILD_LIBRARY, \
DISABLED_WARNINGS_solstudio := \
E_STATEMENT_NOT_REACHED \
E_END_OF_LOOP_CODE_NOT_REACHED, \
DISABLED_WARNINGS_microsoft := 4267 2220 4244, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
))
TARGETS += $(BUILD_LIBFREETYPE)
endif
###########################################################################
LIBFONTMANAGER_SRC := $(TOPDIR)/src/java.desktop/share/native/libfontmanager \
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libfontmanager
LIBFONTMANAGER_CFLAGS := \
@ -625,10 +625,10 @@ LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
#### End harfbuzz configuration
LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
# This may be overridden in a custom makefile
BUILD_LIBFONTMANAGER_MAPFILE ?= $(TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
BUILD_LIBFONTMANAGER_FONTLIB += $(FREETYPE_LIBS)
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
LIBFONTMANAGER_OPTIMIZATION := HIGH
@ -657,9 +657,8 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
LIBRARY := fontmanager, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
NAME := fontmanager, \
SRC := $(LIBFONTMANAGER_SRC), \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
AccelGlyphCache.c, \
@ -690,40 +689,21 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
LDFLAGS_macosx := -undefined dynamic_lookup, \
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
LIBS_linux := -lc, \
LIBS_solaris := -lawt_headless -lc, \
LIBS_aix := -lawt_headless,\
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
$(WIN_AWT_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=fontmanager.dll" \
-D "JDK_INTERNAL_NAME=fontmanager" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfontmanager, \
))
$(INSTALL_LIBRARIES_HERE)/$(call SHARED_LIBRARY,fontmanager): $(BUILD_LIBFONTMANAGER_TARGET)
$(install-file)
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
ifeq ($(OPENJDK_TARGET_OS), macosx)
# If bundling freetype on macosx, we need to rewrite the rpath location
# in the libfontmanager library to point to the bundled location
$(INSTALL_NAME_TOOL) -change \
`$(OTOOL) -D $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) | $(TAIL) -n1` \
'@rpath/$(call SHARED_LIBRARY,freetype)' \
$@
endif
endif
BUILD_LIBFONTMANAGER += $(INSTALL_LIBRARIES_HERE)/$(call SHARED_LIBRARY,fontmanager)
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS)
endif
ifeq ($(FREETYPE_TO_USE), bundled)
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE)
endif
TARGETS += $(BUILD_LIBFONTMANAGER)
################################################################################
@ -744,9 +724,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU), x86)
KERNEL32_LIB := kernel32.lib
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
NAME := jawt, \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
OPTIMIZATION := LOW, \
@ -755,12 +734,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
$(LIBJAWT_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jawt.dll" \
-D "JDK_INTERNAL_NAME=jawt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
))
$(BUILD_LIBJAWT): $(BUILD_LIBAWT)
@ -804,9 +777,8 @@ else # OPENJDK_TARGET_OS not windows
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAWT, \
LIBRARY := jawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
NAME := jawt, \
SRC := $(LIBJAWT_SRC), \
INCLUDE_FILES := $(JAWT_FILES), \
OPTIMIZATION := LOW, \
@ -822,7 +794,6 @@ else # OPENJDK_TARGET_OS not windows
LIBS_unix := $(JAWT_LIBS) $(JDKLIB_LIBS), \
LIBS_solaris := $(X_LIBS) -lXrender, \
LIBS_macosx := -framework Cocoa, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjawt, \
))
ifeq ($(ENABLE_HEADLESS_ONLY), false)
@ -921,7 +892,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBSPLASHSCREEN_LDFLAGS := -L$(INSTALL_LIBRARIES_HERE)
LIBSPLASHSCREEN_LIBS += \
$(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
@ -929,15 +899,13 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
-framework Cocoa \
-framework JavaNativeFoundation
else ifeq ($(OPENJDK_TARGET_OS), windows)
LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
else
LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
LIBRARY := splashscreen, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
NAME := splashscreen, \
SRC := $(LIBSPLASHSCREEN_DIRS), \
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
@ -951,17 +919,13 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
E_STATEMENT_NOT_REACHED, \
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
MAPFILE := $(TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) $(LDFLAGS_JDKLIB) \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_windows := -delayload:user32.dll, \
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) \
-D "JDK_FNAME=splashscreen.dll" \
-D "JDK_INTERNAL_NAME=splashscreen" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsplashscreen, \
))
TARGETS += $(BUILD_LIBSPLASHSCREEN)
@ -1008,9 +972,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, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
NAME := awt_lwawt, \
SRC := $(LIBAWT_LWAWT_DIRS), \
INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
@ -1038,7 +1001,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework QuartzCore -ljava, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt_lwawt, \
))
TARGETS += $(BUILD_LIBAWT_LWAWT)
@ -1057,9 +1019,8 @@ endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXUI, \
LIBRARY := osxui, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
NAME := osxui, \
SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxui, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -1080,7 +1041,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libosxui, \
))
TARGETS += $(BUILD_LIBOSXUI)

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), \
@ -77,8 +78,8 @@ 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), \
@ -107,9 +108,8 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
LIBRARY := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \
NAME := verify, \
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
@ -118,15 +118,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm -lc, \
LIBS_unix := -ljvm, \
LIBS_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=verify.dll" \
-D "JDK_INTERNAL_NAME=verify" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(BUILD_LIBVERIFY_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \
))
TARGETS += $(BUILD_LIBVERIFY)
@ -155,9 +149,8 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBRARY := java, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
NAME := java, \
SRC := $(LIBJAVA_SRC_DIRS), \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -176,7 +169,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
-export:getErrorString -delayload:shell32.dll, \
LIBS_unix := -ljvm -lverify, \
LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM), \
LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) $(LIBM),\
LIBS_macosx := -lfdlibm \
-framework CoreFoundation \
@ -185,13 +178,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
shell32.lib delayimp.lib \
advapi32.lib version.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java.dll" \
-D "JDK_INTERNAL_NAME=java" \
-D "JDK_FTYPE=0x2L", \
REORDER := $(LIBJAVA_REORDER), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \
))
TARGETS += $(BUILD_LIBJAVA)
@ -218,9 +205,8 @@ ifeq ($(LIBZIP_CAN_USE_MMAP), true)
BUILD_LIBZIP_MMAP := -DUSE_MMAP
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LIBRARY := zip, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
NAME := zip, \
OPTIMIZATION := LOW, \
SRC := $(TOPDIR)/src/java.base/share/native/libzip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
@ -239,14 +225,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
-export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
LIBS_solaris := -lc, \
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \
))
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
@ -262,10 +241,9 @@ JIMAGELIB_CPPFLAGS := \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
LIBRARY := jimage, \
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
NAME := jimage, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
OPTIMIZATION := LOW, \
SRC := $(TOPDIR)/src/java.base/share/native/libjimage \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \
@ -282,15 +260,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
-export:JIMAGE_FindResource -export:JIMAGE_GetResource \
-export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \
LIBS_unix := -ljvm -ldl $(LIBCXX), \
LIBS_solaris := -lc, \
LIBS_macosx := -lc++, \
LIBS_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jimage.dll" \
-D "JDK_INTERNAL_NAME=jimage" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \
))
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA)
@ -358,8 +329,8 @@ ifneq ($(USE_EXTERNAL_LIBZ), true)
)
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
LIBRARY := jli, \
$(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
NAME := jli, \
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \
SRC := $(LIBJLI_SRC_DIRS), \
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
@ -396,17 +367,11 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
-export:JLI_AddArgsFromEnvVar \
-export:JLI_GetAppArgIndex, \
LIBS_unix := $(LIBZ_LIBS), \
LIBS_linux := $(LIBDL) -lc -lpthread, \
LIBS_solaris := $(LIBDL) -lc, \
LIBS_linux := $(LIBDL) -lpthread, \
LIBS_solaris := $(LIBDL), \
LIBS_aix := $(LIBDL),\
LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
LIBS_windows := advapi32.lib comctl32.lib user32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \
))
TARGETS += $(BUILD_LIBJLI)
@ -415,8 +380,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), \
@ -434,8 +400,8 @@ 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), \
@ -457,8 +423,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, 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,10 +33,145 @@ LIB_java.base_SRC_DIRS += $(TOPDIR)/src/java.base/*/native
$(eval $(call FillCacheFind, $(wildcard $(LIB_java.base_SRC_DIRS))))
################################################################################
# Create all the core libraries
include CoreLibraries.gmk
include NetworkingLibraries.gmk
include NioLibraries.gmk
include SecurityLibraries.gmk
################################################################################
# Create the network library
LIBNET_SRC_DIRS := $(call FindSrcDirsForLib, java.base, net)
$(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
NAME := net, \
SRC := $(LIBNET_SRC_DIRS), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \
DISABLED_WARNINGS_gcc := format-nonliteral, \
DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \
DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \
MAPFILE := $(TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
LIBS_unix := -ljvm -ljava, \
LIBS_linux := $(LIBDL) -lpthread, \
LIBS_solaris := -lnsl -lsocket $(LIBDL), \
LIBS_aix := $(LIBDL),\
LIBS_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib winhttp.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib, \
LIBS_macosx := -framework CoreFoundation -framework CoreServices, \
))
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
TARGETS += $(BUILD_LIBNET)
################################################################################
# Create the nio library
BUILD_LIBNIO_SRC := \
$(TOPDIR)/src/java.base/share/native/libnio \
$(TOPDIR)/src/java.base/share/native/libnio/ch \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio \
$(sort $(wildcard \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/fs \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/ch \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/fs)) \
#
BUILD_LIBNIO_CFLAGS := \
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBNET_SRC))
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
endif
$(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
NAME := nio, \
SRC := $(BUILD_LIBNIO_SRC), \
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
OPTIMIZATION := HIGH, \
WARNINGS_AS_ERRORS_xlc := false, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBNIO_CFLAGS), \
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava -lnet, \
LIBS_linux := -lpthread $(LIBDL), \
LIBS_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
-lsendfile, \
LIBS_aix := $(LIBDL), \
LIBS_macosx := \
-framework CoreFoundation -framework CoreServices, \
LIBS_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
advapi32.lib, \
))
TARGETS += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)
################################################################################
# Create the macosx security library
ifeq ($(OPENJDK_TARGET_OS), macosx)
# JavaNativeFoundation framework not supported in static builds
ifneq ($(STATIC_BUILD), true)
LIBOSXSECURITY_DIRS := $(TOPDIR)/src/java.base/macosx/native/libosxsecurity
LIBOSXSECURITY_CFLAGS := -I$(LIBOSXSECURITY_DIRS) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXSECURITY, \
NAME := osxsecurity, \
SRC := $(LIBOSXSECURITY_DIRS), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBOSXSECURITY_CFLAGS), \
DISABLED_WARNINGS_clang := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-fobjc-link-runtime, \
LIBS := \
-framework JavaNativeFoundation \
-framework CoreServices \
-framework Security \
$(JDKLIB_LIBS), \
))
$(BUILD_LIBOSXSECURITY): $(BUILD_LIBJAVA)
TARGETS += $(BUILD_LIBOSXSECURITY)
endif
endif
################################################################################
# Create the symbols file for static builds.
ifeq ($(STATIC_BUILD), true)
JAVA_BASE_EXPORT_SYMBOLS_SRC := \

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
@ -33,7 +33,79 @@ LIB_java.desktop_SRC_DIRS += $(TOPDIR)/src/java.desktop/*/native
$(eval $(call FillCacheFind, $(wildcard $(LIB_java.desktop_SRC_DIRS))))
include LibosxLibraries.gmk
include PlatformLibraries.gmk
################################################################################
# Create the AWT/2D and sound libraries
include Awt2dLibraries.gmk
include SoundLibraries.gmk
################################################################################
# Create the macosx specific osxapp and osx libraries
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSXAPP_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libosxapp
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXAPP, \
NAME := osxapp, \
SRC := $(LIBOSXAPP_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBOSXAPP_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
DISABLED_WARNINGS_clang := objc-method-access objc-root-class, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Security \
-framework ExceptionHandling \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework OpenGL \
-framework IOSurface \
-framework QuartzCore, \
))
TARGETS += $(BUILD_LIBOSXAPP)
##############################################################################
LIBOSX_DIRS := $(TOPDIR)/src/java.desktop/macosx/native/libosx
LIBOSX_CFLAGS := -I$(LIBOSX_DIRS) \
-I$(TOPDIR)/src/java.desktop/macosx/native/libosxapp \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBOSX, \
NAME := osx, \
SRC := $(LIBOSX_DIRS), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBOSX_CFLAGS), \
DISABLED_WARNINGS_clang := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework SystemConfiguration \
$(JDKLIB_LIBS), \
))
TARGETS += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(call FindLib, java.desktop, osxapp)
$(BUILD_LIBOSX): $(call FindLib, java.base, java)
endif

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,9 +49,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \
NAME := instrument, \
SRC := $(LIBINSTRUMENT_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
@ -77,12 +76,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
$(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a, \
LIBS_windows := jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
$(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libinstrument, \
))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))

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,9 +44,8 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
NAME := management, \
SRC := $(LIBMANAGEMENT_SRC), \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_CFLAGS), \
@ -57,12 +56,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBS_solaris := -lkstat, \
LIBS_aix := -lperfstat,\
LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement, \
))
$(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)

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,9 +33,8 @@ else
LIBPREF_SRC_DIRS := $(TOPDIR)/src/java.prefs/$(OPENJDK_TARGET_OS_TYPE)/native/libprefs
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
LIBRARY := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBPREFS, \
NAME := prefs, \
SRC := $(LIBPREF_SRC_DIRS), \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \
@ -45,16 +44,10 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_linux := -ljava, \
LIBS_solaris := -ljava -lc, \
LIBS_solaris := -ljava, \
LIBS_aix := -ljava, \
LIBS_macosx := -framework CoreFoundation -framework Foundation, \
LIBS_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libprefs, \
))
$(BUILD_LIBPREFS): $(call FindLib, java.base, java)

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,9 +27,8 @@ include LibCommon.gmk
################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBRMI, \
LIBRARY := rmi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBRMI, \
NAME := rmi, \
SRC := $(TOPDIR)/src/java.rmi/share/native/librmi, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.rmi, \
@ -38,12 +37,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBRMI, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm, \
LIBS_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=rmi.dll" \
-D "JDK_INTERNAL_NAME=rmi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/librmi, \
))
$(BUILD_LIBRMI): $(call FindLib, java.base, java)

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,9 +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, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
NAME := j2gss, \
SRC := $(LIBJ2GSS_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
@ -44,8 +43,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBDL), \
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2gss, \
))
TARGETS += $(BUILD_LIBJ2GSS)
@ -54,47 +51,47 @@ endif
################################################################################
ifneq ($(BUILD_CRYPTO), false)
BUILD_LIBKRB5_NAME :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKRB5_NAME := w2k_lsa_auth
BUILD_LIBKRB5_SRC := $(TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_TYPE)/native/libw2k_lsa_auth
BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(TOPDIR)/src/java.security.jgss/macosx/native/libosxkrb5
BUILD_LIBKRB5_LIBS := \
-framework JavaNativeFoundation \
-framework Cocoa \
-framework SystemConfiguration \
-framework Kerberos
endif
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), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBW2K_LSA_AUTH_SRC := $(call FindSrcDirsForLib, $(MODULE), w2k_lsa_auth)
$(eval $(call SetupJdkLibrary, BUILD_LIBW2K_LSA_AUTH, \
NAME := w2k_lsa_auth, \
SRC := $(BUILD_LIBW2K_LSA_AUTH_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
$(addprefix -I, $(BUILD_LIBW2K_LSA_AUTH_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib, \
))
TARGETS += $(BUILD_LIBW2K_LSA_AUTH)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBOSXKRB5_SRC := $(call FindSrcDirsForLib, $(MODULE), osxkrb5)
# libosxkrb5 needs to call deprecated krb5 APIs so that java
# can use the native credentials cache.
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXKRB5, \
NAME := osxkrb5, \
SRC := $(BUILD_LIBOSXKRB5_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(BUILD_LIBOSXKRB5_SRC)) \
-I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
DISABLED_WARNINGS_clang := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(BUILD_LIBKRB5_LIBS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libkrb5, \
LIBS := -framework JavaNativeFoundation -framework Cocoa \
-framework SystemConfiguration -framework Kerberos, \
))
TARGETS += $(BUILD_LIBKRB5)
TARGETS += $(BUILD_LIBOSXKRB5)
endif
endif

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,9 +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, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \
NAME := j2pcsc, \
SRC := $(LIBJ2PCSC_SRC), \
CFLAGS_unix := -D__sun_jdk, \
OPTIMIZATION := LOW, \
@ -44,14 +43,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
LIBS_solaris := -lc, \
LIBS_windows := winscard.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pcsc, \
))
TARGETS += $(BUILD_LIBJ2PCSC)

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
@ -41,26 +41,20 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
LIBRARY = javaaccessbridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(call SetupJdkLibrary, BUILD_JAVAACCESSBRIDGE$1, \
NAME := javaaccessbridge$1, \
SRC := $(JAVA_AB_SRCDIR), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
-I$(ROOT_SRCDIR)/include/bridge \
-DACCESSBRIDGE_ARCH_$2, \
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
$(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=javaaccessbridge$1.dll" \
-D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
)
$$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
@ -71,26 +65,20 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
define SetupWinDLL
# Parameter 1 Suffix
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
LIBRARY = windowsaccessbridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(call SetupJdkLibrary, BUILD_WINDOWSACCESSBRIDGE$1, \
NAME := windowsaccessbridge$1, \
SRC := $(WIN_AB_SRCDIR), \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
$(addprefix -I,$(WIN_AB_SRCDIR)) \
-I$(ROOT_SRCDIR)/include/bridge \
-DACCESSBRIDGE_ARCH_$2, \
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=windowsaccessbridge$1.dll" \
-D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
)
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
@ -99,20 +87,13 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
define SetupAccessBridgeSysInfo
$(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \
LIBRARY = jabsysinfo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(call SetupJdkLibrary, BUILD_ACCESSBRIDGESYSINFO, \
NAME := jabsysinfo, \
SRC := $(SYSINFO_SRCDIR), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-subsystem:windows -machine:I386, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jabsysinfo.dll" \
-D "JDK_INTERNAL_NAME=jabsysinfo" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
)
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)

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
@ -34,9 +34,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBATTACH_CFLAGS := -DPSAPI_VERSION=1
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBATTACH, \
NAME := attach, \
SRC := $(call FindSrcDirsForLib, jdk.attach, attach), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -44,18 +43,12 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
$(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=attach.dll" \
-D "JDK_INTERNAL_NAME=attach" \
-D "JDK_FTYPE=0x2L", \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -order:@$(TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LIBS := $(JDKLIB_LIBS), \
LIBS_solaris := -ldoor, \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libattach, \
))
$(BUILD_LIBATTACH): $(call FindLib, java.base, java)

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
@ -30,9 +30,8 @@ include LibCommon.gmk
LIBJ2PKCS11_SRC := $(TOPDIR)/src/jdk.crypto.cryptoki/share/native/libj2pkcs11 \
$(TOPDIR)/src/jdk.crypto.cryptoki/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pkcs11
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2PKCS11, \
NAME := j2pkcs11, \
SRC := $(LIBJ2PKCS11_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
@ -42,13 +41,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
LIBS_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2pkcs11, \
))
TARGETS += $(BUILD_LIBJ2PKCS11)

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
@ -43,9 +43,8 @@ ifeq ($(ENABLE_INTREE_EC), true)
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
LIBRARY := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBSUNEC, \
NAME := sunec, \
SRC := $(LIBSUNEC_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
@ -60,14 +59,6 @@ ifeq ($(ENABLE_INTREE_EC), true)
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBCXX), \
LIBS_linux := -lc, \
LIBS_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunec, \
))
TARGETS += $(BUILD_LIBSUNEC)

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
@ -31,9 +31,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBSUNMSCAPI_SRC := $(TOPDIR)/src/jdk.crypto.mscapi/$(OPENJDK_TARGET_OS_TYPE)/native/libsunmscapi
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
LIBRARY := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBSUNMSCAPI, \
NAME := sunmscapi, \
SRC := $(LIBSUNMSCAPI_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -41,12 +40,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := crypt32.lib advapi32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsunmscapi, \
))
TARGETS += $(BUILD_LIBSUNMSCAPI)

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
@ -31,9 +31,8 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBJ2UCRYPTO_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
LIBRARY := j2ucrypto, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2UCRYPTO, \
NAME := j2ucrypto, \
SRC := $(LIBJ2UCRYPTO_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -41,8 +40,6 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
MAPFILE := $(TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(LIBDL), \
LIBS_solaris := -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libj2ucrypto, \
))
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)

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
@ -23,7 +23,7 @@
# questions.
#
include NativeCompilation.gmk
include LibCommon.gmk
$(eval $(call IncludeCustomExtension, hotspot/lib/Lib-jdk.hotspot.agent.gmk))
@ -46,73 +46,61 @@ SA_INCLUDES := \
-I$(TOPDIR)/src/hotspot/os/$(OPENJDK_TARGET_OS) \
#
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
SA_MACHINE_FLAG_windows := -machine:AMD64
else ifeq ($(OPENJDK_TARGET_CPU), x86)
SA_MACHINE_FLAG_linux := -march=i586
SA_MACHINE_FLAG_windows := -machine:I386
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
SA_CFLAGS := $(CFLAGS_JDKLIB) -D_FILE_OFFSET_BITS=64 \
$(SA_MACHINE_FLAG_linux)
SA_LDFLAGS := $(LDFLAGS_JDKLIB) $(SA_MACHINE_FLAG_linux)
SA_CFLAGS := $(CFLAGS_JDKLIB) -D_FILE_OFFSET_BITS=64
ifeq ($(OPENJDK_TARGET_CPU), x86)
SA_LDFLAGS := -march=i586
endif
SA_LIBS := -lthread_db $(LIBDL)
else ifeq ($(OPENJDK_TARGET_OS), solaris)
SA_TOOLCHAIN := TOOLCHAIN_LINK_CXX
SA_CFLAGS := $(CFLAGS_JDKLIB)
SA_CXXFLAGS := $(CXXFLAGS_JDKLIB)
SA_LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,, $(LDFLAGS_JDKLIB)) \
-mt $(LDFLAGS_CXX_JDK)
SA_LIBS := -ldl -ldemangle -lthread -lc
SA_LDFLAGS := -mt $(LDFLAGS_CXX_JDK)
SA_LIBS := -ldl -ldemangle -lthread -lproc
else ifeq ($(OPENJDK_TARGET_OS), macosx)
SA_EXCLUDE_FILES := BsdDebuggerLocal.c ps_proc.c salibelf.c StubDebuggerLocal.c
SA_CFLAGS := $(CFLAGS_JDKLIB) \
-Damd64 -D_GNU_SOURCE -mno-omit-leaf-frame-pointer \
-mstack-alignment=16 -fPIC
SA_LDFLAGS := $(LDFLAGS_JDKLIB)
SA_LIBS := -framework Foundation -framework JavaNativeFoundation \
-framework JavaRuntimeSupport -framework Security -framework CoreFoundation
else ifeq ($(OPENJDK_TARGET_OS), windows)
SA_NAME := sawindbg
COMMON_CFLAGS := -D_WINDOWS -D_DEBUG -D_CONSOLE -D_MBCS -EHsc -FD
COMMON_CFLAGS := -D_WINDOWS -D_DEBUG -D_CONSOLE -D_MBCS -EHsc
SA_CFLAGS := $(subst -DWIN32_LEAN_AND_MEAN,, $(CFLAGS_JDKLIB)) \
$(COMMON_CFLAGS)
SA_CXXFLAGS := $(subst -DWIN32_LEAN_AND_MEAN,, $(CXXFLAGS_JDKLIB)) \
$(COMMON_CFLAGS)
SA_LDFLAGS := $(LDFLAGS_JDKLIB) \
$(SA_MACHINE_FLAG_windows) -manifest \
-subsystem:console -map
SA_LDFLAGS := -manifest
SA_LIBS := dbgeng.lib
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
SA_CXXFLAGS += -DWIN64
else
SA_CXXFLAGS += -RTC1
SA_LDFLAGS += -SAFESEH
endif
endif
################################################################################
$(eval $(call SetupNativeCompilation, BUILD_LIBSA, \
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
NAME := $(SA_NAME), \
TOOLCHAIN := $(SA_TOOLCHAIN), \
OPTIMIZATION := NONE, \
DISABLED_WARNINGS_microsoft := 4267, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma, \
LIBRARY := $(SA_NAME), \
OUTPUT_DIR := $(call FindLibDirForModule, $(MODULE)), \
SRC := $(SA_SRC), \
EXCLUDE_FILES := test.c saproc_audit.cpp $(SA_EXCLUDE_FILES), \
CFLAGS := $(SA_INCLUDES) $(SA_CFLAGS) $(SA_CUSTOM_CFLAGS), \
CXXFLAGS := $(SA_INCLUDES) $(SA_CXXFLAGS) $(SA_CUSTOM_CXXFLAGS), \
LDFLAGS := $(SA_LDFLAGS) $(SA_CUSTOM_LDFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(SA_LDFLAGS), \
LIBS := $(SA_LIBS), \
MAPFILE := $(SA_MAPFILE), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsa, \
))
TARGETS += $(BUILD_LIBSA)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 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
@ -36,21 +36,14 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.internal.le \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBLE, \
LIBRARY := le, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
NAME := le, \
SRC := $(LIBLE_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJAVA_HEADER_FLAGS)\
$(LIBLE_CPPFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(JDKLIB_LIBS) user32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=le.dll" \
-D "JDK_INTERNAL_NAME=le" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lible, \
))
TARGETS += $(BUILD_LIBLE)

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
@ -39,9 +39,8 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdi \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
LIBRARY := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBDT_SHMEM, \
NAME := dt_shmem, \
SRC := $(LIBDT_SHMEM_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
@ -49,12 +48,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LIBS := $(JDKLIB_LIBS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_shmem, \
))
TARGETS += $(BUILD_LIBDT_SHMEM)

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
@ -36,27 +36,19 @@ LIBDT_SOCKET_CPPFLAGS := \
-I$(TOPDIR)/src/jdk.jdwp.agent/share/native/include \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
LIBRARY := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \
NAME := dt_socket, \
SRC := $(LIBDT_SOCKET_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
$(LIBDT_SOCKET_CPPFLAGS), \
DISABLED_WARNINGS_gcc := shift-negative-value, \
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LIBS_linux := -lpthread, \
LIBS_solaris := -lnsl -lsocket -lc, \
LIBS_solaris := -lnsl -lsocket, \
LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libdt_socket, \
))
$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
@ -74,9 +66,8 @@ LIBJDWP_CPPFLAGS := \
$(addprefix -I, $(LIBJDWP_SRC))
# JDWP_LOGGING causes log messages to be compiled into the library.
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBRARY := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
NAME := jdwp, \
SRC := $(LIBJDWP_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
@ -90,12 +81,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBS_solaris := $(LIBDL), \
LIBS_macosx := -liconv, \
LIBS_aix := -liconv, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjdwp, \
))
$(BUILD_LIBJDWP): $(call FindLib, java.base, java)

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
@ -33,9 +33,8 @@ LIBMANAGEMENT_AGENT_CFLAGS := $(addprefix -I,$(LIBMANAGEMENT_AGENT_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_AGENT, \
LIBRARY := management_agent, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_AGENT, \
NAME := management_agent, \
SRC := $(LIBMANAGEMENT_AGENT_SRC), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_AGENT_CFLAGS), \
@ -44,12 +43,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_AGENT, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management_agent.dll" \
-D "JDK_INTERNAL_NAME=management_agent" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_agent, \
))
$(BUILD_LIBMANAGEMENT_AGENT): $(call FindLib, java.base, java)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 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
@ -53,9 +53,8 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
LIBRARY := management_ext, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
NAME := management_ext, \
SRC := $(LIBMANAGEMENT_EXT_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
@ -67,12 +66,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT_EXT, \
LIBS_solaris := -lkstat, \
LIBS_aix := -lperfstat,\
LIBS_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management_ext.dll" \
-D "JDK_INTERNAL_NAME=management_ext" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libmanagement_ext, \
))
$(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)

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
@ -27,19 +27,19 @@ include LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux), )
$(eval $(call SetupNativeCompilation, BUILD_LIBEXTNET, \
LIBRARY := extnet, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.net/solaris/native/libextnet, \
$(eval $(call SetupJdkLibrary, BUILD_LIBEXTNET, \
NAME := extnet, \
SRC := $(TOPDIR)/src/jdk.net/$(OPENJDK_TARGET_OS)/native/libextnet, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \
MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-solaris, \
MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-$(OPENJDK_TARGET_OS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -lsocket -lc -ljava, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libextnet, \
LIBS := -ljava, \
LIBS_solaris := -lsocket, \
LIBS_linux := -ljvm, \
))
$(BUILD_LIBEXTNET): $(call FindLib, java.base, java)
@ -47,26 +47,4 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
TARGETS += $(BUILD_LIBEXTNET)
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
$(eval $(call SetupNativeCompilation, BUILD_LIBEXTNET, \
LIBRARY := extnet, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(TOPDIR)/src/jdk.net/linux/native/libextnet, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \
MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-linux, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := -ljvm -ljava -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libextnet, \
))
$(BUILD_LIBEXTNET): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBEXTNET)
endif
################################################################################

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
@ -27,9 +27,8 @@ include LibCommon.gmk
################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBUNPACK, \
NAME := unpack, \
SRC := $(TOPDIR)/src/jdk.pack/share/native/libunpack \
$(TOPDIR)/src/jdk.pack/share/native/common-unpack, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
@ -45,14 +44,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
LIBS_unix := -ljvm $(LIBCXX) -ljava -lc, \
LIBS_unix := -ljvm $(LIBCXX) -ljava, \
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libunpack, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
))
$(BUILD_LIBUNPACK): $(call FindLib, java.base, java)

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
@ -30,9 +30,8 @@ include LibCommon.gmk
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
LIBRARY := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBSCTP, \
NAME := sctp, \
SRC := $(TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -47,8 +46,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -lnio -lnet -ljava -ljvm, \
LIBS_linux := -lpthread $(LIBDL), \
LIBS_solaris := -lsocket -lc, \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
LIBS_solaris := -lsocket, \
))
TARGETS += $(BUILD_LIBSCTP)

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,28 +33,15 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBJAAS_MAPFILE := $(TOPDIR)/make/mapfiles/libjaas/mapfile-vers
endif
LIBJAAS_NAME := jaas_unix
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAAS_NAME := jaas_nt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
LIBRARY := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
$(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \
NAME := jaas, \
SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_solaris := -lc, \
LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjaas, \
))
$(BUILD_LIBJAAS): $(call FindLib, java.base, java)

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
@ -23,7 +23,7 @@
# questions.
#
include NativeCompilation.gmk
include JdkNativeCompilation.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, lib/LibCommon.gmk))
@ -32,7 +32,7 @@ $(eval $(call IncludeCustomExtension, lib/LibCommon.gmk))
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# Absolute paths to lib files on windows for use in LIBS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib

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