Skip to content

Commit 8648193

Browse files
author
duke
committed
Automatic merge of master into lambda-leftovers
2 parents 71cdf72 + 531c56e commit 8648193

File tree

822 files changed

+48709
-31007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

822 files changed

+48709
-31007
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/dist/
33
/.idea/
44
/.vscode/
5+
/nbproject/
56
nbproject/private/
67
/webrev
78
/.src-rev
@@ -14,3 +15,4 @@ test/nashorn/lib
1415
NashornProfile.txt
1516
**/JTreport/**
1617
**/JTwork/**
18+
/src/utils/LogCompilation/target/

doc/building.html

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -629,21 +629,30 @@ <h3 id="creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sys
629629
<p>Fortunately, you can create sysroots for foreign architectures with tools provided by your OS. On Debian/Ubuntu systems, one could use <code>qemu-deboostrap</code> to create the <em>target</em> system chroot, which would have the native libraries and headers specific to that <em>target</em> system. After that, we can use the cross-compiler on the <em>build</em> system, pointing into chroot to get the build dependencies right. This allows building for foreign architectures with native compilation speed.</p>
630630
<p>For example, cross-compiling to AArch64 from x86_64 could be done like this:</p>
631631
<ul>
632-
<li>Install cross-compiler on the <em>build</em> system:</li>
633-
</ul>
634-
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre>
635-
<ul>
636-
<li>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</li>
637-
</ul>
638-
<pre><code>sudo qemu-debootstrap --arch=arm64 --verbose \
639-
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
640-
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/</code></pre>
641-
<ul>
642-
<li>Configure and build with newly created chroot as sysroot/toolchain-path:</li>
643-
</ul>
644-
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
632+
<li><p>Install cross-compiler on the <em>build</em> system:</p>
633+
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre></li>
634+
<li><p>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</p>
635+
<pre><code>sudo qemu-debootstrap \
636+
--arch=arm64 \
637+
--verbose \
638+
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev \
639+
--resolve-deps \
640+
buster \
641+
~/sysroot-arm64 \
642+
http://httpredir.debian.org/debian/</code></pre></li>
643+
<li><p>Make sure the symlinks inside the newly created chroot point to proper locations:</p>
644+
<pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>
645+
<li><p>Configure and build with newly created chroot as sysroot/toolchain-path:</p>
646+
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure \
647+
--openjdk-target=aarch64-linux-gnu \
648+
--with-sysroot=~/sysroot-arm64 \
649+
--with-toolchain-path=~/sysroot-arm64 \
650+
--with-freetype-lib=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/ \
651+
--with-freetype-include=~/sysroot-arm64/usr/include/freetype2/ \
652+
--x-libraries=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/
645653
make images
646-
ls build/linux-aarch64-normal-server-release/</code></pre>
654+
ls build/linux-aarch64-server-release/</code></pre></li>
655+
</ul>
647656
<p>The build does not create new files in that chroot, so it can be reused for multiple builds without additional cleanup.</p>
648657
<p>Architectures that are known to successfully cross-compile like this are:</p>
649658
<table>

doc/building.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,23 +1086,39 @@ for foreign architectures with native compilation speed.
10861086
For example, cross-compiling to AArch64 from x86_64 could be done like this:
10871087
10881088
* Install cross-compiler on the *build* system:
1089-
```
1090-
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
1091-
```
1089+
```
1090+
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
1091+
```
10921092
10931093
* Create chroot on the *build* system, configuring it for *target* system:
1094-
```
1095-
sudo qemu-debootstrap --arch=arm64 --verbose \
1096-
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
1097-
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/
1098-
```
1094+
```
1095+
sudo qemu-debootstrap \
1096+
--arch=arm64 \
1097+
--verbose \
1098+
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev \
1099+
--resolve-deps \
1100+
buster \
1101+
~/sysroot-arm64 \
1102+
http://httpredir.debian.org/debian/
1103+
```
1104+
1105+
* Make sure the symlinks inside the newly created chroot point to proper locations:
1106+
```
1107+
sudo chroot ~/sysroot-arm64 symlinks -cr .
1108+
```
10991109
11001110
* Configure and build with newly created chroot as sysroot/toolchain-path:
1101-
```
1102-
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
1103-
make images
1104-
ls build/linux-aarch64-normal-server-release/
1105-
```
1111+
```
1112+
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure \
1113+
--openjdk-target=aarch64-linux-gnu \
1114+
--with-sysroot=~/sysroot-arm64 \
1115+
--with-toolchain-path=~/sysroot-arm64 \
1116+
--with-freetype-lib=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/ \
1117+
--with-freetype-include=~/sysroot-arm64/usr/include/freetype2/ \
1118+
--x-libraries=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/
1119+
make images
1120+
ls build/linux-aarch64-server-release/
1121+
```
11061122
11071123
The build does not create new files in that chroot, so it can be reused for multiple builds
11081124
without additional cleanup.

make/autoconf/configure

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
44
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
#
66
# This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ export LC_ALL=C
4949
if test "x$CUSTOM_CONFIG_DIR" != x; then
5050
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
5151
if test ! -e $custom_hook; then
52-
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
52+
echo "CUSTOM_CONFIG_DIR ($CUSTOM_CONFIG_DIR) not pointing to a proper custom config dir."
5353
echo "Error: Cannot continue" 1>&2
5454
exit 1
5555
fi
@@ -83,6 +83,7 @@ autoconf_missing_help() {
8383
BREW="`type -p brew 2> /dev/null`"
8484
ZYPPER="`type -p zypper 2> /dev/null`"
8585
CYGWIN="`type -p cygpath 2> /dev/null`"
86+
UNAMEOUT="`uname 2> /dev/null`"
8687

8788
if test "x$ZYPPER" != x; then
8889
PKGHANDLER_COMMAND="sudo zypper install autoconf"
@@ -92,6 +93,8 @@ autoconf_missing_help() {
9293
PKGHANDLER_COMMAND="sudo yum install autoconf"
9394
elif test "x$BREW" != x; then
9495
PKGHANDLER_COMMAND="brew install autoconf"
96+
elif test "x$UNAMEOUT" == xAIX; then
97+
echo "You might be able to fix this by installing autoconf from the 'AIX Toolbox for Linux Applications' (or compile it from the sources)."
9598
elif test "x$CYGWIN" != x; then
9699
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
97100
fi
@@ -114,7 +117,7 @@ generate_configure_script() {
114117
AUTOCONF="`type -p autoconf 2> /dev/null`"
115118
if test "x$AUTOCONF" = x; then
116119
echo
117-
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
120+
echo "Autoconf is not found on the PATH ($PATH), and AUTOCONF is not set."
118121
echo "You need autoconf to be able to generate a runnable configure script."
119122
autoconf_missing_help
120123
echo "Error: Cannot find autoconf" 1>&2

make/hotspot/gensrc/GensrcJvmti.gmk

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,6 @@ $(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \
106106
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \
107107
-PARAM majorversion $(VERSION_FEATURE)))
108108

109-
JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter/zero
110-
111-
ifeq ($(call check-jvm-feature, zero), true)
112-
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
113-
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
114-
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
115-
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
116-
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
117-
))
118-
endif
119-
120109
################################################################################
121110
# Copy jvmti.h to include dir
122111

make/hotspot/symbols/symbols-aix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# questions.
2222
#
2323

24-
JVM_handle_linux_signal
24+
JVM_handle_aix_signal
2525
numa_error
2626
numa_warn
2727
sysThreadAvailableStackWithSlack

make/modules/java.base/Gensrc.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ include gensrc/GensrcExceptions.gmk
3535
include gensrc/GensrcVarHandles.gmk
3636
include gensrc/GensrcModuleLoaderMap.gmk
3737
include gensrc/GensrcEmojiData.gmk
38+
include gensrc/GensrcScopedMemoryAccess.gmk
3839

3940
# GensrcLocaleData.gmk does not set TARGETS, so we must choose which targets
4041
# to include.
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
#
2+
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
SCOPED_MEMORY_ACCESS_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/misc
27+
SCOPED_MEMORY_ACCESS_SRC_DIR := $(TOPDIR)/src/java.base/share/classes/jdk/internal/misc
28+
SCOPED_MEMORY_ACCESS_TEMPLATE := $(SCOPED_MEMORY_ACCESS_SRC_DIR)/X-ScopedMemoryAccess.java.template
29+
SCOPED_MEMORY_ACCESS_BIN_TEMPLATE := $(SCOPED_MEMORY_ACCESS_SRC_DIR)/X-ScopedMemoryAccess-bin.java.template
30+
SCOPED_MEMORY_ACCESS_DEST := $(SCOPED_MEMORY_ACCESS_GENSRC_DIR)/ScopedMemoryAccess.java
31+
32+
################################################################################
33+
# Setup a rule for generating the ScopedMemoryAccess java class
34+
# Param 1 - Variable declaration prefix
35+
# Param 2 - Type with first letter capitalized
36+
define GenerateScopedOp
37+
38+
$1_Type := $2
39+
40+
ifeq ($$($1_Type), Byte)
41+
$1_type := byte
42+
$1_BoxType := $$($1_Type)
43+
44+
$1_rawType := $$($1_type)
45+
$1_RawType := $$($1_Type)
46+
$1_RawBoxType := $$($1_BoxType)
47+
48+
$1_ARGS += -Kbyte
49+
endif
50+
51+
ifeq ($$($1_Type), Short)
52+
$1_type := short
53+
$1_BoxType := $$($1_Type)
54+
55+
$1_rawType := $$($1_type)
56+
$1_RawType := $$($1_Type)
57+
$1_RawBoxType := $$($1_BoxType)
58+
$1_ARGS += -KUnaligned
59+
endif
60+
61+
ifeq ($$($1_Type), Char)
62+
$1_type := char
63+
$1_BoxType := Character
64+
65+
$1_rawType := $$($1_type)
66+
$1_RawType := $$($1_Type)
67+
$1_RawBoxType := $$($1_BoxType)
68+
$1_ARGS += -KUnaligned
69+
endif
70+
71+
ifeq ($$($1_Type), Int)
72+
$1_type := int
73+
$1_BoxType := Integer
74+
75+
$1_rawType := $$($1_type)
76+
$1_RawType := $$($1_Type)
77+
$1_RawBoxType := $$($1_BoxType)
78+
79+
$1_ARGS += -KCAS
80+
$1_ARGS += -KAtomicAdd
81+
$1_ARGS += -KBitwise
82+
$1_ARGS += -KUnaligned
83+
endif
84+
85+
ifeq ($$($1_Type), Long)
86+
$1_type := long
87+
$1_BoxType := $$($1_Type)
88+
89+
$1_rawType := $$($1_type)
90+
$1_RawType := $$($1_Type)
91+
$1_RawBoxType := $$($1_BoxType)
92+
93+
$1_ARGS += -KCAS
94+
$1_ARGS += -KAtomicAdd
95+
$1_ARGS += -KBitwise
96+
$1_ARGS += -KUnaligned
97+
endif
98+
99+
ifeq ($$($1_Type), Float)
100+
$1_type := float
101+
$1_BoxType := $$($1_Type)
102+
103+
$1_rawType := int
104+
$1_RawType := Int
105+
$1_RawBoxType := Integer
106+
107+
$1_ARGS += -KCAS
108+
$1_ARGS += -KfloatingPoint
109+
endif
110+
111+
ifeq ($$($1_Type), Double)
112+
$1_type := double
113+
$1_BoxType := $$($1_Type)
114+
115+
$1_rawType := long
116+
$1_RawType := Long
117+
$1_RawBoxType := Long
118+
119+
$1_ARGS += -KCAS
120+
$1_ARGS += -KfloatingPoint
121+
endif
122+
123+
ifneq ($$(findstring $$($1_Type), Byte Short Char Int Long Float Double), )
124+
$1_ARGS += -KAtomicAdd
125+
endif
126+
127+
ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char Int Long), )
128+
$1_ARGS += -KBitwise
129+
endif
130+
131+
ifneq ($$(findstring $$($1_Type), Byte Short Char), )
132+
$1_ARGS += -KShorterThanInt
133+
endif
134+
endef
135+
136+
################################################################################
137+
# Setup a rule for generating the ScopedMemoryAccess java class
138+
139+
SCOPE_MEMORY_ACCESS_TYPES := Byte Short Char Int Long Float Double
140+
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
141+
$(eval $(call GenerateScopedOp,BIN_$t,$t)))
142+
143+
$(SCOPED_MEMORY_ACCESS_DEST): $(BUILD_TOOLS_JDK) $(SCOPED_MEMORY_ACCESS_TEMPLATE) $(SCOPED_MEMORY_ACCESS_BIN_TEMPLATE)
144+
$(call MakeDir, $(SCOPED_MEMORY_ACCESS_GENSRC_DIR))
145+
$(CP) $(SCOPED_MEMORY_ACCESS_TEMPLATE) $(SCOPED_MEMORY_ACCESS_DEST)
146+
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
147+
$(TOOL_SPP) -nel -K$(BIN_$t_type) -Dtype=$(BIN_$t_type) -DType=$(BIN_$t_Type) $(BIN_$t_ARGS) \
148+
-i$(SCOPED_MEMORY_ACCESS_BIN_TEMPLATE) -o$(SCOPED_MEMORY_ACCESS_DEST) ;)
149+
$(PRINTF) "}\n" >> $(SCOPED_MEMORY_ACCESS_DEST)
150+
151+
TARGETS += $(SCOPED_MEMORY_ACCESS_DEST)

make/modules/java.desktop/lib/Awt2dLibraries.gmk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ endif
435435
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
436436
LIBHARFBUZZ_LIBS := $(HARFBUZZ_LIBS)
437437
else
438-
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN -DHAVE_ROUND
439438

440439
# This is better than adding EXPORT_ALL_SYMBOLS
441440
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
@@ -493,7 +492,7 @@ else
493492
maybe-uninitialized class-memaccess, \
494493
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
495494
tautological-constant-out-of-range-compare int-to-pointer-cast \
496-
undef missing-field-initializers, \
495+
undef missing-field-initializers range-loop-analysis, \
497496
DISABLED_WARNINGS_microsoft := 4267 4244 4090 4146 4334 4819 4101 4068 4805 4138, \
498497
LDFLAGS := $(LDFLAGS_JDKLIB) \
499498
$(call SET_SHARED_LIBRARY_ORIGIN), \

src/demo/share/java2d/J2DBench/src/j2dbench/tests/cmm/CMMTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,16 @@ public static void init() {
7373
ColorSpace.CS_sRGB,
7474
ColorSpace.CS_GRAY,
7575
ColorSpace.CS_LINEAR_RGB,
76-
ColorSpace.CS_CIEXYZ
76+
ColorSpace.CS_CIEXYZ,
77+
ColorSpace.CS_PYCC
7778
};
7879

7980
String[] csNames = new String[]{
8081
"CS_sRGB",
8182
"CS_GRAY",
8283
"CS_LINEAR_RGB",
83-
"CS_CIEXYZ"
84+
"CS_CIEXYZ",
85+
"CS_PYCC"
8486
};
8587

8688
csList = new Option.IntList(cmmOptRoot,

0 commit comments

Comments
 (0)