Merge
This commit is contained in:
commit
4ba170ec9c
1
.hgtags
1
.hgtags
@ -228,3 +228,4 @@ bbe43d712fe08e650808d774861b256ccb34e500 jdk8-b102
|
||||
b5ed503c26ad38869c247c5e32debec217fd056b jdk8-b104
|
||||
589f4fdc584e373a47cde0162e9eceec9165c381 jdk8-b105
|
||||
514b0b69fb9683ef52062fd962a3e0644431f64d jdk8-b106
|
||||
892889f445755790ae90e61775bfb59ddc6182b5 jdk8-b107
|
||||
|
@ -228,3 +228,4 @@ b7e64be81c8a7690703df5711f4fc2375da8a9cb jdk8-b103
|
||||
96c1b9b7524b52c3fcefc90ffad4c767396727c8 jdk8-b104
|
||||
5166118c59178b5d31001bc4058e92486ee07d9b jdk8-b105
|
||||
8e7b4d9fb00fdf1334376aeac050c9bca6d1b383 jdk8-b106
|
||||
0874bb4707b723d5bb108d379c557cf41529d1a7 jdk8-b107
|
||||
|
12
Makefile
12
Makefile
@ -404,7 +404,6 @@ COMPILER_PATH.desc = Compiler install directory
|
||||
CACERTS_FILE.desc = Location of certificates file
|
||||
DEVTOOLS_PATH.desc = Directory containing zip and gnumake
|
||||
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
|
||||
DXSDK_PATH.desc = Root directory of DirectX SDK
|
||||
|
||||
# Make variables to print out (description and value)
|
||||
VARIABLE_PRINTVAL_LIST += \
|
||||
@ -429,17 +428,6 @@ VARIABLE_CHECKDIR_LIST += \
|
||||
VARIABLE_CHECKFIL_LIST += \
|
||||
CACERTS_FILE
|
||||
|
||||
# Some are windows specific
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
||||
VARIABLE_PRINTVAL_LIST += \
|
||||
DXSDK_PATH
|
||||
|
||||
VARIABLE_CHECKDIR_LIST += \
|
||||
DXSDK_PATH
|
||||
|
||||
endif
|
||||
|
||||
# For pattern rules below, so all are treated the same
|
||||
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
|
||||
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
|
||||
|
@ -444,10 +444,6 @@
|
||||
Install
|
||||
<a href="#vs2010">Visual Studio 2010</a>
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#dxsdk">Microsoft DirectX SDK</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
@ -971,25 +967,6 @@
|
||||
developer install location
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>--with-dxsdk=</code></b><i>path</i></td>
|
||||
<td>
|
||||
select location of the Windows Direct X SDK install
|
||||
<br>
|
||||
The <a name="dxsdk">Microsoft DirectX 9.0 SDK</a>
|
||||
header files and libraries
|
||||
from the Summer 2004 edition
|
||||
are required for building OpenJDK.
|
||||
This SDK can be downloaded from
|
||||
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en" target="_blank">
|
||||
Microsoft DirectX 9.0 SDK (Summer 2004)</a>.
|
||||
If the link above becomes obsolete, the SDK can be found from
|
||||
<a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a>
|
||||
(search with "DirectX 9.0 SDK Update Summer 2004").
|
||||
Installation usually will set the environment variable
|
||||
<code>DXSDK_DIR</code> to it's install location.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>--with-freetype=</code></b><i>path</i></td>
|
||||
<td>
|
||||
|
@ -203,6 +203,15 @@ AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
fi
|
||||
])
|
||||
|
||||
# Register a --with argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --with-
|
||||
AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
|
||||
[
|
||||
AC_ARG_WITH($1, [AS_HELP_STRING([--with-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])],
|
||||
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
|
@ -211,7 +211,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
|
@ -26,10 +26,10 @@
|
||||
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2008-01-23'
|
||||
timestamp='2012-02-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -42,9 +42,7 @@ timestamp='2008-01-23'
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -52,16 +50,16 @@ timestamp='2008-01-23'
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit build system type.
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
@ -81,8 +79,9 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -169,7 +168,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
@ -195,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
| grep -q __ELF__
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
@ -205,7 +204,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
os=netbsd
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
@ -248,7 +247,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
;;
|
||||
*5.*)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
;;
|
||||
esac
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
@ -294,7 +293,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit ;;
|
||||
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||
exitcode=$?
|
||||
trap '' 0
|
||||
exit $exitcode ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
@ -320,7 +322,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
echo s390-ibm-zvmoe
|
||||
exit ;;
|
||||
*:OS400:*:*)
|
||||
echo powerpc-ibm-os400
|
||||
echo powerpc-ibm-os400
|
||||
exit ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
@ -349,14 +351,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
case `/usr/bin/uname -p` in
|
||||
sparc) echo sparc-icl-nx7; exit ;;
|
||||
esac ;;
|
||||
s390x:SunOS:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
|
||||
echo i386-pc-auroraux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH="i386"
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH="x86_64"
|
||||
fi
|
||||
fi
|
||||
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
@ -400,23 +421,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
exit ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit ;;
|
||||
m68k:machten:*:*)
|
||||
echo m68k-apple-machten${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -486,8 +507,8 @@ EOF
|
||||
echo m88k-motorola-sysv3
|
||||
exit ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
@ -500,7 +521,7 @@ EOF
|
||||
else
|
||||
echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit ;;
|
||||
@ -557,7 +578,7 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[456])
|
||||
*:AIX:*:[4567])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
@ -600,52 +621,52 @@ EOF
|
||||
9000/[678][0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
@ -665,7 +686,7 @@ EOF
|
||||
# => hppa64-hp-hpux11.23
|
||||
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||
grep __LP64__ >/dev/null
|
||||
grep -q __LP64__
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
@ -736,22 +757,22 @@ EOF
|
||||
exit ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
exit ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit ;;
|
||||
@ -775,14 +796,14 @@ EOF
|
||||
exit ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
@ -794,13 +815,12 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case ${UNAME_PROCESSOR} in
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
@ -809,19 +829,22 @@ EOF
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
exit ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
*:Interix*:[3456]*)
|
||||
case ${UNAME_MACHINE} in
|
||||
*:Interix*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T | authenticamd)
|
||||
authenticamd | genuineintel | EM64T)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
IA64)
|
||||
@ -831,6 +854,9 @@ EOF
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit ;;
|
||||
8664:Windows_NT:*)
|
||||
echo x86_64-pc-mks
|
||||
exit ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@ -860,92 +886,13 @@ EOF
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo crisv32-axis-linux-gnu
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo frv-unknown-linux-gnu
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
mips:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
@ -955,11 +902,90 @@ EOF
|
||||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef ${UNAME_MACHINE}
|
||||
#undef ${UNAME_MACHINE}el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=${UNAME_MACHINE}el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=${UNAME_MACHINE}
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
@ -968,14 +994,17 @@ EOF
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
esac
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
@ -983,78 +1012,18 @@ EOF
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_targets" in
|
||||
elf32-i386)
|
||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||
;;
|
||||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit ;;
|
||||
"")
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or
|
||||
# one that does not give us useful --help.
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
|
||||
exit ;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^LIBC/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${LIBC}" != x && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
}
|
||||
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
# earlier versions are messed up and put the nodename in both
|
||||
@ -1062,11 +1031,11 @@ EOF
|
||||
echo i386-sequent-sysv4
|
||||
exit ;;
|
||||
i*86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit ;;
|
||||
i*86:OS/2:*:*)
|
||||
@ -1083,7 +1052,7 @@ EOF
|
||||
i*86:syllable:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-syllable
|
||||
exit ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit ;;
|
||||
i*86:*DOS:*:*)
|
||||
@ -1098,7 +1067,7 @@ EOF
|
||||
fi
|
||||
exit ;;
|
||||
i*86:*:5:[678]*)
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||
case `/bin/uname -X | grep "^Machine"` in
|
||||
*486*) UNAME_MACHINE=i486 ;;
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
@ -1126,10 +1095,13 @@ EOF
|
||||
exit ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit ;;
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit ;;
|
||||
@ -1164,8 +1136,18 @@ EOF
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||
OS_REL='.3'
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
|
||||
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -1178,7 +1160,7 @@ EOF
|
||||
rs6000:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit ;;
|
||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
|
||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
|
||||
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
@ -1198,10 +1180,10 @@ EOF
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
@ -1227,11 +1209,11 @@ EOF
|
||||
exit ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit ;;
|
||||
exit ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit ;;
|
||||
@ -1241,6 +1223,9 @@ EOF
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit ;;
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -1267,12 +1252,17 @@ EOF
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
eval $set_cc_for_build
|
||||
echo "int main(){}" > $dummy.c
|
||||
if test "`$CC_FOR_BUILD -o $dummy $dummy.c; file $dummy | grep -c x86_64`" = 1 ; then
|
||||
UNAME_PROCESSOR=x86_64
|
||||
fi
|
||||
case $UNAME_PROCESSOR in
|
||||
i386)
|
||||
eval $set_cc_for_build
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR="x86_64"
|
||||
fi
|
||||
fi ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
@ -1288,6 +1278,9 @@ EOF
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit ;;
|
||||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@ -1333,13 +1326,13 @@ EOF
|
||||
echo pdp10-unknown-its
|
||||
exit ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:DragonFly:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit ;;
|
||||
*:*VMS:*:*)
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
case "${UNAME_MACHINE}" in
|
||||
A*) echo alpha-dec-vms ; exit ;;
|
||||
I*) echo ia64-dec-vms ; exit ;;
|
||||
@ -1354,6 +1347,12 @@ EOF
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
exit ;;
|
||||
i*86:AROS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-aros
|
||||
exit ;;
|
||||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@ -1376,11 +1375,11 @@ main ()
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
5
common/autoconf/configure
vendored
5
common/autoconf/configure
vendored
@ -219,9 +219,4 @@ else
|
||||
echo configure exiting with result code $conf_result_code
|
||||
fi
|
||||
|
||||
# Move the log file to the output root, if this was successfully created
|
||||
if test -d "$OUTPUT_ROOT"; then
|
||||
mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
|
||||
fi
|
||||
|
||||
exit $conf_result_code
|
||||
|
@ -232,9 +232,15 @@ CUSTOM_LATE_HOOK
|
||||
# We're messing a bit with internal autoconf variables to put the config.status
|
||||
# in the output directory instead of the current directory.
|
||||
CONFIG_STATUS="$OUTPUT_ROOT/config.status"
|
||||
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
AC_OUTPUT
|
||||
|
||||
# Try to move the config.log file to the output directory.
|
||||
if test -e ./config.log; then
|
||||
$MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUT_ROOT/compare.sh
|
||||
|
||||
|
@ -709,7 +709,6 @@ STATIC_LIBRARY
|
||||
SHARED_LIBRARY
|
||||
OBJ_SUFFIX
|
||||
COMPILER_NAME
|
||||
TARGET_BITS_FLAG
|
||||
JT_HOME
|
||||
JTREGEXE
|
||||
LIPO
|
||||
@ -766,8 +765,6 @@ BUILD_LD
|
||||
BUILD_CXX
|
||||
BUILD_CC
|
||||
MSVCR_DLL
|
||||
DXSDK_INCLUDE_PATH
|
||||
DXSDK_LIB_PATH
|
||||
VS_PATH
|
||||
VS_LIB
|
||||
VS_INCLUDE
|
||||
@ -1031,6 +1028,7 @@ with_override_corba
|
||||
with_override_jaxp
|
||||
with_override_jaxws
|
||||
with_override_hotspot
|
||||
with_override_nashorn
|
||||
with_override_jdk
|
||||
with_import_hotspot
|
||||
with_msvcr_dll
|
||||
@ -1784,17 +1782,19 @@ Optional Packages:
|
||||
--with-override-jaxp use this jaxp dir for the build
|
||||
--with-override-jaxws use this jaxws dir for the build
|
||||
--with-override-hotspot use this hotspot dir for the build
|
||||
--with-override-nashorn use this nashorn dir for the build
|
||||
--with-override-jdk use this jdk dir for the build
|
||||
--with-import-hotspot import hotspot binaries from this jdk image or
|
||||
hotspot build dist dir instead of building from
|
||||
source
|
||||
--with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows
|
||||
only) [probed]
|
||||
--with-dxsdk the DirectX SDK (Windows only) [probed]
|
||||
--with-dxsdk-lib the DirectX SDK lib directory (Windows only)
|
||||
[probed]
|
||||
--with-dxsdk-include the DirectX SDK include directory (Windows only)
|
||||
[probed]
|
||||
--with-dxsdk Deprecated. Option is kept for backwards
|
||||
compatibility and is ignored
|
||||
--with-dxsdk-lib Deprecated. Option is kept for backwards
|
||||
compatibility and is ignored
|
||||
--with-dxsdk-include Deprecated. Option is kept for backwards
|
||||
compatibility and is ignored
|
||||
--with-jtreg Regression Test Harness [probed]
|
||||
--with-extra-cflags extra flags to be used when compiling jdk c-files
|
||||
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
|
||||
@ -3144,6 +3144,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
# Register a --with argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --with-
|
||||
|
||||
|
||||
|
||||
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
@ -3805,10 +3809,6 @@ fi
|
||||
|
||||
|
||||
|
||||
# Setup the DXSDK paths
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3818,7 +3818,7 @@ fi
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1378914658
|
||||
DATE_WHEN_GENERATED=1379504921
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -8352,7 +8352,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -8709,7 +8709,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -9063,7 +9063,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -9422,7 +9422,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -9775,7 +9775,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -11075,7 +11075,7 @@ elif test "x$with_user_release_suffix" != x; then
|
||||
else
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
|
||||
@ -16102,6 +16102,10 @@ if test "x$with_add_source_root" != x; then
|
||||
test -f $with_add_source_root/hotspot/make/Makefile; then
|
||||
as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
|
||||
fi
|
||||
if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/nashorn/make/Makefile; then
|
||||
as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
|
||||
fi
|
||||
if test -f $with_add_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/jdk/make/Makefile; then
|
||||
as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
|
||||
@ -16137,6 +16141,10 @@ if test "x$with_override_source_root" != x; then
|
||||
test -f $with_override_source_root/hotspot/make/Makefile; then
|
||||
as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
|
||||
fi
|
||||
if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/nashorn/make/Makefile; then
|
||||
as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
|
||||
fi
|
||||
if test -f $with_override_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/jdk/make/Makefile; then
|
||||
as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
|
||||
@ -16199,6 +16207,13 @@ fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-override-nashorn was given.
|
||||
if test "${with_override_nashorn+set}" = set; then :
|
||||
withval=$with_override_nashorn;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-override-jdk was given.
|
||||
if test "${with_override_jdk+set}" = set; then :
|
||||
withval=$with_override_jdk;
|
||||
@ -16276,7 +16291,7 @@ if test "x$with_override_nashorn" != x; then
|
||||
cd "$with_override_nashorn"
|
||||
NASHORN_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
|
||||
if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
|
||||
as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
|
||||
@ -17086,7 +17101,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -17586,437 +17601,29 @@ $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid
|
||||
|
||||
# Check whether --with-dxsdk was given.
|
||||
if test "${with_dxsdk+set}" = set; then :
|
||||
withval=$with_dxsdk;
|
||||
withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
|
||||
$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-dxsdk-lib was given.
|
||||
if test "${with_dxsdk_lib+set}" = set; then :
|
||||
withval=$with_dxsdk_lib;
|
||||
withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
|
||||
$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-dxsdk-include was given.
|
||||
if test "${with_dxsdk_include+set}" = set; then :
|
||||
withval=$with_dxsdk_include;
|
||||
withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
|
||||
$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
|
||||
$as_echo_n "checking for DirectX SDK... " >&6; }
|
||||
|
||||
if test "x$with_dxsdk" != x; then
|
||||
dxsdk_path="$with_dxsdk"
|
||||
elif test "x$DXSDK_DIR" != x; then
|
||||
dxsdk_path="$DXSDK_DIR"
|
||||
elif test -d "C:/DXSDK"; then
|
||||
dxsdk_path="C:/DXSDK"
|
||||
else
|
||||
as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
|
||||
$as_echo "$dxsdk_path" >&6; }
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="$dxsdk_path"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
|
||||
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
|
||||
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
|
||||
# Going to short mode and back again did indeed matter. Since short mode is
|
||||
# case insensitive, let's make it lowercase to improve readability.
|
||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Now convert it back to Unix-stile (cygpath)
|
||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||
new_path="$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
# As a simple fix, exclude /usr/bin since it's not a real path.
|
||||
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
|
||||
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
|
||||
# a path prefixed by /cygdrive for fixpath to work.
|
||||
new_path="$CYGWIN_ROOT_PATH$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
dxsdk_path="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
|
||||
path="$dxsdk_path"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
new_path="$path"
|
||||
if test "x$has_colon" = x; then
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
|
||||
|
||||
windows_path="$new_path"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
unix_path=`$CYGPATH -u "$windows_path"`
|
||||
new_path="$unix_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
|
||||
new_path="$unix_path"
|
||||
fi
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
dxsdk_path="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
|
||||
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
path="$dxsdk_path"
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Use eval to expand a potential ~
|
||||
eval path="$path"
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
|
||||
fi
|
||||
|
||||
dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
|
||||
$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
|
||||
if test "x$with_dxsdk_lib" != x; then
|
||||
DXSDK_LIB_PATH="$with_dxsdk_lib"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||
DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
|
||||
else
|
||||
DXSDK_LIB_PATH="$dxsdk_path/Lib"
|
||||
fi
|
||||
# dsound.lib is linked to in jsoundds
|
||||
if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
|
||||
as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
|
||||
$as_echo "$DXSDK_LIB_PATH" >&6; }
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="$DXSDK_LIB_PATH"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
|
||||
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
|
||||
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
|
||||
# Going to short mode and back again did indeed matter. Since short mode is
|
||||
# case insensitive, let's make it lowercase to improve readability.
|
||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Now convert it back to Unix-stile (cygpath)
|
||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||
new_path="$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
# As a simple fix, exclude /usr/bin since it's not a real path.
|
||||
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
|
||||
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
|
||||
# a path prefixed by /cygdrive for fixpath to work.
|
||||
new_path="$CYGWIN_ROOT_PATH$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
DXSDK_LIB_PATH="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
|
||||
path="$DXSDK_LIB_PATH"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
new_path="$path"
|
||||
if test "x$has_colon" = x; then
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
|
||||
|
||||
windows_path="$new_path"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
unix_path=`$CYGPATH -u "$windows_path"`
|
||||
new_path="$unix_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
|
||||
new_path="$unix_path"
|
||||
fi
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
DXSDK_LIB_PATH="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
|
||||
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
path="$DXSDK_LIB_PATH"
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Use eval to expand a potential ~
|
||||
eval path="$path"
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
|
||||
fi
|
||||
|
||||
DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
|
||||
$as_echo_n "checking for DirectX SDK include dir... " >&6; }
|
||||
if test "x$with_dxsdk_include" != x; then
|
||||
DXSDK_INCLUDE_PATH="$with_dxsdk_include"
|
||||
else
|
||||
DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
|
||||
fi
|
||||
# dsound.h is included in jsoundds
|
||||
if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
|
||||
as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
|
||||
$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="$DXSDK_INCLUDE_PATH"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
|
||||
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
|
||||
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
|
||||
# Going to short mode and back again did indeed matter. Since short mode is
|
||||
# case insensitive, let's make it lowercase to improve readability.
|
||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Now convert it back to Unix-stile (cygpath)
|
||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||
new_path="$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
# As a simple fix, exclude /usr/bin since it's not a real path.
|
||||
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
|
||||
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
|
||||
# a path prefixed by /cygdrive for fixpath to work.
|
||||
new_path="$CYGWIN_ROOT_PATH$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
DXSDK_INCLUDE_PATH="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
|
||||
path="$DXSDK_INCLUDE_PATH"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
new_path="$path"
|
||||
if test "x$has_colon" = x; then
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
|
||||
input_path="$new_path"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use [ and ] instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
|
||||
|
||||
windows_path="$new_path"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
unix_path=`$CYGPATH -u "$windows_path"`
|
||||
new_path="$unix_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
|
||||
new_path="$unix_path"
|
||||
fi
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
DXSDK_INCLUDE_PATH="$new_path"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
|
||||
$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
|
||||
fi
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
|
||||
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
path="$DXSDK_INCLUDE_PATH"
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
|
||||
$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
|
||||
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Use eval to expand a potential ~
|
||||
eval path="$path"
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
|
||||
fi
|
||||
|
||||
DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@ -18140,7 +17747,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -18451,7 +18058,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -18757,7 +18364,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -19350,7 +18957,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -19786,7 +19393,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -20922,7 +20529,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -21358,7 +20965,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -22259,7 +21866,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -22640,7 +22247,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -22987,7 +22594,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -23324,7 +22931,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -23645,7 +23252,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -24020,7 +23627,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -24326,7 +23933,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -24737,7 +24344,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -25137,7 +24744,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -25466,7 +25073,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -25778,7 +25385,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -26084,7 +25691,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -26390,7 +25997,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -26696,7 +26303,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -27055,7 +26662,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -27415,7 +27022,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -27788,7 +27395,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -28159,7 +27766,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -28468,7 +28075,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file presence.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
@ -28830,35 +28437,41 @@ done
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# Always specify -m flags on Solaris
|
||||
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||
# 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=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
|
||||
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
|
||||
|
||||
CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
|
||||
elif test "x$COMPILE_TYPE" = xreduced; then
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# Specify -m if running reduced on other Posix platforms
|
||||
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||
# 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=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
|
||||
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
|
||||
|
||||
CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
|
||||
fi
|
||||
fi
|
||||
@ -33618,6 +33231,7 @@ fi
|
||||
# We're messing a bit with internal autoconf variables to put the config.status
|
||||
# in the output directory instead of the current directory.
|
||||
CONFIG_STATUS="$OUTPUT_ROOT/config.status"
|
||||
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -34899,6 +34513,11 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
# Try to move the config.log file to the output directory.
|
||||
if test -e ./config.log; then
|
||||
$MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUT_ROOT/compare.sh
|
||||
|
||||
|
@ -446,7 +446,7 @@ elif test "x$with_user_release_suffix" != x; then
|
||||
else
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
AC_SUBST(USER_RELEASE_SUFFIX)
|
||||
|
@ -422,18 +422,21 @@ AC_SUBST(OS_VERSION_MICRO)
|
||||
# Add -mX to various FLAGS variables.
|
||||
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
||||
[
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||
AC_SUBST(TARGET_BITS_FLAG)
|
||||
# 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=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
|
||||
CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
|
||||
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
|
@ -101,6 +101,10 @@ if test "x$with_add_source_root" != x; then
|
||||
test -f $with_add_source_root/hotspot/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/nashorn/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
|
||||
fi
|
||||
if test -f $with_add_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_add_source_root/jdk/make/Makefile; then
|
||||
AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
|
||||
@ -136,6 +140,10 @@ if test "x$with_override_source_root" != x; then
|
||||
test -f $with_override_source_root/hotspot/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/nashorn/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
|
||||
fi
|
||||
if test -f $with_override_source_root/jdk/makefiles/Makefile || \
|
||||
test -f $with_override_source_root/jdk/make/Makefile; then
|
||||
AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
|
||||
@ -177,6 +185,9 @@ AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
|
||||
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
|
||||
[use this hotspot dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
|
||||
[use this nashorn dir for the build])])
|
||||
|
||||
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
|
||||
[use this jdk dir for the build])])
|
||||
|
||||
@ -241,7 +252,7 @@ if test "x$with_override_nashorn" != x; then
|
||||
cd "$with_override_nashorn"
|
||||
NASHORN_TOPDIR="`pwd`"
|
||||
cd "$CURDIR"
|
||||
if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
|
||||
if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
|
||||
AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
|
||||
fi
|
||||
AC_MSG_CHECKING([if nashorn should be overridden])
|
||||
|
@ -291,10 +291,6 @@ X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
|
||||
# DirectX SDK
|
||||
DXSDK_LIB_PATH=@DXSDK_LIB_PATH@
|
||||
DXSDK_INCLUDE_PATH=@DXSDK_INCLUDE_PATH@
|
||||
|
||||
# The lowest required version of macosx to enforce compatiblity for
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
|
||||
@ -304,7 +300,6 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
COMPILER_TYPE:=@COMPILER_TYPE@
|
||||
COMPILER_NAME:=@COMPILER_NAME@
|
||||
|
||||
TARGET_BITS_FLAG=@TARGET_BITS_FLAG@
|
||||
COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
|
||||
|
||||
CC_OUT_OPTION:=@CC_OUT_OPTION@
|
||||
|
@ -176,7 +176,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
TOOLCHAIN_SETUP_DXSDK
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
fi
|
||||
|
||||
AC_SUBST(MSVCR_DLL)
|
||||
|
@ -277,61 +277,3 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
AC_MSG_RESULT([$MSVCR_DLL])
|
||||
BASIC_FIXUP_PATH(MSVCR_DLL)
|
||||
])
|
||||
|
||||
|
||||
# Setup the DXSDK paths
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_DXSDK],
|
||||
[
|
||||
AC_ARG_WITH(dxsdk, [AS_HELP_STRING([--with-dxsdk],
|
||||
[the DirectX SDK (Windows only) @<:@probed@:>@])])
|
||||
AC_ARG_WITH(dxsdk-lib, [AS_HELP_STRING([--with-dxsdk-lib],
|
||||
[the DirectX SDK lib directory (Windows only) @<:@probed@:>@])])
|
||||
AC_ARG_WITH(dxsdk-include, [AS_HELP_STRING([--with-dxsdk-include],
|
||||
[the DirectX SDK include directory (Windows only) @<:@probed@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([for DirectX SDK])
|
||||
|
||||
if test "x$with_dxsdk" != x; then
|
||||
dxsdk_path="$with_dxsdk"
|
||||
elif test "x$DXSDK_DIR" != x; then
|
||||
dxsdk_path="$DXSDK_DIR"
|
||||
elif test -d "C:/DXSDK"; then
|
||||
dxsdk_path="C:/DXSDK"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find the DirectX SDK])
|
||||
fi
|
||||
AC_MSG_RESULT([$dxsdk_path])
|
||||
BASIC_FIXUP_PATH(dxsdk_path)
|
||||
|
||||
AC_MSG_CHECKING([for DirectX SDK lib dir])
|
||||
if test "x$with_dxsdk_lib" != x; then
|
||||
DXSDK_LIB_PATH="$with_dxsdk_lib"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||
DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
|
||||
else
|
||||
DXSDK_LIB_PATH="$dxsdk_path/Lib"
|
||||
fi
|
||||
# dsound.lib is linked to in jsoundds
|
||||
if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
|
||||
AC_MSG_ERROR([Invalid DirectX SDK lib dir])
|
||||
fi
|
||||
AC_MSG_RESULT([$DXSDK_LIB_PATH])
|
||||
BASIC_FIXUP_PATH(DXSDK_LIB_PATH)
|
||||
|
||||
AC_MSG_CHECKING([for DirectX SDK include dir])
|
||||
if test "x$with_dxsdk_include" != x; then
|
||||
DXSDK_INCLUDE_PATH="$with_dxsdk_include"
|
||||
else
|
||||
DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
|
||||
fi
|
||||
# dsound.h is included in jsoundds
|
||||
if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
|
||||
AC_MSG_ERROR([Invalid DirectX SDK lib dir])
|
||||
fi
|
||||
AC_MSG_RESULT([$DXSDK_INCLUDE_PATH])
|
||||
BASIC_FIXUP_PATH(DXSDK_INCLUDE_PATH)
|
||||
|
||||
AC_SUBST(DXSDK_LIB_PATH)
|
||||
AC_SUBST(DXSDK_INCLUDE_PATH)
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
|
||||
])
|
||||
|
@ -47,7 +47,7 @@ python=""
|
||||
bpython=""
|
||||
|
||||
if [ "#!" = "$has_hash_bang" ] ; then
|
||||
python="`head -n 1 ${whichhg} | cut -b 3-`"
|
||||
python="`head -n 1 ${whichhg} | cut -b 3- | sed -e 's/^[ \t]*//;s/[ \t]*$//'`"
|
||||
bpython="`basename "$python"`"
|
||||
fi
|
||||
|
||||
|
@ -228,3 +228,4 @@ a013024b07475782f1fa8e196e950b34b4077663 jdk8-b101
|
||||
d411c60a8c2fe8fdc572af907775e90f7eefd513 jdk8-b104
|
||||
4e38de7c767e34104fa147b5b346d9fe6b731279 jdk8-b105
|
||||
2e3a056c84a71eba78945c18b05397858ffd7ad0 jdk8-b106
|
||||
23fc34133152692b725db4bd617b4c8dfd6ccb05 jdk8-b107
|
||||
|
@ -32,6 +32,7 @@ import java.net.SocketException;
|
||||
import java.net.ServerSocket;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.security.PrivilegedAction;
|
||||
|
||||
import com.sun.corba.se.pept.transport.Acceptor;
|
||||
|
||||
@ -44,6 +45,22 @@ public class DefaultSocketFactoryImpl
|
||||
implements ORBSocketFactory
|
||||
{
|
||||
private ORB orb;
|
||||
private static final boolean keepAlive;
|
||||
|
||||
static {
|
||||
keepAlive = java.security.AccessController.doPrivileged(
|
||||
new PrivilegedAction<Boolean>() {
|
||||
@Override
|
||||
public Boolean run () {
|
||||
String value =
|
||||
System.getProperty("com.sun.CORBA.transport.enableTcpKeepAlive");
|
||||
if (value != null)
|
||||
return new Boolean(!"false".equalsIgnoreCase(value));
|
||||
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setORB(ORB orb)
|
||||
{
|
||||
@ -85,6 +102,9 @@ public class DefaultSocketFactoryImpl
|
||||
// Disable Nagle's algorithm (i.e., always send immediately).
|
||||
socket.setTcpNoDelay(true);
|
||||
|
||||
if (keepAlive)
|
||||
socket.setKeepAlive(true);
|
||||
|
||||
return socket;
|
||||
}
|
||||
|
||||
@ -95,6 +115,8 @@ public class DefaultSocketFactoryImpl
|
||||
{
|
||||
// Disable Nagle's algorithm (i.e., always send immediately).
|
||||
socket.setTcpNoDelay(true);
|
||||
if (keepAlive)
|
||||
socket.setKeepAlive(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,3 +375,5 @@ acac3bde66b2c22791c257a8d99611d6d08c6713 jdk8-b105
|
||||
18b4798adbc42c6fa16f5ecb7d5cd3ca130754bf hs25-b48
|
||||
aed585cafc0d9655726af6d1e1081d1c94cb3b5c jdk8-b106
|
||||
50794d8ac11c9579b41dec4de23b808fef9f34a1 hs25-b49
|
||||
5b7f90aab3ad25a25b75b7b2bb18d5ae23d8231c jdk8-b107
|
||||
a09fe9d1e016c285307507a5793bc4fa6215e9c9 hs25-b50
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=49
|
||||
HS_BUILD_NUMBER=50
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -57,6 +57,7 @@ define_pd_global(intx, RegisterCostAreaRatio, 12000);
|
||||
define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1
|
||||
define_pd_global(intx, MinJumpTableSize, 5);
|
||||
|
||||
// Peephole and CISC spilling both break the graph, and so makes the
|
||||
// scheduler sick.
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
// Sets the default values for platform dependent flags used by the server compiler.
|
||||
// (see c2_globals.hpp). Alpha-sorted.
|
||||
|
||||
define_pd_global(bool, BackgroundCompilation, true);
|
||||
define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
@ -52,6 +51,7 @@ define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 3);
|
||||
define_pd_global(intx, FLOATPRESSURE, 6);
|
||||
define_pd_global(intx, FreqInlineSize, 325);
|
||||
define_pd_global(intx, MinJumpTableSize, 10);
|
||||
#ifdef AMD64
|
||||
define_pd_global(intx, INTPRESSURE, 13);
|
||||
define_pd_global(intx, InteriorEntryAlignment, 16);
|
||||
|
@ -24,13 +24,92 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "ci/ciArray.hpp"
|
||||
#include "ci/ciArrayKlass.hpp"
|
||||
#include "ci/ciConstant.hpp"
|
||||
#include "ci/ciKlass.hpp"
|
||||
#include "ci/ciUtilities.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
#include "oops/typeArrayOop.hpp"
|
||||
|
||||
// ciArray
|
||||
//
|
||||
// This class represents an arrayOop in the HotSpot virtual
|
||||
// machine.
|
||||
static BasicType fixup_element_type(BasicType bt) {
|
||||
if (bt == T_ARRAY) return T_OBJECT;
|
||||
if (bt == T_BOOLEAN) return T_BYTE;
|
||||
return bt;
|
||||
}
|
||||
|
||||
ciConstant ciArray::element_value_impl(BasicType elembt,
|
||||
arrayOop ary,
|
||||
int index) {
|
||||
if (ary == NULL)
|
||||
return ciConstant();
|
||||
assert(ary->is_array(), "");
|
||||
if (index < 0 || index >= ary->length())
|
||||
return ciConstant();
|
||||
ArrayKlass* ak = (ArrayKlass*) ary->klass();
|
||||
BasicType abt = ak->element_type();
|
||||
if (fixup_element_type(elembt) !=
|
||||
fixup_element_type(abt))
|
||||
return ciConstant();
|
||||
switch (elembt) {
|
||||
case T_ARRAY:
|
||||
case T_OBJECT:
|
||||
{
|
||||
assert(ary->is_objArray(), "");
|
||||
objArrayOop objary = (objArrayOop) ary;
|
||||
oop elem = objary->obj_at(index);
|
||||
ciEnv* env = CURRENT_ENV;
|
||||
ciObject* box = env->get_object(elem);
|
||||
return ciConstant(T_OBJECT, box);
|
||||
}
|
||||
}
|
||||
assert(ary->is_typeArray(), "");
|
||||
typeArrayOop tary = (typeArrayOop) ary;
|
||||
jint value = 0;
|
||||
switch (elembt) {
|
||||
case T_LONG: return ciConstant(tary->long_at(index));
|
||||
case T_FLOAT: return ciConstant(tary->float_at(index));
|
||||
case T_DOUBLE: return ciConstant(tary->double_at(index));
|
||||
default: return ciConstant();
|
||||
case T_BYTE: value = tary->byte_at(index); break;
|
||||
case T_BOOLEAN: value = tary->byte_at(index) & 1; break;
|
||||
case T_SHORT: value = tary->short_at(index); break;
|
||||
case T_CHAR: value = tary->char_at(index); break;
|
||||
case T_INT: value = tary->int_at(index); break;
|
||||
}
|
||||
return ciConstant(elembt, value);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciArray::element_value
|
||||
//
|
||||
// Current value of an element.
|
||||
// Returns T_ILLEGAL if there is no element at the given index.
|
||||
ciConstant ciArray::element_value(int index) {
|
||||
BasicType elembt = element_basic_type();
|
||||
GUARDED_VM_ENTRY(
|
||||
return element_value_impl(elembt, get_arrayOop(), index);
|
||||
)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciArray::element_value_by_offset
|
||||
//
|
||||
// Current value of an element at the specified offset.
|
||||
// Returns T_ILLEGAL if there is no element at the given offset.
|
||||
ciConstant ciArray::element_value_by_offset(intptr_t element_offset) {
|
||||
BasicType elembt = element_basic_type();
|
||||
intptr_t shift = exact_log2(type2aelembytes(elembt));
|
||||
intptr_t header = arrayOopDesc::base_offset_in_bytes(elembt);
|
||||
intptr_t index = (element_offset - header) >> shift;
|
||||
intptr_t offset = header + ((intptr_t)index << shift);
|
||||
if (offset != element_offset || index != (jint)index)
|
||||
return ciConstant();
|
||||
return element_value((jint) index);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciArray::print_impl
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef SHARE_VM_CI_CIARRAY_HPP
|
||||
#define SHARE_VM_CI_CIARRAY_HPP
|
||||
|
||||
#include "ci/ciArrayKlass.hpp"
|
||||
#include "ci/ciConstant.hpp"
|
||||
#include "ci/ciObject.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
@ -45,15 +47,30 @@ protected:
|
||||
|
||||
ciArray(ciKlass* klass, int len) : ciObject(klass), _length(len) {}
|
||||
|
||||
arrayOop get_arrayOop() { return (arrayOop)get_oop(); }
|
||||
arrayOop get_arrayOop() const { return (arrayOop)get_oop(); }
|
||||
|
||||
const char* type_string() { return "ciArray"; }
|
||||
|
||||
void print_impl(outputStream* st);
|
||||
|
||||
ciConstant element_value_impl(BasicType elembt, arrayOop ary, int index);
|
||||
|
||||
public:
|
||||
int length() { return _length; }
|
||||
|
||||
// Convenience routines.
|
||||
ciArrayKlass* array_type() { return klass()->as_array_klass(); }
|
||||
ciType* element_type() { return array_type()->element_type(); }
|
||||
BasicType element_basic_type() { return element_type()->basic_type(); }
|
||||
|
||||
// Current value of an element.
|
||||
// Returns T_ILLEGAL if there is no element at the given index.
|
||||
ciConstant element_value(int index);
|
||||
|
||||
// Current value of an element at the specified offset.
|
||||
// Returns T_ILLEGAL if there is no element at the given offset.
|
||||
ciConstant element_value_by_offset(intptr_t element_offset);
|
||||
|
||||
// What kind of ciObject is this?
|
||||
bool is_array() { return true; }
|
||||
bool is_java_object() { return true; }
|
||||
|
@ -41,7 +41,6 @@ private:
|
||||
union {
|
||||
jint _int;
|
||||
jlong _long;
|
||||
jint _long_half[2];
|
||||
jfloat _float;
|
||||
jdouble _double;
|
||||
ciObject* _object;
|
||||
@ -111,6 +110,20 @@ public:
|
||||
return _value._object;
|
||||
}
|
||||
|
||||
bool is_null_or_zero() const {
|
||||
if (!is_java_primitive(basic_type())) {
|
||||
return as_object()->is_null_object();
|
||||
} else if (type2size[basic_type()] == 1) {
|
||||
// treat float bits as int, to avoid comparison with -0 and NaN
|
||||
return (_value._int == 0);
|
||||
} else if (type2size[basic_type()] == 2) {
|
||||
// treat double bits as long, to avoid comparison with -0 and NaN
|
||||
return (_value._long == 0);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Debugging output
|
||||
void print();
|
||||
};
|
||||
|
@ -189,12 +189,14 @@ void ciField::initialize_from(fieldDescriptor* fd) {
|
||||
_holder = CURRENT_ENV->get_instance_klass(fd->field_holder());
|
||||
|
||||
// Check to see if the field is constant.
|
||||
if (_holder->is_initialized() && this->is_final()) {
|
||||
bool is_final = this->is_final();
|
||||
bool is_stable = FoldStableValues && this->is_stable();
|
||||
if (_holder->is_initialized() && (is_final || is_stable)) {
|
||||
if (!this->is_static()) {
|
||||
// A field can be constant if it's a final static field or if
|
||||
// it's a final non-static field of a trusted class (classes in
|
||||
// java.lang.invoke and sun.invoke packages and subpackages).
|
||||
if (trust_final_non_static_fields(_holder)) {
|
||||
if (is_stable || trust_final_non_static_fields(_holder)) {
|
||||
_is_constant = true;
|
||||
return;
|
||||
}
|
||||
@ -227,7 +229,6 @@ void ciField::initialize_from(fieldDescriptor* fd) {
|
||||
|
||||
Handle mirror = k->java_mirror();
|
||||
|
||||
_is_constant = true;
|
||||
switch(type()->basic_type()) {
|
||||
case T_BYTE:
|
||||
_constant_value = ciConstant(type()->basic_type(), mirror->byte_field(_offset));
|
||||
@ -273,6 +274,12 @@ void ciField::initialize_from(fieldDescriptor* fd) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_stable && _constant_value.is_null_or_zero()) {
|
||||
// It is not a constant after all; treat it as uninitialized.
|
||||
_is_constant = false;
|
||||
} else {
|
||||
_is_constant = true;
|
||||
}
|
||||
} else {
|
||||
_is_constant = false;
|
||||
}
|
||||
@ -373,8 +380,11 @@ void ciField::print() {
|
||||
tty->print(" signature=");
|
||||
_signature->print_symbol();
|
||||
tty->print(" offset=%d type=", _offset);
|
||||
if (_type != NULL) _type->print_name();
|
||||
else tty->print("(reference)");
|
||||
if (_type != NULL)
|
||||
_type->print_name();
|
||||
else
|
||||
tty->print("(reference)");
|
||||
tty->print(" flags=%04x", flags().as_int());
|
||||
tty->print(" is_constant=%s", bool_to_str(_is_constant));
|
||||
if (_is_constant && is_static()) {
|
||||
tty->print(" constant_value=");
|
||||
|
@ -139,7 +139,10 @@ public:
|
||||
// non-constant fields. These are java.lang.System.in
|
||||
// and java.lang.System.out. Abomination.
|
||||
//
|
||||
// Note: the check for case 4 is not yet implemented.
|
||||
// A field is also considered constant if it is marked @Stable
|
||||
// and is non-null (or non-zero, if a primitive).
|
||||
// For non-static fields, the null/zero check must be
|
||||
// arranged by the user, as constant_value().is_null_or_zero().
|
||||
bool is_constant() { return _is_constant; }
|
||||
|
||||
// Get the constant value of this field.
|
||||
@ -173,6 +176,7 @@ public:
|
||||
bool is_protected () { return flags().is_protected(); }
|
||||
bool is_static () { return flags().is_static(); }
|
||||
bool is_final () { return flags().is_final(); }
|
||||
bool is_stable () { return flags().is_stable(); }
|
||||
bool is_volatile () { return flags().is_volatile(); }
|
||||
bool is_transient () { return flags().is_transient(); }
|
||||
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; }
|
||||
bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; }
|
||||
bool is_strict () const { return (_flags & JVM_ACC_STRICT ) != 0; }
|
||||
bool is_stable () const { return (_flags & JVM_ACC_FIELD_STABLE) != 0; }
|
||||
|
||||
// Conversion
|
||||
jint as_int() { return _flags; }
|
||||
|
@ -127,6 +127,8 @@ ciConstant ciInstance::field_value(ciField* field) {
|
||||
ciConstant ciInstance::field_value_by_offset(int field_offset) {
|
||||
ciInstanceKlass* ik = klass()->as_instance_klass();
|
||||
ciField* field = ik->get_field_by_offset(field_offset, false);
|
||||
if (field == NULL)
|
||||
return ciConstant(); // T_ILLEGAL
|
||||
return field_value(field);
|
||||
}
|
||||
|
||||
|
@ -39,5 +39,10 @@
|
||||
jchar ciTypeArray::char_at(int index) {
|
||||
VM_ENTRY_MARK;
|
||||
assert(index >= 0 && index < length(), "out of range");
|
||||
return get_typeArrayOop()->char_at(index);
|
||||
jchar c = get_typeArrayOop()->char_at(index);
|
||||
#ifdef ASSERT
|
||||
jchar d = element_value(index).as_char();
|
||||
assert(c == d, "");
|
||||
#endif //ASSERT
|
||||
return c;
|
||||
}
|
||||
|
@ -1774,6 +1774,10 @@ ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_d
|
||||
if (_location != _in_method) break; // only allow for methods
|
||||
if (!privileged) break; // only allow in privileged code
|
||||
return _method_LambdaForm_Hidden;
|
||||
case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_invoke_Stable_signature):
|
||||
if (_location != _in_field) break; // only allow for fields
|
||||
if (!privileged) break; // only allow in privileged code
|
||||
return _field_Stable;
|
||||
case vmSymbols::VM_SYMBOL_ENUM_NAME(sun_misc_Contended_signature):
|
||||
if (_location != _in_field && _location != _in_class) break; // only allow for fields and classes
|
||||
if (!EnableContended || (RestrictContended && !privileged)) break; // honor privileges
|
||||
@ -1786,6 +1790,8 @@ ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_d
|
||||
void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
|
||||
if (is_contended())
|
||||
f->set_contended_group(contended_group());
|
||||
if (is_stable())
|
||||
f->set_stable(true);
|
||||
}
|
||||
|
||||
ClassFileParser::FieldAnnotationCollector::~FieldAnnotationCollector() {
|
||||
|
@ -125,6 +125,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
||||
_method_LambdaForm_Compiled,
|
||||
_method_LambdaForm_Hidden,
|
||||
_sun_misc_Contended,
|
||||
_field_Stable,
|
||||
_annotation_LIMIT
|
||||
};
|
||||
const Location _location;
|
||||
@ -143,14 +144,23 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
||||
assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
|
||||
_annotations_present |= nth_bit((int)id);
|
||||
}
|
||||
|
||||
void remove_annotation(ID id) {
|
||||
assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
|
||||
_annotations_present &= ~nth_bit((int)id);
|
||||
}
|
||||
|
||||
// Report if the annotation is present.
|
||||
bool has_any_annotations() { return _annotations_present != 0; }
|
||||
bool has_annotation(ID id) { return (nth_bit((int)id) & _annotations_present) != 0; }
|
||||
bool has_any_annotations() const { return _annotations_present != 0; }
|
||||
bool has_annotation(ID id) const { return (nth_bit((int)id) & _annotations_present) != 0; }
|
||||
|
||||
void set_contended_group(u2 group) { _contended_group = group; }
|
||||
u2 contended_group() { return _contended_group; }
|
||||
u2 contended_group() const { return _contended_group; }
|
||||
|
||||
bool is_contended() { return has_annotation(_sun_misc_Contended); }
|
||||
bool is_contended() const { return has_annotation(_sun_misc_Contended); }
|
||||
|
||||
void set_stable(bool stable) { set_annotation(_field_Stable); }
|
||||
bool is_stable() const { return has_annotation(_field_Stable); }
|
||||
};
|
||||
|
||||
// This class also doubles as a holder for metadata cleanup.
|
||||
|
@ -270,6 +270,7 @@
|
||||
template(java_lang_invoke_LambdaForm, "java/lang/invoke/LambdaForm") \
|
||||
template(java_lang_invoke_ForceInline_signature, "Ljava/lang/invoke/ForceInline;") \
|
||||
template(java_lang_invoke_DontInline_signature, "Ljava/lang/invoke/DontInline;") \
|
||||
template(sun_invoke_Stable_signature, "Lsun/invoke/Stable;") \
|
||||
template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
|
||||
template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;") \
|
||||
template(java_lang_invoke_MagicLambdaImpl, "java/lang/invoke/MagicLambdaImpl") \
|
||||
|
@ -240,6 +240,14 @@ class FieldInfo VALUE_OBJ_CLASS_SPEC {
|
||||
return (access_flags() & JVM_ACC_FIELD_INTERNAL) != 0;
|
||||
}
|
||||
|
||||
bool is_stable() const {
|
||||
return (access_flags() & JVM_ACC_FIELD_STABLE) != 0;
|
||||
}
|
||||
void set_stable(bool z) {
|
||||
if (z) _shorts[access_flags_offset] |= JVM_ACC_FIELD_STABLE;
|
||||
else _shorts[access_flags_offset] &= ~JVM_ACC_FIELD_STABLE;
|
||||
}
|
||||
|
||||
Symbol* lookup_symbol(int symbol_index) const {
|
||||
assert(is_internal(), "only internal fields");
|
||||
return vmSymbols::symbol_at((vmSymbols::SID)symbol_index);
|
||||
|
@ -421,7 +421,7 @@
|
||||
product(bool, UseDivMod, true, \
|
||||
"Use combined DivMod instruction if available") \
|
||||
\
|
||||
product(intx, MinJumpTableSize, 18, \
|
||||
product_pd(intx, MinJumpTableSize, \
|
||||
"Minimum number of targets in a generated jump table") \
|
||||
\
|
||||
product(intx, MaxJumpTableSize, 65000, \
|
||||
@ -448,6 +448,9 @@
|
||||
product(bool, EliminateAutoBox, true, \
|
||||
"Control optimizations for autobox elimination") \
|
||||
\
|
||||
experimental(bool, UseImplicitStableValues, false, \
|
||||
"Mark well-known stable fields as such (e.g. String.value)") \
|
||||
\
|
||||
product(intx, AutoBoxCacheMax, 128, \
|
||||
"Sets max value cached by the java.lang.Integer autobox cache") \
|
||||
\
|
||||
|
@ -1297,6 +1297,10 @@ const TypePtr *Compile::flatten_alias_type( const TypePtr *tj ) const {
|
||||
|
||||
// Array pointers need some flattening
|
||||
const TypeAryPtr *ta = tj->isa_aryptr();
|
||||
if (ta && ta->is_stable()) {
|
||||
// Erase stability property for alias analysis.
|
||||
tj = ta = ta->cast_to_stable(false);
|
||||
}
|
||||
if( ta && is_known_inst ) {
|
||||
if ( offset != Type::OffsetBot &&
|
||||
offset > arrayOopDesc::length_offset_in_bytes() ) {
|
||||
@ -1497,6 +1501,7 @@ void Compile::AliasType::Init(int i, const TypePtr* at) {
|
||||
_index = i;
|
||||
_adr_type = at;
|
||||
_field = NULL;
|
||||
_element = NULL;
|
||||
_is_rewritable = true; // default
|
||||
const TypeOopPtr *atoop = (at != NULL) ? at->isa_oopptr() : NULL;
|
||||
if (atoop != NULL && atoop->is_known_instance()) {
|
||||
@ -1615,6 +1620,16 @@ Compile::AliasType* Compile::find_alias_type(const TypePtr* adr_type, bool no_cr
|
||||
&& flat->is_instptr()->klass() == env()->Class_klass())
|
||||
alias_type(idx)->set_rewritable(false);
|
||||
}
|
||||
if (flat->isa_aryptr()) {
|
||||
#ifdef ASSERT
|
||||
const int header_size_min = arrayOopDesc::base_offset_in_bytes(T_BYTE);
|
||||
// (T_BYTE has the weakest alignment and size restrictions...)
|
||||
assert(flat->offset() < header_size_min, "array body reference must be OffsetBot");
|
||||
#endif
|
||||
if (flat->offset() == TypePtr::OffsetBot) {
|
||||
alias_type(idx)->set_element(flat->is_aryptr()->elem());
|
||||
}
|
||||
}
|
||||
if (flat->isa_klassptr()) {
|
||||
if (flat->offset() == in_bytes(Klass::super_check_offset_offset()))
|
||||
alias_type(idx)->set_rewritable(false);
|
||||
@ -1677,7 +1692,7 @@ Compile::AliasType* Compile::alias_type(ciField* field) {
|
||||
else
|
||||
t = TypeOopPtr::make_from_klass_raw(field->holder());
|
||||
AliasType* atp = alias_type(t->add_offset(field->offset_in_bytes()), field);
|
||||
assert(field->is_final() == !atp->is_rewritable(), "must get the rewritable bits correct");
|
||||
assert((field->is_final() || field->is_stable()) == !atp->is_rewritable(), "must get the rewritable bits correct");
|
||||
return atp;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ class Scope;
|
||||
class StartNode;
|
||||
class SafePointNode;
|
||||
class JVMState;
|
||||
class Type;
|
||||
class TypeData;
|
||||
class TypePtr;
|
||||
class TypeOopPtr;
|
||||
@ -119,6 +120,7 @@ class Compile : public Phase {
|
||||
int _index; // unique index, used with MergeMemNode
|
||||
const TypePtr* _adr_type; // normalized address type
|
||||
ciField* _field; // relevant instance field, or null if none
|
||||
const Type* _element; // relevant array element type, or null if none
|
||||
bool _is_rewritable; // false if the memory is write-once only
|
||||
int _general_index; // if this is type is an instance, the general
|
||||
// type that this is an instance of
|
||||
@ -129,6 +131,7 @@ class Compile : public Phase {
|
||||
int index() const { return _index; }
|
||||
const TypePtr* adr_type() const { return _adr_type; }
|
||||
ciField* field() const { return _field; }
|
||||
const Type* element() const { return _element; }
|
||||
bool is_rewritable() const { return _is_rewritable; }
|
||||
bool is_volatile() const { return (_field ? _field->is_volatile() : false); }
|
||||
int general_index() const { return (_general_index != 0) ? _general_index : _index; }
|
||||
@ -137,7 +140,14 @@ class Compile : public Phase {
|
||||
void set_field(ciField* f) {
|
||||
assert(!_field,"");
|
||||
_field = f;
|
||||
if (f->is_final()) _is_rewritable = false;
|
||||
if (f->is_final() || f->is_stable()) {
|
||||
// In the case of @Stable, multiple writes are possible but may be assumed to be no-ops.
|
||||
_is_rewritable = false;
|
||||
}
|
||||
}
|
||||
void set_element(const Type* e) {
|
||||
assert(_element == NULL, "");
|
||||
_element = e;
|
||||
}
|
||||
|
||||
void print_on(outputStream* st) PRODUCT_RETURN;
|
||||
|
@ -3825,8 +3825,13 @@ Node* GraphKit::load_String_value(Node* ctrl, Node* str) {
|
||||
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
|
||||
ciTypeArrayKlass::make(T_CHAR), true, 0);
|
||||
int value_field_idx = C->get_alias_index(value_field_type);
|
||||
return make_load(ctrl, basic_plus_adr(str, str, value_offset),
|
||||
value_type, T_OBJECT, value_field_idx);
|
||||
Node* load = make_load(ctrl, basic_plus_adr(str, str, value_offset),
|
||||
value_type, T_OBJECT, value_field_idx);
|
||||
// String.value field is known to be @Stable.
|
||||
if (UseImplicitStableValues) {
|
||||
load = cast_array_to_stable(load, value_type);
|
||||
}
|
||||
return load;
|
||||
}
|
||||
|
||||
void GraphKit::store_String_offset(Node* ctrl, Node* str, Node* value) {
|
||||
@ -3844,9 +3849,6 @@ void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) {
|
||||
const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
|
||||
false, NULL, 0);
|
||||
const TypePtr* value_field_type = string_type->add_offset(value_offset);
|
||||
const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull,
|
||||
TypeAry::make(TypeInt::CHAR,TypeInt::POS),
|
||||
ciTypeArrayKlass::make(T_CHAR), true, 0);
|
||||
int value_field_idx = C->get_alias_index(value_field_type);
|
||||
store_to_memory(ctrl, basic_plus_adr(str, value_offset),
|
||||
value, T_OBJECT, value_field_idx);
|
||||
@ -3861,3 +3863,9 @@ void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) {
|
||||
store_to_memory(ctrl, basic_plus_adr(str, count_offset),
|
||||
value, T_INT, count_field_idx);
|
||||
}
|
||||
|
||||
Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) {
|
||||
// Reify the property as a CastPP node in Ideal graph to comply with monotonicity
|
||||
// assumption of CCP analysis.
|
||||
return _gvn.transform(new(C) CastPPNode(ary, ary_type->cast_to_stable(true)));
|
||||
}
|
||||
|
@ -836,6 +836,9 @@ class GraphKit : public Phase {
|
||||
// Insert a loop predicate into the graph
|
||||
void add_predicate(int nargs = 0);
|
||||
void add_predicate_impl(Deoptimization::DeoptReason reason, int nargs);
|
||||
|
||||
// Produce new array node of stable type
|
||||
Node* cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type);
|
||||
};
|
||||
|
||||
// Helper class to support building of control flow branches. Upon
|
||||
|
@ -1280,6 +1280,11 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar
|
||||
const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin));
|
||||
const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot);
|
||||
|
||||
// String.value field is known to be @Stable.
|
||||
if (UseImplicitStableValues) {
|
||||
target = cast_array_to_stable(target, target_type);
|
||||
}
|
||||
|
||||
IdealKit kit(this, false, true);
|
||||
#define __ kit.
|
||||
Node* zero = __ ConI(0);
|
||||
|
@ -962,6 +962,19 @@ uint LoadNode::hash() const {
|
||||
return (uintptr_t)in(Control) + (uintptr_t)in(Memory) + (uintptr_t)in(Address);
|
||||
}
|
||||
|
||||
static bool skip_through_membars(Compile::AliasType* atp, const TypeInstPtr* tp, bool eliminate_boxing) {
|
||||
if ((atp != NULL) && (atp->index() >= Compile::AliasIdxRaw)) {
|
||||
bool non_volatile = (atp->field() != NULL) && !atp->field()->is_volatile();
|
||||
bool is_stable_ary = FoldStableValues &&
|
||||
(tp != NULL) && (tp->isa_aryptr() != NULL) &&
|
||||
tp->isa_aryptr()->is_stable();
|
||||
|
||||
return (eliminate_boxing && non_volatile) || is_stable_ary;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------can_see_stored_value------------------------------
|
||||
// This routine exists to make sure this set of tests is done the same
|
||||
// everywhere. We need to make a coordinated change: first LoadNode::Ideal
|
||||
@ -976,11 +989,9 @@ Node* MemNode::can_see_stored_value(Node* st, PhaseTransform* phase) const {
|
||||
const TypeInstPtr* tp = phase->type(ld_adr)->isa_instptr();
|
||||
Compile::AliasType* atp = (tp != NULL) ? phase->C->alias_type(tp) : NULL;
|
||||
// This is more general than load from boxing objects.
|
||||
if (phase->C->eliminate_boxing() && (atp != NULL) &&
|
||||
(atp->index() >= Compile::AliasIdxRaw) &&
|
||||
(atp->field() != NULL) && !atp->field()->is_volatile()) {
|
||||
if (skip_through_membars(atp, tp, phase->C->eliminate_boxing())) {
|
||||
uint alias_idx = atp->index();
|
||||
bool final = atp->field()->is_final();
|
||||
bool final = !atp->is_rewritable();
|
||||
Node* result = NULL;
|
||||
Node* current = st;
|
||||
// Skip through chains of MemBarNodes checking the MergeMems for
|
||||
@ -1015,7 +1026,6 @@ Node* MemNode::can_see_stored_value(Node* st, PhaseTransform* phase) const {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Loop around twice in the case Load -> Initialize -> Store.
|
||||
// (See PhaseIterGVN::add_users_to_worklist, which knows about this case.)
|
||||
for (int trip = 0; trip <= 1; trip++) {
|
||||
@ -1577,6 +1587,40 @@ LoadNode::load_array_final_field(const TypeKlassPtr *tkls,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Try to constant-fold a stable array element.
|
||||
static const Type* fold_stable_ary_elem(const TypeAryPtr* ary, int off, BasicType loadbt) {
|
||||
assert(ary->is_stable(), "array should be stable");
|
||||
|
||||
if (ary->const_oop() != NULL) {
|
||||
// Decode the results of GraphKit::array_element_address.
|
||||
ciArray* aobj = ary->const_oop()->as_array();
|
||||
ciConstant con = aobj->element_value_by_offset(off);
|
||||
|
||||
if (con.basic_type() != T_ILLEGAL && !con.is_null_or_zero()) {
|
||||
const Type* con_type = Type::make_from_constant(con);
|
||||
if (con_type != NULL) {
|
||||
if (con_type->isa_aryptr()) {
|
||||
// Join with the array element type, in case it is also stable.
|
||||
int dim = ary->stable_dimension();
|
||||
con_type = con_type->is_aryptr()->cast_to_stable(true, dim-1);
|
||||
}
|
||||
if (loadbt == T_NARROWOOP && con_type->isa_oopptr()) {
|
||||
con_type = con_type->make_narrowoop();
|
||||
}
|
||||
#ifndef PRODUCT
|
||||
if (TraceIterativeGVN) {
|
||||
tty->print("FoldStableValues: array element [off=%d]: con_type=", off);
|
||||
con_type->dump(); tty->cr();
|
||||
}
|
||||
#endif //PRODUCT
|
||||
return con_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *LoadNode::Value( PhaseTransform *phase ) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
@ -1591,8 +1635,31 @@ const Type *LoadNode::Value( PhaseTransform *phase ) const {
|
||||
Compile* C = phase->C;
|
||||
|
||||
// Try to guess loaded type from pointer type
|
||||
if (tp->base() == Type::AryPtr) {
|
||||
const Type *t = tp->is_aryptr()->elem();
|
||||
if (tp->isa_aryptr()) {
|
||||
const TypeAryPtr* ary = tp->is_aryptr();
|
||||
const Type *t = ary->elem();
|
||||
|
||||
// Determine whether the reference is beyond the header or not, by comparing
|
||||
// the offset against the offset of the start of the array's data.
|
||||
// Different array types begin at slightly different offsets (12 vs. 16).
|
||||
// We choose T_BYTE as an example base type that is least restrictive
|
||||
// as to alignment, which will therefore produce the smallest
|
||||
// possible base offset.
|
||||
const int min_base_off = arrayOopDesc::base_offset_in_bytes(T_BYTE);
|
||||
const bool off_beyond_header = ((uint)off >= (uint)min_base_off);
|
||||
|
||||
// Try to constant-fold a stable array element.
|
||||
if (FoldStableValues && ary->is_stable()) {
|
||||
// Make sure the reference is not into the header
|
||||
if (off_beyond_header && off != Type::OffsetBot) {
|
||||
assert(adr->is_AddP() && adr->in(AddPNode::Offset)->is_Con(), "offset is a constant");
|
||||
const Type* con_type = fold_stable_ary_elem(ary, off, memory_type());
|
||||
if (con_type != NULL) {
|
||||
return con_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't do this for integer types. There is only potential profit if
|
||||
// the element type t is lower than _type; that is, for int types, if _type is
|
||||
// more restrictive than t. This only happens here if one is short and the other
|
||||
@ -1613,14 +1680,7 @@ const Type *LoadNode::Value( PhaseTransform *phase ) const {
|
||||
&& Opcode() != Op_LoadKlass && Opcode() != Op_LoadNKlass) {
|
||||
// t might actually be lower than _type, if _type is a unique
|
||||
// concrete subclass of abstract class t.
|
||||
// Make sure the reference is not into the header, by comparing
|
||||
// the offset against the offset of the start of the array's data.
|
||||
// Different array types begin at slightly different offsets (12 vs. 16).
|
||||
// We choose T_BYTE as an example base type that is least restrictive
|
||||
// as to alignment, which will therefore produce the smallest
|
||||
// possible base offset.
|
||||
const int min_base_off = arrayOopDesc::base_offset_in_bytes(T_BYTE);
|
||||
if ((uint)off >= (uint)min_base_off) { // is the offset beyond the header?
|
||||
if (off_beyond_header) { // is the offset beyond the header?
|
||||
const Type* jt = t->join(_type);
|
||||
// In any case, do not allow the join, per se, to empty out the type.
|
||||
if (jt->empty() && !t->empty()) {
|
||||
|
@ -518,7 +518,7 @@ class Parse : public GraphKit {
|
||||
|
||||
// loading from a constant field or the constant pool
|
||||
// returns false if push failed (non-perm field constants only, not ldcs)
|
||||
bool push_constant(ciConstant con, bool require_constant = false, bool is_autobox_cache = false);
|
||||
bool push_constant(ciConstant con, bool require_constant = false, bool is_autobox_cache = false, const Type* basic_type = NULL);
|
||||
|
||||
// implementation of object creation bytecodes
|
||||
void emit_guard_for_new(ciInstanceKlass* klass);
|
||||
|
@ -147,7 +147,15 @@ void Parse::do_field_access(bool is_get, bool is_field) {
|
||||
void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
// Does this field have a constant value? If so, just push the value.
|
||||
if (field->is_constant()) {
|
||||
// final field
|
||||
// final or stable field
|
||||
const Type* stable_type = NULL;
|
||||
if (FoldStableValues && field->is_stable()) {
|
||||
stable_type = Type::get_const_type(field->type());
|
||||
if (field->type()->is_array_klass()) {
|
||||
int stable_dimension = field->type()->as_array_klass()->dimension();
|
||||
stable_type = stable_type->is_aryptr()->cast_to_stable(true, stable_dimension);
|
||||
}
|
||||
}
|
||||
if (field->is_static()) {
|
||||
// final static field
|
||||
if (C->eliminate_boxing()) {
|
||||
@ -167,11 +175,10 @@ void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (push_constant(field->constant_value()))
|
||||
if (push_constant(field->constant_value(), false, false, stable_type))
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// final non-static field
|
||||
} else {
|
||||
// final or stable non-static field
|
||||
// Treat final non-static fields of trusted classes (classes in
|
||||
// java.lang.invoke and sun.invoke packages and subpackages) as
|
||||
// compile time constants.
|
||||
@ -179,8 +186,12 @@ void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr();
|
||||
ciObject* constant_oop = oop_ptr->const_oop();
|
||||
ciConstant constant = field->constant_value_of(constant_oop);
|
||||
if (push_constant(constant, true))
|
||||
return;
|
||||
if (FoldStableValues && field->is_stable() && constant.is_null_or_zero()) {
|
||||
// fall through to field load; the field is not yet initialized
|
||||
} else {
|
||||
if (push_constant(constant, true, false, stable_type))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -301,7 +312,8 @@ void Parse::do_put_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
// Note the presence of writes to final non-static fields, so that we
|
||||
// can insert a memory barrier later on to keep the writes from floating
|
||||
// out of the constructor.
|
||||
if (is_field && field->is_final()) {
|
||||
// Any method can write a @Stable field; insert memory barriers after those also.
|
||||
if (is_field && (field->is_final() || field->is_stable())) {
|
||||
set_wrote_final(true);
|
||||
// Preserve allocation ptr to create precedent edge to it in membar
|
||||
// generated on exit from constructor.
|
||||
@ -314,35 +326,21 @@ void Parse::do_put_xxx(Node* obj, ciField* field, bool is_field) {
|
||||
}
|
||||
|
||||
|
||||
bool Parse::push_constant(ciConstant constant, bool require_constant, bool is_autobox_cache) {
|
||||
|
||||
bool Parse::push_constant(ciConstant constant, bool require_constant, bool is_autobox_cache, const Type* stable_type) {
|
||||
const Type* con_type = Type::make_from_constant(constant, require_constant, is_autobox_cache);
|
||||
switch (constant.basic_type()) {
|
||||
case T_BOOLEAN: push( intcon(constant.as_boolean()) ); break;
|
||||
case T_INT: push( intcon(constant.as_int()) ); break;
|
||||
case T_CHAR: push( intcon(constant.as_char()) ); break;
|
||||
case T_BYTE: push( intcon(constant.as_byte()) ); break;
|
||||
case T_SHORT: push( intcon(constant.as_short()) ); break;
|
||||
case T_FLOAT: push( makecon(TypeF::make(constant.as_float())) ); break;
|
||||
case T_DOUBLE: push_pair( makecon(TypeD::make(constant.as_double())) ); break;
|
||||
case T_LONG: push_pair( longcon(constant.as_long()) ); break;
|
||||
case T_ARRAY:
|
||||
case T_OBJECT: {
|
||||
case T_OBJECT:
|
||||
// cases:
|
||||
// can_be_constant = (oop not scavengable || ScavengeRootsInCode != 0)
|
||||
// should_be_constant = (oop not scavengable || ScavengeRootsInCode >= 2)
|
||||
// An oop is not scavengable if it is in the perm gen.
|
||||
ciObject* oop_constant = constant.as_object();
|
||||
if (oop_constant->is_null_object()) {
|
||||
push( zerocon(T_OBJECT) );
|
||||
break;
|
||||
} else if (require_constant || oop_constant->should_be_constant()) {
|
||||
push( makecon(TypeOopPtr::make_from_constant(oop_constant, require_constant, is_autobox_cache)) );
|
||||
break;
|
||||
} else {
|
||||
// we cannot inline the oop, but we can use it later to narrow a type
|
||||
return false;
|
||||
}
|
||||
}
|
||||
case T_ILLEGAL: {
|
||||
if (stable_type != NULL && con_type != NULL && con_type->isa_oopptr())
|
||||
con_type = con_type->join(stable_type);
|
||||
break;
|
||||
|
||||
case T_ILLEGAL:
|
||||
// Invalid ciConstant returned due to OutOfMemoryError in the CI
|
||||
assert(C->env()->failing(), "otherwise should not see this");
|
||||
// These always occur because of object types; we are going to
|
||||
@ -350,17 +348,16 @@ bool Parse::push_constant(ciConstant constant, bool require_constant, bool is_au
|
||||
push( zerocon(T_OBJECT) );
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
// success
|
||||
if (con_type == NULL)
|
||||
// we cannot inline the oop, but we can use it later to narrow a type
|
||||
return false;
|
||||
|
||||
push_node(constant.basic_type(), makecon(con_type));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
void Parse::do_anewarray() {
|
||||
bool will_link;
|
||||
|
@ -189,6 +189,38 @@ const Type* Type::get_typeflow_type(ciType* type) {
|
||||
}
|
||||
|
||||
|
||||
//-----------------------make_from_constant------------------------------------
|
||||
const Type* Type::make_from_constant(ciConstant constant,
|
||||
bool require_constant, bool is_autobox_cache) {
|
||||
switch (constant.basic_type()) {
|
||||
case T_BOOLEAN: return TypeInt::make(constant.as_boolean());
|
||||
case T_CHAR: return TypeInt::make(constant.as_char());
|
||||
case T_BYTE: return TypeInt::make(constant.as_byte());
|
||||
case T_SHORT: return TypeInt::make(constant.as_short());
|
||||
case T_INT: return TypeInt::make(constant.as_int());
|
||||
case T_LONG: return TypeLong::make(constant.as_long());
|
||||
case T_FLOAT: return TypeF::make(constant.as_float());
|
||||
case T_DOUBLE: return TypeD::make(constant.as_double());
|
||||
case T_ARRAY:
|
||||
case T_OBJECT:
|
||||
{
|
||||
// cases:
|
||||
// can_be_constant = (oop not scavengable || ScavengeRootsInCode != 0)
|
||||
// should_be_constant = (oop not scavengable || ScavengeRootsInCode >= 2)
|
||||
// An oop is not scavengable if it is in the perm gen.
|
||||
ciObject* oop_constant = constant.as_object();
|
||||
if (oop_constant->is_null_object()) {
|
||||
return Type::get_zero_type(T_OBJECT);
|
||||
} else if (require_constant || oop_constant->should_be_constant()) {
|
||||
return TypeOopPtr::make_from_constant(oop_constant, require_constant, is_autobox_cache);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fall through to failure
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------make-------------------------------------------
|
||||
// Create a simple Type, with default empty symbol sets. Then hashcons it
|
||||
// and look for an existing copy in the type dictionary.
|
||||
@ -1824,12 +1856,12 @@ inline const TypeInt* normalize_array_size(const TypeInt* size) {
|
||||
}
|
||||
|
||||
//------------------------------make-------------------------------------------
|
||||
const TypeAry *TypeAry::make( const Type *elem, const TypeInt *size) {
|
||||
const TypeAry* TypeAry::make(const Type* elem, const TypeInt* size, bool stable) {
|
||||
if (UseCompressedOops && elem->isa_oopptr()) {
|
||||
elem = elem->make_narrowoop();
|
||||
}
|
||||
size = normalize_array_size(size);
|
||||
return (TypeAry*)(new TypeAry(elem,size))->hashcons();
|
||||
return (TypeAry*)(new TypeAry(elem,size,stable))->hashcons();
|
||||
}
|
||||
|
||||
//------------------------------meet-------------------------------------------
|
||||
@ -1850,7 +1882,8 @@ const Type *TypeAry::xmeet( const Type *t ) const {
|
||||
case Array: { // Meeting 2 arrays?
|
||||
const TypeAry *a = t->is_ary();
|
||||
return TypeAry::make(_elem->meet(a->_elem),
|
||||
_size->xmeet(a->_size)->is_int());
|
||||
_size->xmeet(a->_size)->is_int(),
|
||||
_stable & a->_stable);
|
||||
}
|
||||
case Top:
|
||||
break;
|
||||
@ -1863,7 +1896,7 @@ const Type *TypeAry::xmeet( const Type *t ) const {
|
||||
const Type *TypeAry::xdual() const {
|
||||
const TypeInt* size_dual = _size->dual()->is_int();
|
||||
size_dual = normalize_array_size(size_dual);
|
||||
return new TypeAry( _elem->dual(), size_dual);
|
||||
return new TypeAry(_elem->dual(), size_dual, !_stable);
|
||||
}
|
||||
|
||||
//------------------------------eq---------------------------------------------
|
||||
@ -1871,13 +1904,14 @@ const Type *TypeAry::xdual() const {
|
||||
bool TypeAry::eq( const Type *t ) const {
|
||||
const TypeAry *a = (const TypeAry*)t;
|
||||
return _elem == a->_elem &&
|
||||
_stable == a->_stable &&
|
||||
_size == a->_size;
|
||||
}
|
||||
|
||||
//------------------------------hash-------------------------------------------
|
||||
// Type-specific hashing function.
|
||||
int TypeAry::hash(void) const {
|
||||
return (intptr_t)_elem + (intptr_t)_size;
|
||||
return (intptr_t)_elem + (intptr_t)_size + (_stable ? 43 : 0);
|
||||
}
|
||||
|
||||
//----------------------interface_vs_oop---------------------------------------
|
||||
@ -1894,6 +1928,7 @@ bool TypeAry::interface_vs_oop(const Type *t) const {
|
||||
//------------------------------dump2------------------------------------------
|
||||
#ifndef PRODUCT
|
||||
void TypeAry::dump2( Dict &d, uint depth, outputStream *st ) const {
|
||||
if (_stable) st->print("stable:");
|
||||
_elem->dump2(d, depth, st);
|
||||
st->print("[");
|
||||
_size->dump2(d, depth, st);
|
||||
@ -3457,11 +3492,39 @@ const TypeAryPtr* TypeAryPtr::cast_to_size(const TypeInt* new_size) const {
|
||||
assert(new_size != NULL, "");
|
||||
new_size = narrow_size_type(new_size);
|
||||
if (new_size == size()) return this;
|
||||
const TypeAry* new_ary = TypeAry::make(elem(), new_size);
|
||||
const TypeAry* new_ary = TypeAry::make(elem(), new_size, is_stable());
|
||||
return make(ptr(), const_oop(), new_ary, klass(), klass_is_exact(), _offset, _instance_id);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------cast_to_stable---------------------------------
|
||||
const TypeAryPtr* TypeAryPtr::cast_to_stable(bool stable, int stable_dimension) const {
|
||||
if (stable_dimension <= 0 || (stable_dimension == 1 && stable == this->is_stable()))
|
||||
return this;
|
||||
|
||||
const Type* elem = this->elem();
|
||||
const TypePtr* elem_ptr = elem->make_ptr();
|
||||
|
||||
if (stable_dimension > 1 && elem_ptr != NULL && elem_ptr->isa_aryptr()) {
|
||||
// If this is widened from a narrow oop, TypeAry::make will re-narrow it.
|
||||
elem = elem_ptr = elem_ptr->is_aryptr()->cast_to_stable(stable, stable_dimension - 1);
|
||||
}
|
||||
|
||||
const TypeAry* new_ary = TypeAry::make(elem, size(), stable);
|
||||
|
||||
return make(ptr(), const_oop(), new_ary, klass(), klass_is_exact(), _offset, _instance_id);
|
||||
}
|
||||
|
||||
//-----------------------------stable_dimension--------------------------------
|
||||
int TypeAryPtr::stable_dimension() const {
|
||||
if (!is_stable()) return 0;
|
||||
int dim = 1;
|
||||
const TypePtr* elem_ptr = elem()->make_ptr();
|
||||
if (elem_ptr != NULL && elem_ptr->isa_aryptr())
|
||||
dim += elem_ptr->is_aryptr()->stable_dimension();
|
||||
return dim;
|
||||
}
|
||||
|
||||
//------------------------------eq---------------------------------------------
|
||||
// Structural equality check for Type representations
|
||||
bool TypeAryPtr::eq( const Type *t ) const {
|
||||
@ -3570,7 +3633,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
|
||||
// Something like byte[int+] meets char[int+].
|
||||
// This must fall to bottom, not (int[-128..65535])[int+].
|
||||
instance_id = InstanceBot;
|
||||
tary = TypeAry::make(Type::BOTTOM, tary->_size);
|
||||
tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
|
||||
}
|
||||
} else // Non integral arrays.
|
||||
// Must fall to bottom if exact klasses in upper lattice
|
||||
@ -3584,7 +3647,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
|
||||
(tap ->_klass_is_exact && !tap->klass()->is_subtype_of(klass())) ||
|
||||
// 'this' is exact and super or unrelated:
|
||||
(this->_klass_is_exact && !klass()->is_subtype_of(tap->klass())))) {
|
||||
tary = TypeAry::make(Type::BOTTOM, tary->_size);
|
||||
tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
|
||||
return make( NotNull, NULL, tary, lazy_klass, false, off, InstanceBot );
|
||||
}
|
||||
|
||||
|
@ -372,6 +372,10 @@ public:
|
||||
// Mapping from CI type system to compiler type:
|
||||
static const Type* get_typeflow_type(ciType* type);
|
||||
|
||||
static const Type* make_from_constant(ciConstant constant,
|
||||
bool require_constant = false,
|
||||
bool is_autobox_cache = false);
|
||||
|
||||
private:
|
||||
// support arrays
|
||||
static const BasicType _basic_type[];
|
||||
@ -588,8 +592,8 @@ public:
|
||||
//------------------------------TypeAry----------------------------------------
|
||||
// Class of Array Types
|
||||
class TypeAry : public Type {
|
||||
TypeAry( const Type *elem, const TypeInt *size) : Type(Array),
|
||||
_elem(elem), _size(size) {}
|
||||
TypeAry(const Type* elem, const TypeInt* size, bool stable) : Type(Array),
|
||||
_elem(elem), _size(size), _stable(stable) {}
|
||||
public:
|
||||
virtual bool eq( const Type *t ) const;
|
||||
virtual int hash() const; // Type specific hashing
|
||||
@ -599,10 +603,11 @@ public:
|
||||
private:
|
||||
const Type *_elem; // Element type of array
|
||||
const TypeInt *_size; // Elements in array
|
||||
const bool _stable; // Are elements @Stable?
|
||||
friend class TypeAryPtr;
|
||||
|
||||
public:
|
||||
static const TypeAry *make( const Type *elem, const TypeInt *size);
|
||||
static const TypeAry* make(const Type* elem, const TypeInt* size, bool stable = false);
|
||||
|
||||
virtual const Type *xmeet( const Type *t ) const;
|
||||
virtual const Type *xdual() const; // Compute dual right now.
|
||||
@ -988,6 +993,7 @@ public:
|
||||
const TypeAry* ary() const { return _ary; }
|
||||
const Type* elem() const { return _ary->_elem; }
|
||||
const TypeInt* size() const { return _ary->_size; }
|
||||
bool is_stable() const { return _ary->_stable; }
|
||||
|
||||
bool is_autobox_cache() const { return _is_autobox_cache; }
|
||||
|
||||
@ -1011,6 +1017,9 @@ public:
|
||||
virtual const Type *xmeet( const Type *t ) const;
|
||||
virtual const Type *xdual() const; // Compute dual right now.
|
||||
|
||||
const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
|
||||
int stable_dimension() const;
|
||||
|
||||
// Convenience common pre-built types.
|
||||
static const TypeAryPtr *RANGE;
|
||||
static const TypeAryPtr *OOPS;
|
||||
|
@ -3649,6 +3649,9 @@ class CommandLineFlags {
|
||||
experimental(bool, TrustFinalNonStaticFields, false, \
|
||||
"trust final non-static declarations for constant folding") \
|
||||
\
|
||||
experimental(bool, FoldStableValues, false, \
|
||||
"Private flag to control optimizations for stable variables") \
|
||||
\
|
||||
develop(bool, TraceInvokeDynamic, false, \
|
||||
"trace internal invoke dynamic operations") \
|
||||
\
|
||||
|
@ -471,16 +471,6 @@ class RuntimeHistogramElement : public HistogramElement {
|
||||
VM_ENTRY_BASE(result_type, header, thread) \
|
||||
debug_only(VMEntryWrapper __vew;)
|
||||
|
||||
// Another special case for nmethod_entry_point so the nmethod that the
|
||||
// interpreter is about to branch to doesn't get flushed before as we
|
||||
// branch to it's interpreter_entry_point. Skip stress testing here too.
|
||||
// Also we don't allow async exceptions because it is just too painful.
|
||||
#define IRT_ENTRY_FOR_NMETHOD(result_type, header) \
|
||||
result_type header { \
|
||||
nmethodLocker _nmlock(nm); \
|
||||
ThreadInVMfromJavaNoAsyncException __tiv(thread); \
|
||||
VM_ENTRY_BASE(result_type, header, thread)
|
||||
|
||||
#define IRT_END }
|
||||
|
||||
|
||||
|
@ -78,11 +78,13 @@ enum {
|
||||
JVM_ACC_FIELD_ACCESS_WATCHED = 0x00002000, // field access is watched by JVMTI
|
||||
JVM_ACC_FIELD_MODIFICATION_WATCHED = 0x00008000, // field modification is watched by JVMTI
|
||||
JVM_ACC_FIELD_INTERNAL = 0x00000400, // internal field, same as JVM_ACC_ABSTRACT
|
||||
JVM_ACC_FIELD_STABLE = 0x00000020, // @Stable field, same as JVM_ACC_SYNCHRONIZED
|
||||
JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE = 0x00000800, // field has generic signature
|
||||
|
||||
JVM_ACC_FIELD_INTERNAL_FLAGS = JVM_ACC_FIELD_ACCESS_WATCHED |
|
||||
JVM_ACC_FIELD_MODIFICATION_WATCHED |
|
||||
JVM_ACC_FIELD_INTERNAL |
|
||||
JVM_ACC_FIELD_STABLE |
|
||||
JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE,
|
||||
|
||||
// flags accepted by set_field_flags()
|
||||
@ -148,6 +150,7 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
|
||||
{ return (_flags & JVM_ACC_FIELD_MODIFICATION_WATCHED) != 0; }
|
||||
bool on_stack() const { return (_flags & JVM_ACC_ON_STACK) != 0; }
|
||||
bool is_internal() const { return (_flags & JVM_ACC_FIELD_INTERNAL) != 0; }
|
||||
bool is_stable() const { return (_flags & JVM_ACC_FIELD_STABLE) != 0; }
|
||||
bool field_has_generic_signature() const
|
||||
{ return (_flags & JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE) != 0; }
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class TestVerifyDuringStartup {
|
||||
"-XX:+VerifyDuringStartup",
|
||||
"-version"});
|
||||
|
||||
System.out.print("Testing:\n" + JDKToolFinder.getJDKTool("java"));
|
||||
System.out.print("Testing:\n" + JDKToolFinder.getCurrentJDKTool("java"));
|
||||
for (int i = 0; i < vmOpts.size(); i += 1) {
|
||||
System.out.print(" " + vmOpts.get(i));
|
||||
}
|
||||
|
@ -27,24 +27,43 @@ import java.io.File;
|
||||
|
||||
public final class JDKToolFinder {
|
||||
|
||||
private JDKToolFinder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full path to an executable in jdk/bin based on System property
|
||||
* test.jdk (set by jtreg test suite)
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getJDKTool(String tool) {
|
||||
String binPath = System.getProperty("test.jdk");
|
||||
if (binPath == null) {
|
||||
throw new RuntimeException("System property 'test.jdk' not set. This property is normally set by jtreg. "
|
||||
+ "When running test separately, set this property using '-Dtest.jdk=/path/to/jdk'.");
|
||||
private JDKToolFinder() {
|
||||
}
|
||||
|
||||
binPath += File.separatorChar + "bin" + File.separatorChar + tool;
|
||||
/**
|
||||
* Returns the full path to an executable in jdk/bin based on System
|
||||
* property {@code compile.jdk} (set by jtreg test suite)
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getJDKTool(String tool) {
|
||||
String binPath = System.getProperty("compile.jdk");
|
||||
if (binPath == null) {
|
||||
throw new RuntimeException("System property 'compile.jdk' not set. "
|
||||
+ "This property is normally set by jtreg. "
|
||||
+ "When running test separately, set this property using "
|
||||
+ "'-Dcompile.jdk=/path/to/jdk'.");
|
||||
}
|
||||
binPath += File.separatorChar + "bin" + File.separatorChar + tool;
|
||||
|
||||
return binPath;
|
||||
}
|
||||
return binPath;
|
||||
}
|
||||
/**
|
||||
* Returns the full path to an executable in <current jdk>/bin based
|
||||
* on System property {@code test.jdk} (set by jtreg test suite)
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getCurrentJDKTool(String tool) {
|
||||
String binPath = System.getProperty("test.jdk");
|
||||
if (binPath == null) {
|
||||
throw new RuntimeException("System property 'test.jdk' not set. "
|
||||
+ "This property is normally set by jtreg. "
|
||||
+ "When running test separately, set this property using "
|
||||
+ "'-Dtest.jdk=/path/to/jdk'.");
|
||||
}
|
||||
binPath += File.separatorChar + "bin" + File.separatorChar + tool;
|
||||
|
||||
return binPath;
|
||||
}
|
||||
}
|
||||
|
73
hotspot/test/testlibrary/ctw/Makefile
Normal file
73
hotspot/test/testlibrary/ctw/Makefile
Normal file
@ -0,0 +1,73 @@
|
||||
#
|
||||
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
ifneq "x$(ALT_BOOTDIR)" "x"
|
||||
BOOTDIR := $(ALT_BOOTDIR)
|
||||
endif
|
||||
|
||||
ifeq "x$(BOOTDIR)" "x"
|
||||
JDK_HOME := $(shell dirname $(shell which java))/..
|
||||
else
|
||||
JDK_HOME := $(BOOTDIR)
|
||||
endif
|
||||
|
||||
SRC_DIR = src
|
||||
BUILD_DIR = build
|
||||
OUTPUT_DIR = $(BUILD_DIR)/classes
|
||||
WHITEBOX_DIR = ../whitebox
|
||||
|
||||
JAVAC = $(JDK_HOME)/bin/javac
|
||||
JAR = $(JDK_HOME)/bin/jar
|
||||
|
||||
SRC_FILES = $(shell find $(SRC_DIR) -name '*.java')
|
||||
|
||||
MAIN_CLASS = sun.hotspot.tools.ctw.CompileTheWorld
|
||||
|
||||
.PHONY: clean cleantmp
|
||||
|
||||
all: ctw.jar cleantmp
|
||||
|
||||
clean: cleantmp
|
||||
@rm -rf ctw.jar wb.jar
|
||||
|
||||
cleantmp:
|
||||
@rm -rf filelist manifest.mf
|
||||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
ctw.jar: filelist wb.jar manifest.mf
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
$(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp wb.jar @filelist
|
||||
$(JAR) cfm ctw.jar manifest.mf -C $(OUTPUT_DIR) .
|
||||
|
||||
wb.jar:
|
||||
make -C ${WHITEBOX_DIR} wb.jar
|
||||
cp ${WHITEBOX_DIR}/wb.jar ./
|
||||
make -C ${WHITEBOX_DIR} clean
|
||||
|
||||
filelist: $(SRC_FILES)
|
||||
@rm -f $@
|
||||
@echo $(SRC_FILES) > $@
|
||||
|
||||
manifest.mf:
|
||||
@echo "Main-Class: ${MAIN_CLASS}" > manifest.mf
|
93
hotspot/test/testlibrary/ctw/README
Normal file
93
hotspot/test/testlibrary/ctw/README
Normal file
@ -0,0 +1,93 @@
|
||||
#
|
||||
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
This is replacement for CompileTheWorld (CTW) written on java. Its purpose is
|
||||
to make possible the use of CTW in product builds.
|
||||
|
||||
DEPENDENCES
|
||||
|
||||
The tool depends on Whitebox API. Assumed, that the sources of whitebox are
|
||||
located in '../whitebox' directory.
|
||||
|
||||
BUILDING
|
||||
|
||||
Simple way to build, just type 'make'.
|
||||
|
||||
Makefile uses environment variables 'ALT_BOOTDIR', 'BOOTDIR' as root-dir of jdk
|
||||
that will be used for compilation and creating jar.
|
||||
|
||||
On successful building 'ctw.jar' will be created.
|
||||
|
||||
RUNNING
|
||||
|
||||
Since the tool uses WhiteBox API, options 'UnlockDiagnosticVMOptions' and
|
||||
'WhiteBoxAPI' should be specified, and 'wb.jar' should be added to
|
||||
boot-classpath:
|
||||
$ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar
|
||||
|
||||
Arguments can be paths to '.jar, '.zip', '.lst' files or directories with
|
||||
classes, that define which classes will be compiled:
|
||||
- '.jar', '.zip' files and directories are interpreted like in classpath
|
||||
(including '<dir>/*' syntax)
|
||||
- '.lst' files -- files with class names (in java notation) to compile.
|
||||
CTW will try to find these classes with default class loader, so they should
|
||||
be located in classpath.
|
||||
|
||||
Without arguments it would work as old version of CTW: all classes in
|
||||
boot-classpath will be compiled, excluding classes in 'rt.jar' if 'rt.jar' isn't
|
||||
first in boot-classpath.
|
||||
|
||||
Due CTW's flags also are not available in product builds, the tool uses
|
||||
properties with the same names:
|
||||
- 'CompileTheWorldPreloadClasses' -- type:boolean, default:true, description:
|
||||
Preload all classes used by a class before start loading
|
||||
- 'CompileTheWorldStartAt' -- type:long, default:1, description: First class
|
||||
to consider
|
||||
- 'CompileTheWorldStopAt' -- type:long, default:Long.MAX_VALUE, description:
|
||||
Last class to consider
|
||||
|
||||
Also it uses additional properties:
|
||||
- 'sun.hotspot.tools.ctw.verbose' -- type:boolean, default:false,
|
||||
description: Verbose output, adds additional information about compilation
|
||||
- 'sun.hotspot.tools.ctw.logfile' -- type:string, default:null,
|
||||
description: Path to logfile, if it's null, cout will be used.
|
||||
|
||||
EXAMPLES
|
||||
|
||||
compile classes from 'rt.jar':
|
||||
$ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ${JAVA_HOME}/jre/lib/rt.jar
|
||||
|
||||
compile classes from all '.jar' in './testjars' directory:
|
||||
$ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ./testjars/*
|
||||
|
||||
compile classes from './build/classes' directory:
|
||||
$ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar ./build/classes
|
||||
|
||||
compile only java.lang.String, java.lang.Object classes:
|
||||
$ echo java.lang.String > classes.lst
|
||||
$ echo java.lang.Object >> classes.lst
|
||||
$ java -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar classes.lst
|
||||
|
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Set;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.*;
|
||||
import java.nio.file.attribute.*;
|
||||
|
||||
/**
|
||||
* * Handler for dirs containing classes to compile.
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class ClassPathDirEntry extends PathHandler {
|
||||
|
||||
private final int rootLength = root.toString().length();
|
||||
|
||||
public ClassPathDirEntry(Path root, Executor executor) {
|
||||
super(root, executor);
|
||||
try {
|
||||
URL url = root.toUri().toURL();
|
||||
setLoader(new URLClassLoader(new URL[]{url}));
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
System.out.println("# dir: " + root);
|
||||
if (!Files.exists(root)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Files.walkFileTree(root, EnumSet.of(FileVisitOption.FOLLOW_LINKS),
|
||||
Integer.MAX_VALUE, new CompileFileVisitor());
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void processFile(Path file) {
|
||||
if (Utils.isClassFile(file.toString())) {
|
||||
processClass(pathToClassName(file));
|
||||
}
|
||||
}
|
||||
|
||||
private String pathToClassName(Path file) {
|
||||
String fileString;
|
||||
if (root == file) {
|
||||
fileString = file.normalize().toString();
|
||||
} else {
|
||||
fileString = file.normalize().toString().substring(rootLength + 1);
|
||||
}
|
||||
return Utils.fileNameToClassName(fileString);
|
||||
}
|
||||
|
||||
private class CompileFileVisitor extends SimpleFileVisitor<Path> {
|
||||
|
||||
private final Set<Path> ready = new HashSet<>();
|
||||
|
||||
@Override
|
||||
public FileVisitResult preVisitDirectory(Path dir,
|
||||
BasicFileAttributes attrs) throws IOException {
|
||||
if (ready.contains(dir)) {
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
ready.add(dir);
|
||||
return super.preVisitDirectory(dir, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file,
|
||||
BasicFileAttributes attrs) throws IOException {
|
||||
if (!ready.contains(file)) {
|
||||
processFile(file);
|
||||
}
|
||||
return isFinished() ? FileVisitResult.TERMINATE
|
||||
: FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult visitFileFailed(Path file,
|
||||
IOException exc) throws IOException {
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.*;
|
||||
import java.util.jar.*;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.*;
|
||||
|
||||
/**
|
||||
* Handler for jar-files containing classes to compile.
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class ClassPathJarEntry extends PathHandler {
|
||||
|
||||
public ClassPathJarEntry(Path root, Executor executor) {
|
||||
super(root, executor);
|
||||
try {
|
||||
URL url = root.toUri().toURL();
|
||||
setLoader(new URLClassLoader(new URL[]{url}));
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
System.out.println("# jar: " + root);
|
||||
if (!Files.exists(root)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
JarFile jarFile = new JarFile(root.toFile());
|
||||
JarEntry entry;
|
||||
for (Enumeration<JarEntry> e = jarFile.entries();
|
||||
e.hasMoreElements(); ) {
|
||||
entry = e.nextElement();
|
||||
processJarEntry(entry);
|
||||
if (isFinished()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void processJarEntry(JarEntry entry) {
|
||||
String filename = entry.getName();
|
||||
if (Utils.isClassFile(filename)) {
|
||||
processClass(Utils.fileNameToClassName(filename));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* Handler for dirs containing jar-files with classes to compile.
|
||||
*
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class ClassPathJarInDirEntry extends PathHandler {
|
||||
|
||||
public ClassPathJarInDirEntry(Path root, Executor executor) {
|
||||
super(root, executor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
System.out.println("# jar_in_dir: " + root);
|
||||
if (!Files.exists(root)) {
|
||||
return;
|
||||
}
|
||||
try (DirectoryStream<Path> ds
|
||||
= Files.newDirectoryStream(root, "*.jar")) {
|
||||
for (Path p : ds) {
|
||||
new ClassPathJarEntry(p, executor).process();
|
||||
if (isFinished()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* Handler for files containing a list of classes to compile.
|
||||
*
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class ClassesListInFile extends PathHandler {
|
||||
public ClassesListInFile(Path root, Executor executor) {
|
||||
super(root, executor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
System.out.println("# list: " + root);
|
||||
if (!Files.exists(root)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
try (BufferedReader reader = Files.newBufferedReader(root,
|
||||
StandardCharsets.UTF_8)) {
|
||||
String line;
|
||||
while (!isFinished() && ((line = reader.readLine()) != null)) {
|
||||
processClass(line);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import sun.management.ManagementFactoryHelper;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
/**
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class CompileTheWorld {
|
||||
/**
|
||||
* Entry point. Compiles classes in {@code args}, or all classes in
|
||||
* boot-classpath if args is empty
|
||||
*
|
||||
* @param args paths to jar/zip, dir contains classes, or to .lst file
|
||||
* contains list of classes to compile
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
String logfile = Utils.LOG_FILE;
|
||||
PrintStream os = null;
|
||||
if (logfile != null) {
|
||||
try {
|
||||
os = new PrintStream(Files.newOutputStream(Paths.get(logfile)));
|
||||
} catch (IOException io) {
|
||||
}
|
||||
}
|
||||
if (os != null) {
|
||||
System.setOut(os);
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
if (ManagementFactoryHelper.getCompilationMXBean() == null) {
|
||||
throw new RuntimeException(
|
||||
"CTW can not work in interpreted mode");
|
||||
}
|
||||
} catch (java.lang.NoClassDefFoundError e) {
|
||||
// compact1, compact2 support
|
||||
}
|
||||
String[] paths = args;
|
||||
boolean skipRtJar = false;
|
||||
if (args.length == 0) {
|
||||
paths = getDefaultPaths();
|
||||
skipRtJar = true;
|
||||
}
|
||||
ExecutorService executor = createExecutor();
|
||||
long start = System.currentTimeMillis();
|
||||
try {
|
||||
String path;
|
||||
for (int i = 0, n = paths.length; i < n
|
||||
&& !PathHandler.isFinished(); ++i) {
|
||||
path = paths[i];
|
||||
if (skipRtJar && i > 0 && isRtJar(path)) {
|
||||
// rt.jar is not first, so skip it
|
||||
continue;
|
||||
}
|
||||
PathHandler.create(path, executor).process();
|
||||
}
|
||||
} finally {
|
||||
await(executor);
|
||||
}
|
||||
System.out.printf("Done (%d classes, %d methods, %d ms)%n",
|
||||
Compiler.getClassCount(),
|
||||
Compiler.getMethodCount(),
|
||||
System.currentTimeMillis() - start);
|
||||
} finally {
|
||||
if (os != null) {
|
||||
os.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static ExecutorService createExecutor() {
|
||||
final int threadsCount = Math.min(
|
||||
Runtime.getRuntime().availableProcessors(),
|
||||
Utils.CI_COMPILER_COUNT);
|
||||
ExecutorService result;
|
||||
if (threadsCount > 1) {
|
||||
result = new ThreadPoolExecutor(threadsCount, threadsCount,
|
||||
/* keepAliveTime */ 0L, TimeUnit.MILLISECONDS,
|
||||
new ArrayBlockingQueue<>(threadsCount),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
} else {
|
||||
result = new CurrentThreadExecutor();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String[] getDefaultPaths() {
|
||||
String property = System.getProperty("sun.boot.class.path");
|
||||
System.out.println(
|
||||
"# use 'sun.boot.class.path' as args: " + property);
|
||||
return Utils.PATH_SEPARATOR.split(property);
|
||||
}
|
||||
|
||||
private static void await(ExecutorService executor) {
|
||||
executor.shutdown();
|
||||
while (!executor.isTerminated()) {
|
||||
try {
|
||||
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
|
||||
} catch (InterruptedException ie) {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isRtJar(String path) {
|
||||
return Utils.endsWithIgnoreCase(path, File.separator + "rt.jar");
|
||||
}
|
||||
|
||||
private static class CurrentThreadExecutor extends AbstractExecutorService {
|
||||
private boolean isShutdown;
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
this.isShutdown = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Runnable> shutdownNow() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShutdown() {
|
||||
return isShutdown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTerminated() {
|
||||
return isShutdown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean awaitTermination(long timeout, TimeUnit unit)
|
||||
throws InterruptedException {
|
||||
return isShutdown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Runnable command) {
|
||||
command.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import sun.hotspot.WhiteBox;
|
||||
import sun.misc.SharedSecrets;
|
||||
import sun.reflect.ConstantPool;
|
||||
|
||||
import java.lang.reflect.Executable;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* Provide method to compile whole class.
|
||||
* Also contains compiled methods and classes counters.
|
||||
*
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class Compiler {
|
||||
private Compiler() { }
|
||||
private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
|
||||
private static final AtomicLong CLASS_COUNT = new AtomicLong(0L);
|
||||
private static final AtomicLong METHOD_COUNT = new AtomicLong(0L);
|
||||
private static volatile boolean CLASSES_LIMIT_REACHED = false;
|
||||
|
||||
/**
|
||||
* @return count of processed classes
|
||||
*/
|
||||
public static long getClassCount() {
|
||||
return CLASS_COUNT.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return count of processed methods
|
||||
*/
|
||||
public static long getMethodCount() {
|
||||
return METHOD_COUNT.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if classes limit is reached
|
||||
*/
|
||||
public static boolean isLimitReached() {
|
||||
return CLASSES_LIMIT_REACHED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles all methods and constructors.
|
||||
*
|
||||
* @param aClass class to compile
|
||||
* @param executor executor used for compile task invocation
|
||||
* @throws NullPointerException if {@code class} or {@code executor}
|
||||
* is {@code null}
|
||||
*/
|
||||
public static void compileClass(Class aClass, Executor executor) {
|
||||
Objects.requireNonNull(aClass);
|
||||
Objects.requireNonNull(executor);
|
||||
long id = CLASS_COUNT.incrementAndGet();
|
||||
if (id > Utils.COMPILE_THE_WORLD_STOP_AT) {
|
||||
CLASS_COUNT.decrementAndGet();
|
||||
CLASSES_LIMIT_REACHED = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (id >= Utils.COMPILE_THE_WORLD_START_AT) {
|
||||
String name = aClass.getName();
|
||||
try {
|
||||
System.out.printf("[%d]\t%s%n", id, name);
|
||||
ConstantPool constantPool = SharedSecrets.getJavaLangAccess().
|
||||
getConstantPool(aClass);
|
||||
if (Utils.COMPILE_THE_WORLD_PRELOAD_CLASSES) {
|
||||
preloadClasses(name, id, constantPool);
|
||||
}
|
||||
long methodCount = 0;
|
||||
for (Executable e : aClass.getDeclaredConstructors()) {
|
||||
++methodCount;
|
||||
executor.execute(new CompileMethodCommand(id, name, e));
|
||||
}
|
||||
for (Executable e : aClass.getDeclaredMethods()) {
|
||||
++methodCount;
|
||||
executor.execute(new CompileMethodCommand(id, name, e));
|
||||
}
|
||||
METHOD_COUNT.addAndGet(methodCount);
|
||||
|
||||
if (Utils.DEOPTIMIZE_ALL_CLASSES_RATE > 0
|
||||
&& (id % Utils.DEOPTIMIZE_ALL_CLASSES_RATE == 0)) {
|
||||
WHITE_BOX.deoptimizeAll();
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
System.out.printf("[%d]\t%s\tskipping %s%n", id, name, t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void preloadClasses(String className, long id,
|
||||
ConstantPool constantPool) {
|
||||
try {
|
||||
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
|
||||
try {
|
||||
constantPool.getClassAt(i);
|
||||
} catch (IllegalArgumentException ignore) {
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
System.out.printf("[%d]\t%s\tpreloading failed : %s%n", id,
|
||||
className, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compilation of method.
|
||||
* Will compile method on all available comp levels.
|
||||
*/
|
||||
private static class CompileMethodCommand implements Runnable {
|
||||
private final long classId;
|
||||
private final String className;
|
||||
private final Executable method;
|
||||
|
||||
/**
|
||||
* @param classId id of class
|
||||
* @param className name of class
|
||||
* @param method compiled for compilation
|
||||
*/
|
||||
public CompileMethodCommand(long classId, String className,
|
||||
Executable method) {
|
||||
this.classId = classId;
|
||||
this.className = className;
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void run() {
|
||||
int compLevel = Utils.INITIAL_COMP_LEVEL;
|
||||
if (Utils.TIERED_COMPILATION) {
|
||||
for (int i = compLevel; i <= Utils.TIERED_STOP_AT_LEVEL; ++i) {
|
||||
WHITE_BOX.deoptimizeMethod(method);
|
||||
compileMethod(method, i);
|
||||
}
|
||||
} else {
|
||||
compileMethod(method, compLevel);
|
||||
}
|
||||
}
|
||||
|
||||
private void waitCompilation() {
|
||||
if (!Utils.BACKGROUND_COMPILATION) {
|
||||
return;
|
||||
}
|
||||
final Object obj = new Object();
|
||||
synchronized (obj) {
|
||||
for (int i = 0;
|
||||
i < 10 && WHITE_BOX.isMethodQueuedForCompilation(method);
|
||||
++i) {
|
||||
try {
|
||||
obj.wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void compileMethod(Executable method, int compLevel) {
|
||||
if (WHITE_BOX.isMethodCompilable(method, compLevel)) {
|
||||
try {
|
||||
WHITE_BOX.enqueueMethodForCompilation(method, compLevel);
|
||||
waitCompilation();
|
||||
int tmp = WHITE_BOX.getMethodCompilationLevel(method);
|
||||
if (tmp != compLevel) {
|
||||
logMethod(method, "compilation level = " + tmp
|
||||
+ ", but not " + compLevel);
|
||||
} else if (Utils.IS_VERBOSE) {
|
||||
logMethod(method, "compilation level = " + tmp + ". OK");
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logMethod(method, "error on compile at " + compLevel
|
||||
+ " level");
|
||||
t.printStackTrace();
|
||||
}
|
||||
} else if (Utils.IS_VERBOSE) {
|
||||
logMethod(method, "not compilable at " + compLevel);
|
||||
}
|
||||
}
|
||||
|
||||
private void logMethod(Executable method, String message) {
|
||||
StringBuilder builder = new StringBuilder("[");
|
||||
builder.append(classId);
|
||||
builder.append("]\t");
|
||||
builder.append(className);
|
||||
builder.append("::");
|
||||
builder.append(method.getName());
|
||||
builder.append('(');
|
||||
Class[] params = method.getParameterTypes();
|
||||
for (int i = 0, n = params.length - 1; i < n; ++i) {
|
||||
builder.append(params[i].getName());
|
||||
builder.append(", ");
|
||||
}
|
||||
if (params.length != 0) {
|
||||
builder.append(params[params.length - 1].getName());
|
||||
}
|
||||
builder.append(')');
|
||||
if (message != null) {
|
||||
builder.append('\t');
|
||||
builder.append(message);
|
||||
}
|
||||
System.err.println(builder);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* Abstract handler for path.
|
||||
* <p/>
|
||||
* Concrete subclasses should implement method {@link #process()}.
|
||||
*
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public abstract class PathHandler {
|
||||
private static final Pattern JAR_IN_DIR_PATTERN
|
||||
= Pattern.compile("^(.*[/\\\\])?\\*$");
|
||||
protected final Path root;
|
||||
protected final Executor executor;
|
||||
private ClassLoader loader;
|
||||
|
||||
/**
|
||||
* @param root root path to process
|
||||
* @param executor executor used for process task invocation
|
||||
* @throws NullPointerException if {@code root} or {@code executor} is
|
||||
* {@code null}
|
||||
*/
|
||||
protected PathHandler(Path root, Executor executor) {
|
||||
Objects.requireNonNull(root);
|
||||
Objects.requireNonNull(executor);
|
||||
this.root = root.normalize();
|
||||
this.executor = executor;
|
||||
this.loader = ClassLoader.getSystemClassLoader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method. Construct concrete handler in depends from {@code path}.
|
||||
*
|
||||
* @param path the path to process
|
||||
* @param executor executor used for compile task invocation
|
||||
* @throws NullPointerException if {@code path} or {@code executor} is
|
||||
* {@code null}
|
||||
*/
|
||||
public static PathHandler create(String path, Executor executor) {
|
||||
Objects.requireNonNull(path);
|
||||
Objects.requireNonNull(executor);
|
||||
Matcher matcher = JAR_IN_DIR_PATTERN.matcher(path);
|
||||
if (matcher.matches()) {
|
||||
path = matcher.group(1);
|
||||
path = path.isEmpty() ? "." : path;
|
||||
return new ClassPathJarInDirEntry(Paths.get(path), executor);
|
||||
} else {
|
||||
path = path.isEmpty() ? "." : path;
|
||||
Path p = Paths.get(path);
|
||||
if (isJarFile(p)) {
|
||||
return new ClassPathJarEntry(p, executor);
|
||||
} else if (isListFile(p)) {
|
||||
return new ClassesListInFile(p, executor);
|
||||
} else {
|
||||
return new ClassPathDirEntry(p, executor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isJarFile(Path path) {
|
||||
if (Files.isRegularFile(path)) {
|
||||
String name = path.toString();
|
||||
return Utils.endsWithIgnoreCase(name, ".zip")
|
||||
|| Utils.endsWithIgnoreCase(name, ".jar");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isListFile(Path path) {
|
||||
if (Files.isRegularFile(path)) {
|
||||
String name = path.toString();
|
||||
return Utils.endsWithIgnoreCase(name, ".lst");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes all classes in specified path.
|
||||
*/
|
||||
public abstract void process();
|
||||
|
||||
/**
|
||||
* Sets class loader, that will be used to define class at
|
||||
* {@link #processClass(String)}.
|
||||
*
|
||||
* @param loader class loader
|
||||
* @throws NullPointerException if {@code loader} is {@code null}
|
||||
*/
|
||||
protected final void setLoader(ClassLoader loader) {
|
||||
Objects.requireNonNull(loader);
|
||||
this.loader = loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes specificed class.
|
||||
* @param name fully qualified name of class to process
|
||||
*/
|
||||
protected final void processClass(String name) {
|
||||
try {
|
||||
Class aClass = Class.forName(name, true, loader);
|
||||
Compiler.compileClass(aClass, executor);
|
||||
} catch (ClassNotFoundException | LinkageError e) {
|
||||
System.out.printf("Class %s loading failed : %s%n", name,
|
||||
e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if processing should be stopped
|
||||
*/
|
||||
public static boolean isFinished() {
|
||||
return Compiler.isLimitReached();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,215 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.hotspot.tools.ctw;
|
||||
|
||||
import com.sun.management.HotSpotDiagnosticMXBean;
|
||||
import sun.management.ManagementFactoryHelper;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Auxiliary methods.
|
||||
*
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
public class Utils {
|
||||
/**
|
||||
* Value of {@code -XX:CompileThreshold}
|
||||
*/
|
||||
public static final boolean TIERED_COMPILATION
|
||||
= Boolean.parseBoolean(getVMOption("TieredCompilation", "false"));
|
||||
/**
|
||||
* Value of {@code -XX:BackgroundCompilation}
|
||||
*/
|
||||
public static final boolean BACKGROUND_COMPILATION
|
||||
= Boolean.parseBoolean(getVMOption("BackgroundCompilation",
|
||||
"false"));
|
||||
/**
|
||||
* Value of {@code -XX:TieredStopAtLevel}
|
||||
*/
|
||||
public static final int TIERED_STOP_AT_LEVEL;
|
||||
/**
|
||||
* Value of {@code -XX:CICompilerCount}
|
||||
*/
|
||||
public static final Integer CI_COMPILER_COUNT
|
||||
= Integer.valueOf(getVMOption("CICompilerCount", "1"));
|
||||
/**
|
||||
* Initial compilation level.
|
||||
*/
|
||||
public static final int INITIAL_COMP_LEVEL;
|
||||
/**
|
||||
* Compiled path-separator regexp.
|
||||
*/
|
||||
public static final Pattern PATH_SEPARATOR = Pattern.compile(
|
||||
File.pathSeparator, Pattern.LITERAL);
|
||||
/**
|
||||
* Value of {@code -DDeoptimizeAllClassesRate}. Frequency of
|
||||
* {@code WB.deoptimizeAll()} invocation If it less that {@code 0},
|
||||
* {@code WB.deoptimizeAll()} will not be invoked.
|
||||
*/
|
||||
public static final int DEOPTIMIZE_ALL_CLASSES_RATE
|
||||
= Integer.getInteger("DeoptimizeAllClassesRate", -1);
|
||||
/**
|
||||
* Value of {@code -DCompileTheWorldStopAt}. Last class to consider.
|
||||
*/
|
||||
public static final long COMPILE_THE_WORLD_STOP_AT
|
||||
= Long.getLong("CompileTheWorldStopAt", Long.MAX_VALUE);
|
||||
/**
|
||||
* Value of {@code -DCompileTheWorldStartAt}. First class to consider.
|
||||
*/
|
||||
public static final long COMPILE_THE_WORLD_START_AT
|
||||
= Long.getLong("CompileTheWorldStartAt", 1);
|
||||
/**
|
||||
* Value of {@code -DCompileTheWorldPreloadClasses}. Preload all classes
|
||||
* used by a class before start loading.
|
||||
*/
|
||||
public static final boolean COMPILE_THE_WORLD_PRELOAD_CLASSES;
|
||||
/**
|
||||
* Value of {@code -Dsun.hotspot.tools.ctw.verbose}. Verbose output,
|
||||
* adds additional information about compilation.
|
||||
*/
|
||||
public static final boolean IS_VERBOSE
|
||||
= Boolean.getBoolean("sun.hotspot.tools.ctw.verbose");
|
||||
/**
|
||||
* Value of {@code -Dsun.hotspot.tools.ctw.logfile}.Path to logfile, if
|
||||
* it's null, cout will be used.
|
||||
*/
|
||||
public static final String LOG_FILE
|
||||
= System.getProperty("sun.hotspot.tools.ctw.logfile");
|
||||
static {
|
||||
if (Utils.TIERED_COMPILATION) {
|
||||
INITIAL_COMP_LEVEL = 1;
|
||||
} else {
|
||||
String vmName = System.getProperty("java.vm.name");
|
||||
if (Utils.endsWithIgnoreCase(vmName, " Server VM")) {
|
||||
INITIAL_COMP_LEVEL = 4;
|
||||
} else if (Utils.endsWithIgnoreCase(vmName, " Client VM")
|
||||
|| Utils.endsWithIgnoreCase(vmName, " Minimal VM")) {
|
||||
INITIAL_COMP_LEVEL = 1;
|
||||
} else {
|
||||
throw new RuntimeException("Unknown VM: " + vmName);
|
||||
}
|
||||
}
|
||||
|
||||
TIERED_STOP_AT_LEVEL = Integer.parseInt(getVMOption("TieredStopAtLevel",
|
||||
String.valueOf(INITIAL_COMP_LEVEL)));
|
||||
}
|
||||
|
||||
static {
|
||||
String tmp = System.getProperty("CompileTheWorldPreloadClasses");
|
||||
if (tmp == null) {
|
||||
COMPILE_THE_WORLD_PRELOAD_CLASSES = true;
|
||||
} else {
|
||||
COMPILE_THE_WORLD_PRELOAD_CLASSES = Boolean.parseBoolean(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
public static final String CLASSFILE_EXT = ".class";
|
||||
|
||||
private Utils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if the string ends with the suffix, ignoring case
|
||||
* considerations
|
||||
*
|
||||
* @param string the tested string
|
||||
* @param suffix the suffix
|
||||
* @return {@code true} if {@code string} ends with the {@code suffix}
|
||||
* @see String#endsWith(String)
|
||||
*/
|
||||
public static boolean endsWithIgnoreCase(String string, String suffix) {
|
||||
if (string == null || suffix == null) {
|
||||
return false;
|
||||
}
|
||||
int length = suffix.length();
|
||||
int toffset = string.length() - length;
|
||||
if (toffset < 0) {
|
||||
return false;
|
||||
}
|
||||
return string.regionMatches(true, toffset, suffix, 0, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns value of VM option.
|
||||
*
|
||||
* @param name option's name
|
||||
* @return value of option or {@code null}, if option doesn't exist
|
||||
* @throws NullPointerException if name is null
|
||||
*/
|
||||
public static String getVMOption(String name) {
|
||||
String result;
|
||||
HotSpotDiagnosticMXBean diagnostic
|
||||
= ManagementFactoryHelper.getDiagnosticMXBean();
|
||||
result = diagnostic.getVMOption(name).getValue();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns value of VM option or default value.
|
||||
*
|
||||
* @param name option's name
|
||||
* @param defaultValue default value
|
||||
* @return value of option or {@code defaultValue}, if option doesn't exist
|
||||
* @throws NullPointerException if name is null
|
||||
* @see #getVMOption(String)
|
||||
*/
|
||||
public static String getVMOption(String name, String defaultValue) {
|
||||
String result;
|
||||
try {
|
||||
result = getVMOption(name);
|
||||
} catch (NoClassDefFoundError e) {
|
||||
// compact1, compact2 support
|
||||
result = defaultValue;
|
||||
}
|
||||
return result == null ? defaultValue : result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if the filename is valid filename for class file.
|
||||
*
|
||||
* @param filename tested filename
|
||||
*/
|
||||
public static boolean isClassFile(String filename) {
|
||||
// If the filename has a period after removing '.class', it's not valid class file
|
||||
return endsWithIgnoreCase(filename, CLASSFILE_EXT)
|
||||
&& (filename.indexOf('.')
|
||||
== (filename.length() - CLASSFILE_EXT.length()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the filename to classname.
|
||||
*
|
||||
* @param filename filename to convert
|
||||
* @return corresponding classname.
|
||||
* @throws AssertionError if filename isn't valid filename for class file -
|
||||
* {@link #isClassFile(String)}
|
||||
*/
|
||||
public static String fileNameToClassName(String filename) {
|
||||
assert isClassFile(filename);
|
||||
return filename.substring(0, filename.length() - CLASSFILE_EXT.length())
|
||||
.replace(File.separatorChar, '.');
|
||||
}
|
||||
}
|
5
hotspot/test/testlibrary/ctw/test/Bar.java
Normal file
5
hotspot/test/testlibrary/ctw/test/Bar.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class Bar {
|
||||
private static void staticMethod() { }
|
||||
public void method() { }
|
||||
protected Bar() { }
|
||||
}
|
61
hotspot/test/testlibrary/ctw/test/ClassesDirTest.java
Normal file
61
hotspot/test/testlibrary/ctw/test/ClassesDirTest.java
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test ClassesDirTest
|
||||
* @bug 8012447
|
||||
* @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src
|
||||
* @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox ClassesDirTest Foo Bar
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
|
||||
* @run main ClassesDirTest prepare
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld classes
|
||||
* @run main ClassesDirTest check ctw.log
|
||||
* @summary testing of CompileTheWorld :: classes in directory
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
public class ClassesDirTest extends CtwTest {
|
||||
private static final String[] SHOULD_CONTAIN
|
||||
= {"# dir: classes", "Done (2 classes, 6 methods, "};
|
||||
|
||||
private ClassesDirTest() {
|
||||
super(SHOULD_CONTAIN);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new ClassesDirTest().run(args);
|
||||
}
|
||||
|
||||
protected void prepare() throws Exception {
|
||||
String path = "classes";
|
||||
Files.createDirectory(Paths.get(path));
|
||||
Files.move(Paths.get("Foo.class"), Paths.get(path, "Foo.class"),
|
||||
StandardCopyOption.REPLACE_EXISTING);
|
||||
Files.move(Paths.get("Bar.class"), Paths.get(path, "Bar.class"),
|
||||
StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
58
hotspot/test/testlibrary/ctw/test/ClassesListTest.java
Normal file
58
hotspot/test/testlibrary/ctw/test/ClassesListTest.java
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test ClassesListTest
|
||||
* @bug 8012447
|
||||
* @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src
|
||||
* @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox ClassesListTest Foo Bar
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
|
||||
* @run main ClassesListTest prepare
|
||||
* @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld classes.lst
|
||||
* @run main ClassesListTest check ctw.log
|
||||
* @summary testing of CompileTheWorld :: list of classes in file
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
public class ClassesListTest extends CtwTest {
|
||||
private static final String[] SHOULD_CONTAIN
|
||||
= {"# list: classes.lst", "Done (4 classes, "};
|
||||
|
||||
private ClassesListTest() {
|
||||
super(SHOULD_CONTAIN);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new ClassesListTest().run(args);
|
||||
}
|
||||
|
||||
protected void prepare() throws Exception {
|
||||
String path = "classes.lst";
|
||||
Files.copy(Paths.get(System.getProperty("test.src"), path),
|
||||
Paths.get(path), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
118
hotspot/test/testlibrary/ctw/test/CtwTest.java
Normal file
118
hotspot/test/testlibrary/ctw/test/CtwTest.java
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Writer;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.BufferedReader;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import com.oracle.java.testlibrary.JDKToolFinder;
|
||||
import com.oracle.java.testlibrary.OutputAnalyzer;
|
||||
|
||||
public abstract class CtwTest {
|
||||
protected final String[] shouldContain;
|
||||
protected CtwTest(String[] shouldContain) {
|
||||
this.shouldContain = shouldContain;
|
||||
}
|
||||
|
||||
public void run(String[] args) throws Exception {
|
||||
if (args.length == 0) {
|
||||
throw new Error("args is empty");
|
||||
}
|
||||
switch (args[0]) {
|
||||
case "prepare":
|
||||
prepare();
|
||||
break;
|
||||
case "check":
|
||||
check(args);
|
||||
break;
|
||||
default:
|
||||
throw new Error("unregonized action -- " + args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
protected void prepare() throws Exception { }
|
||||
|
||||
protected void check(String[] args) throws Exception {
|
||||
if (args.length < 2) {
|
||||
throw new Error("logfile isn't specified");
|
||||
}
|
||||
String logfile = args[1];
|
||||
try (BufferedReader r = Files.newBufferedReader(Paths.get(logfile),
|
||||
Charset.defaultCharset())) {
|
||||
OutputAnalyzer output = readOutput(r);
|
||||
for (String test : shouldContain) {
|
||||
output.shouldContain(test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static OutputAnalyzer readOutput(BufferedReader reader)
|
||||
throws IOException {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
String eol = String.format("%n");
|
||||
String line;
|
||||
|
||||
while ((line = reader.readLine()) != null) {
|
||||
builder.append(line);
|
||||
builder.append(eol);
|
||||
}
|
||||
return new OutputAnalyzer(builder.toString(), "");
|
||||
}
|
||||
|
||||
protected void dump(OutputAnalyzer output, String name) {
|
||||
try (Writer w = new FileWriter(name + ".out")) {
|
||||
String s = output.getStdout();
|
||||
w.write(s, s.length(), 0);
|
||||
} catch (IOException io) {
|
||||
io.printStackTrace();
|
||||
}
|
||||
try (Writer w = new FileWriter(name + ".err")) {
|
||||
String s = output.getStderr();
|
||||
w.write(s, s.length(), 0);
|
||||
} catch (IOException io) {
|
||||
io.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected ProcessBuilder createJarProcessBuilder(String... command)
|
||||
throws Exception {
|
||||
String javapath = JDKToolFinder.getJDKTool("jar");
|
||||
|
||||
ArrayList<String> args = new ArrayList<>();
|
||||
args.add(javapath);
|
||||
Collections.addAll(args, command);
|
||||
|
||||
return new ProcessBuilder(args.toArray(new String[args.size()]));
|
||||
}
|
||||
}
|
5
hotspot/test/testlibrary/ctw/test/Foo.java
Normal file
5
hotspot/test/testlibrary/ctw/test/Foo.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
private static void staticMethod() { }
|
||||
public void method() { }
|
||||
protected Foo() { }
|
||||
}
|
75
hotspot/test/testlibrary/ctw/test/JarDirTest.java
Normal file
75
hotspot/test/testlibrary/ctw/test/JarDirTest.java
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test JarDirTest
|
||||
* @bug 8012447
|
||||
* @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src
|
||||
* @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox JarDirTest Foo Bar
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
|
||||
* @run main JarDirTest prepare
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld jars/*
|
||||
* @run main JarDirTest check ctw.log
|
||||
* @summary testing of CompileTheWorld :: jars in directory
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import com.oracle.java.testlibrary.OutputAnalyzer;
|
||||
|
||||
public class JarDirTest extends CtwTest {
|
||||
private static final String[] SHOULD_CONTAIN
|
||||
= {"# jar_in_dir: jars",
|
||||
"# jar: jars" + File.separator +"foo.jar",
|
||||
"# jar: jars" + File.separator +"bar.jar",
|
||||
"Done (4 classes, 12 methods, "};
|
||||
|
||||
private JarDirTest() {
|
||||
super(SHOULD_CONTAIN);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new JarDirTest().run(args);
|
||||
}
|
||||
|
||||
protected void prepare() throws Exception {
|
||||
String path = "jars";
|
||||
Files.createDirectory(Paths.get(path));
|
||||
|
||||
ProcessBuilder pb = createJarProcessBuilder("cf", "jars/foo.jar",
|
||||
"Foo.class", "Bar.class");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
dump(output, "ctw-foo.jar");
|
||||
output.shouldHaveExitValue(0);
|
||||
|
||||
pb = createJarProcessBuilder("cf", "jars/bar.jar", "Foo.class",
|
||||
"Bar.class");
|
||||
output = new OutputAnalyzer(pb.start());
|
||||
dump(output, "ctw-bar.jar");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
}
|
65
hotspot/test/testlibrary/ctw/test/JarsTest.java
Normal file
65
hotspot/test/testlibrary/ctw/test/JarsTest.java
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test JarsTest
|
||||
* @bug 8012447
|
||||
* @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src
|
||||
* @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox JarsTest Foo Bar
|
||||
* @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
|
||||
* @run main JarsTest prepare
|
||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld foo.jar bar.jar
|
||||
* @run main JarsTest check ctw.log
|
||||
* @summary testing of CompileTheWorld :: jars
|
||||
* @author igor.ignatyev@oracle.com
|
||||
*/
|
||||
|
||||
import com.oracle.java.testlibrary.OutputAnalyzer;
|
||||
|
||||
public class JarsTest extends CtwTest {
|
||||
private static final String[] SHOULD_CONTAIN
|
||||
= {"# jar: foo.jar", "# jar: bar.jar",
|
||||
"Done (4 classes, 12 methods, "};
|
||||
|
||||
private JarsTest() {
|
||||
super(SHOULD_CONTAIN);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new JarsTest().run(args);
|
||||
}
|
||||
|
||||
protected void prepare() throws Exception {
|
||||
ProcessBuilder pb = createJarProcessBuilder("cf", "foo.jar",
|
||||
"Foo.class", "Bar.class");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
dump(output, "ctw-foo.jar");
|
||||
output.shouldHaveExitValue(0);
|
||||
|
||||
pb = createJarProcessBuilder("cf", "bar.jar", "Foo.class", "Bar.class");
|
||||
output = new OutputAnalyzer(pb.start());
|
||||
dump(output, "ctw-bar.jar");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
}
|
4
hotspot/test/testlibrary/ctw/test/classes.lst
Normal file
4
hotspot/test/testlibrary/ctw/test/classes.lst
Normal file
@ -0,0 +1,4 @@
|
||||
java.lang.String
|
||||
java.lang.Object
|
||||
Foo
|
||||
Bar
|
63
hotspot/test/testlibrary/whitebox/Makefile
Normal file
63
hotspot/test/testlibrary/whitebox/Makefile
Normal file
@ -0,0 +1,63 @@
|
||||
#
|
||||
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
ifneq "x$(ALT_BOOTDIR)" "x"
|
||||
BOOTDIR := $(ALT_BOOTDIR)
|
||||
endif
|
||||
|
||||
ifeq "x$(BOOTDIR)" "x"
|
||||
JDK_HOME := $(shell dirname $(shell which java))/..
|
||||
else
|
||||
JDK_HOME := $(BOOTDIR)
|
||||
endif
|
||||
|
||||
SRC_DIR = ./
|
||||
BUILD_DIR = build
|
||||
OUTPUT_DIR = $(BUILD_DIR)/classes
|
||||
|
||||
JAVAC = $(JDK_HOME)/bin/javac
|
||||
JAR = $(JDK_HOME)/bin/jar
|
||||
|
||||
SRC_FILES = $(shell find $(SRC_DIR) -name '*.java')
|
||||
|
||||
.PHONY: filelist clean cleantmp
|
||||
|
||||
all: wb.jar cleantmp
|
||||
|
||||
wb.jar: filelist
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
$(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @filelist
|
||||
$(JAR) cf wb.jar -C $(OUTPUT_DIR) .
|
||||
@rm -rf $(OUTPUT_DIR)
|
||||
|
||||
filelist: $(SRC_FILES)
|
||||
@rm -f $@
|
||||
@echo $(SRC_FILES) > $@
|
||||
|
||||
clean: cleantmp
|
||||
@rm -rf wb.jar
|
||||
|
||||
cleantmp:
|
||||
@rm -rf filelist
|
||||
@rm -rf $(BUILD_DIR)
|
@ -228,3 +228,4 @@ b1ceab582fc6d795b20aaa8a3fde2eba34af9399 jdk8-b103
|
||||
a22fe9bd01e6c7e7ddc7995dfc9471711692b8d1 jdk8-b104
|
||||
09a46ec11f880154886c70be03aff5ab2ddf0ab7 jdk8-b105
|
||||
d3be8e3b429df917e72c1c23e7920c651219b587 jdk8-b106
|
||||
d6a32e3831aab20a9a3bc78cdc0a60aaad725c6c jdk8-b107
|
||||
|
@ -228,3 +228,4 @@ b1fb4612a2caea52b5661b87509e560fa044b194 jdk8-b98
|
||||
42211ab0ab1cca51a050d184634cf1db7ef81fbf jdk8-b104
|
||||
88390df7ed2cf128298a02c5e6d978f0a603cd58 jdk8-b105
|
||||
6908370afe834ff01739e8ec992d4246c74b7e6e jdk8-b106
|
||||
e3c9328f75638289a342ce15fbe532f05078946e jdk8-b107
|
||||
|
@ -228,3 +228,4 @@ e0f6039c0290b7381042a6fec3100a69a5a67e37 jdk8-b103
|
||||
f1d8d15bfcb5ada858a942f8a31f6598f23214d1 jdk8-b104
|
||||
1fe211ae3d2b8cc2dfc4f58d9a6eb96418679672 jdk8-b105
|
||||
c817276bd870dfe1dcc3a3dbbc092436b6907f75 jdk8-b106
|
||||
eea685b9ccaa1980e0a7e07d6a3a84bcc7e9ab82 jdk8-b107
|
||||
|
@ -99,7 +99,6 @@ COMPILER_PATH.desc = Compiler install directory
|
||||
CACERTS_FILE.desc = Location of certificates file
|
||||
DEVTOOLS_PATH.desc = Directory containing zip and unzip
|
||||
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
|
||||
DXSDK_PATH.desc = Root directory of DirectX SDK
|
||||
|
||||
# Make variables to print out (description and value)
|
||||
VARIABLE_PRINTVAL_LIST += \
|
||||
@ -128,17 +127,6 @@ VARIABLE_CHECKDIR_LIST += \
|
||||
VARIABLE_CHECKFIL_LIST += \
|
||||
CACERTS_FILE
|
||||
|
||||
# Some are windows specific
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
||||
VARIABLE_PRINTVAL_LIST += \
|
||||
DXSDK_PATH
|
||||
|
||||
VARIABLE_CHECKDIR_LIST += \
|
||||
DXSDK_PATH
|
||||
|
||||
endif
|
||||
|
||||
# For pattern rules below, so all are treated the same
|
||||
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
|
||||
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
|
||||
|
@ -397,12 +397,10 @@ else
|
||||
INCLUDE_SA = true
|
||||
endif
|
||||
|
||||
ifdef CROSS_COMPILE_ARCH
|
||||
# X11 headers are not under /usr/include
|
||||
OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
|
||||
OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
|
||||
OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
|
||||
endif
|
||||
# X11 headers are not under /usr/include
|
||||
OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
|
||||
OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
|
||||
OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
|
||||
|
||||
LIB_LOCATION ?= $(LIBDIR)
|
||||
|
||||
|
@ -78,8 +78,6 @@ ifeq ($(COMPILER_VERSION), VS2010)
|
||||
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
|
||||
endif
|
||||
|
||||
EXTRA_LFLAGS += -LIBPATH:$(DXSDK_LIB_PATH)
|
||||
|
||||
# Full Debug Symbols has been enabled on Windows since JDK1.4.1.
|
||||
# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
|
||||
# enabled with debug info files ZIP'ed to save space. For VARIANT !=
|
||||
|
@ -65,7 +65,6 @@ sanity-base: pre-sanity \
|
||||
sane-libCrun \
|
||||
sane-unixccs_path \
|
||||
sane-msdevtools_path \
|
||||
sane-dxsdk \
|
||||
sane-compiler \
|
||||
sane-cacerts \
|
||||
sane-ant_version \
|
||||
|
@ -74,9 +74,6 @@ endif
|
||||
# REQUIRED_CYGWIN_VER
|
||||
# Windows only: If CYGWIN is used, the minimum CYGWIN version.
|
||||
#
|
||||
# REQUIRED_DXSDK_VER
|
||||
# Windows only: The version of DirectX SDK expected.
|
||||
#
|
||||
# REQUIRED_FREETYPE_VERSION
|
||||
# If we are using freetype, the freetype version expected.
|
||||
#
|
||||
@ -193,7 +190,6 @@ ifeq ($(PLATFORM), windows)
|
||||
REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
|
||||
REQUIRED_CYGWIN_VER = 4.0
|
||||
REQUIRED_MKS_VER = 6.1
|
||||
REQUIRED_DXSDK_VER = 0x0900
|
||||
ifeq ($(CC_VERSION),msvc)
|
||||
REQUIRED_COMPILER_NAME = Visual Studio 10
|
||||
REQUIRED_COMPILER_VERSION = VS2010
|
||||
|
@ -79,7 +79,7 @@ override INCREMENTAL_BUILD = false
|
||||
# The ALT values should never really have spaces or use \.
|
||||
# Suspect these environment variables to have spaces and/or \ characters:
|
||||
# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
|
||||
# DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS,
|
||||
# MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS,
|
||||
# MSVCDIR, MSVCDir.
|
||||
# So use $(subst \,/,) on them first adding quotes and placing them in
|
||||
# their own variable assigned with :=, then use FullPath.
|
||||
@ -255,18 +255,6 @@ ifneq ($(word 1,$(_program_files)),$(_program_files))
|
||||
_program_files:=
|
||||
endif
|
||||
|
||||
# DirectX SDK
|
||||
ifdef ALT_DXSDK_DRIVE
|
||||
_dx_sdk_dir =$(ALT_DXSDK_DRIVE):/DXSDK
|
||||
else
|
||||
ifdef DXSDK_DIR
|
||||
xDXSDK_DIR :="$(subst \,/,$(DXSDK_DIR))"
|
||||
else
|
||||
xDXSDK_DIR :="$(_system_drive)/DXSDK"
|
||||
endif
|
||||
_dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
|
||||
endif
|
||||
|
||||
# Use of the Visual Studio compilers requires certain env variables be set:
|
||||
# PATH should include the path to cl.exe
|
||||
# INCLUDE should be defined
|
||||
@ -489,39 +477,6 @@ ifeq ($(_NEEDS_MSVCRNN), true)
|
||||
MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
|
||||
endif
|
||||
|
||||
# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
|
||||
ifdef ALT_DXSDK_PATH
|
||||
xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
|
||||
DXSDK_PATH :=$(call FullPath,$(xALT_DXSDK_PATH))
|
||||
else
|
||||
_DXSDK_PATH1 :=$(_dx_sdk_dir)
|
||||
_DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
|
||||
DXSDK_PATH :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
|
||||
endif
|
||||
DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
|
||||
DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
|
||||
|
||||
# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
|
||||
ifdef ALT_DXSDK_INCLUDE_PATH
|
||||
xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
|
||||
DXSDK_INCLUDE_PATH :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
|
||||
else
|
||||
DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
|
||||
endif
|
||||
|
||||
# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
|
||||
ifdef ALT_DXSDK_LIB_PATH
|
||||
xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
|
||||
DXSDK_LIB_PATH :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
|
||||
else
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
# 64bit libs are located in "Lib/x64" subdir
|
||||
DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
|
||||
else
|
||||
DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
|
||||
endif
|
||||
endif
|
||||
|
||||
# DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
|
||||
ifdef ALT_DEPLOY_MSSDK
|
||||
xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
|
||||
|
@ -234,10 +234,6 @@ endif
|
||||
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH)
|
||||
ifeq ($(PLATFORM),windows)
|
||||
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH)
|
||||
ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER)
|
||||
ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH)
|
||||
ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH)
|
||||
ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH)
|
||||
ALL_SETTINGS+=$(call addAltSetting,WINDOWSSDKDIR)
|
||||
ALL_SETTINGS+=$(call addRequiredSetting,RC)
|
||||
ALL_SETTINGS+=$(call addRequiredSetting,REBASE)
|
||||
|
@ -143,8 +143,6 @@ ifeq ($(PLATFORM), windows)
|
||||
_CYGWIN_VER := $(SYSTEM_UNAME)
|
||||
CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
|
||||
endif
|
||||
DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \
|
||||
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
|
||||
endif
|
||||
|
||||
# Get the version numbers of what we are using
|
||||
@ -1300,51 +1298,6 @@ sane-unzip_version:
|
||||
"" >> $(WARNING_FILE) ; \
|
||||
fi
|
||||
|
||||
######################################################
|
||||
# Check for windows DirectX sdk directory
|
||||
######################################################
|
||||
sane-dxsdk:
|
||||
ifeq ($(PLATFORM), windows)
|
||||
@if [ ! -r $(DXSDK_INCLUDE_PATH)/d3d9.h ]; then \
|
||||
$(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \
|
||||
" The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \
|
||||
" Please check your access to \n" \
|
||||
" $(DXSDK_INCLUDE_PATH) \n" \
|
||||
" and/or check your value of ALT_DXSDK_PATH or ALT_DXSDK_INCLUDE_PATH.\n" \
|
||||
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
|
||||
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
||||
" Or http://www.microsoft.com/directx\n" \
|
||||
"" >> $(ERROR_FILE) ; \
|
||||
else \
|
||||
if [ ! "$(DXSDK_VER)" = "$(REQUIRED_DXSDK_VER)" ]; then \
|
||||
$(ECHO) "ERROR: The DirectX SDK must be version $(REQUIRED_DXSDK_VER).\n" \
|
||||
" $(YOU_ARE_USING) DirectX SDK version: $(DXSDK_VER)\n" \
|
||||
" The DirectX SDK was obtained from the following location: \n" \
|
||||
" $(DXSDK_PATH) \n" \
|
||||
" Please change your DirectX SDK. \n" \
|
||||
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
|
||||
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
||||
" Or http://www.microsoft.com/directx\n" \
|
||||
"" >> $(ERROR_FILE) ; \
|
||||
else \
|
||||
if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \
|
||||
if [ `$(EGREP) -c __int3264 $(DXSDK_INCLUDE_PATH)/basetsd.h` -ne 0 ]; then \
|
||||
$(ECHO) "WARNING: The DirectX SDK Include directory contains a newer basetsd.h,\n" \
|
||||
" which may indicate that you're using an incorrect version of DirectX SDK.\n" \
|
||||
" This may result in a build failure.\n" \
|
||||
" The DirectX SDK Include dir was obtained from the following location:\n" \
|
||||
" $(DXSDK_INCLUDE_PATH) \n" \
|
||||
" Please change your DirectX SDK to version 9 (Summer 2004 Update or newer).\n" \
|
||||
" Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
|
||||
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
||||
" Or http://www.microsoft.com/directx\n" \
|
||||
"" >> $(WARNING_FILE) ; \
|
||||
fi \
|
||||
fi \
|
||||
fi \
|
||||
fi
|
||||
endif
|
||||
|
||||
######################################################
|
||||
# Check the linker version(s)
|
||||
######################################################
|
||||
|
@ -105,6 +105,7 @@ FILES_java += java/util/prefs/MacOSXPreferences.java \
|
||||
java/util/prefs/MacOSXPreferencesFactory.java
|
||||
|
||||
CFLAGS_$(VARIANT)/java_props_md.o = -Os -x objective-c
|
||||
CFLAGS_$(VARIANT)/java_props_macosx.o = -Os -x objective-c
|
||||
endif
|
||||
|
||||
#
|
||||
|
@ -38,31 +38,31 @@ FILES_compiled_properties_orig := $(FILES_compiled_properties)
|
||||
# only FILES_java and FILES_compiled_properties variables will be picked up
|
||||
#
|
||||
# $(BUILDDIR)/java/util/FILES_java.gmk & $(BUILDDIR)/java/util/FILES_properties.gmk
|
||||
# contain "sun.util.resources" for US language support
|
||||
# contain "sun.util.resources" for EN language support
|
||||
|
||||
include $(BUILDDIR)/java/util/FILES_java.gmk
|
||||
include $(BUILDDIR)/java/util/FILES_properties.gmk
|
||||
|
||||
US_Resources_java := $(FILES_java)
|
||||
US_Resources_properties := $(FILES_compiled_properties)
|
||||
EN_Resources_java := $(FILES_java)
|
||||
EN_Resources_properties := $(FILES_compiled_properties)
|
||||
|
||||
# $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for
|
||||
# US language support
|
||||
# EN language support
|
||||
|
||||
include $(BUILDDIR)/java/text/base/FILES_java.gmk
|
||||
|
||||
US_Resources_java += $(FILES_java)
|
||||
EN_Resources_java += $(FILES_java)
|
||||
|
||||
FILES_compiled_properties=
|
||||
|
||||
# $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk
|
||||
# contain both resources for Non-US language support
|
||||
# contain both resources for Non-EN language support
|
||||
|
||||
include $(BUILDDIR)/sun/text/FILES_java.gmk
|
||||
include $(BUILDDIR)/sun/text/FILES_properties.gmk
|
||||
|
||||
NonUS_Resources_java := $(FILES_java)
|
||||
NonUS_Resources_properties := $(FILES_compiled_properties)
|
||||
NonEN_Resources_java := $(FILES_java)
|
||||
NonEN_Resources_properties := $(FILES_compiled_properties)
|
||||
|
||||
# Restore the orignal FILES_java & FILES_compiled_properties variables
|
||||
FILES_java := $(FILES_java_orig)
|
||||
@ -80,30 +80,30 @@ RESOURCE_NAMES="FormatData CollationData TimeZoneNames LocaleNames CurrencyNames
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
|
||||
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
|
||||
@$(RM) $@.tmp.us $@.tmp.nonus;
|
||||
@$(RM) $@.tmp.en $@.tmp.nonen;
|
||||
@$(prep-target)
|
||||
@$(ECHO) $(US_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.us;
|
||||
@$(ECHO) $(US_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.us;
|
||||
@$(ECHO) $(NonUS_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonus;
|
||||
@$(ECHO) $(NonUS_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonus;
|
||||
@$(ECHO) $(EN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.en;
|
||||
@$(ECHO) $(EN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.en;
|
||||
@$(ECHO) $(NonEN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonen;
|
||||
@$(ECHO) $(NonEN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonen;
|
||||
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
|
||||
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
|
||||
$@.tmp.nonus $< $@
|
||||
@$(RM) $@.tmp.us $@.tmp.nonus;
|
||||
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.en \
|
||||
$@.tmp.nonen $< $@
|
||||
@$(RM) $@.tmp.en $@.tmp.nonen;
|
||||
|
||||
else
|
||||
|
||||
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
|
||||
@$(RM) $@.tmp.us $@.tmp.nonus;
|
||||
@$(RM) $@.tmp.en $@.tmp.nonen;
|
||||
@$(prep-target)
|
||||
@$(ECHO) $(subst .properties,'\n',$(US_Resources_properties)) > $@.tmp.us;
|
||||
@$(ECHO) $(subst .java,'\n',$(US_Resources_java)) >> $@.tmp.us;
|
||||
@$(ECHO) $(subst .properties,'\n',$(NonUS_Resources_properties)) > $@.tmp.nonus;
|
||||
@$(ECHO) $(subst .java,'\n',$(NonUS_Resources_java)) >> $@.tmp.nonus;
|
||||
@$(ECHO) $(subst .properties,'\n',$(EN_Resources_properties)) > $@.tmp.en;
|
||||
@$(ECHO) $(subst .java,'\n',$(EN_Resources_java)) >> $@.tmp.en;
|
||||
@$(ECHO) $(subst .properties,'\n',$(NonEN_Resources_properties)) > $@.tmp.nonen;
|
||||
@$(ECHO) $(subst .java,'\n',$(NonEN_Resources_java)) >> $@.tmp.nonen;
|
||||
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
|
||||
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
|
||||
$@.tmp.nonus $< $@
|
||||
@$(RM) $@.tmp.us $@.tmp.nonus;
|
||||
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.en \
|
||||
$@.tmp.nonen $< $@
|
||||
@$(RM) $@.tmp.en $@.tmp.nonen;
|
||||
endif
|
||||
|
||||
genlocales : $(LocaleDataMetaInfo_Dest)
|
||||
|
@ -35,11 +35,11 @@
|
||||
# A list of resource base name list;
|
||||
RESOURCE_NAMES=$1
|
||||
|
||||
# A list of US resources;
|
||||
US_FILES_LIST=$2
|
||||
# A list of EN resources;
|
||||
EN_FILES_LIST=$2
|
||||
|
||||
# A list of non-US resources;
|
||||
NONUS_FILES_LIST=$3
|
||||
# A list of non-EN resources;
|
||||
NONEN_FILES_LIST=$3
|
||||
|
||||
INPUT_FILE=$4
|
||||
OUTPUT_FILE=$5
|
||||
@ -53,23 +53,23 @@ getlocalelist() {
|
||||
sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" "
|
||||
|
||||
# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
|
||||
nonusall=" ja-JP-JP th-TH-TH "
|
||||
nonenall=" ja-JP-JP th-TH-TH "
|
||||
|
||||
for FILE in $RESOURCE_NAMES
|
||||
do
|
||||
getlocalelist $FILE $US_FILES_LIST
|
||||
sed_script=$sed_script"-e \"s@#"$FILE"_USLocales#@$localelist@g\" "
|
||||
usall=$usall" "$localelist
|
||||
getlocalelist $FILE $NONUS_FILES_LIST
|
||||
sed_script=$sed_script"-e \"s@#"$FILE"_NonUSLocales#@$localelist@g\" "
|
||||
nonusall=$nonusall" "$localelist
|
||||
getlocalelist $FILE $EN_FILES_LIST
|
||||
sed_script=$sed_script"-e \"s@#"$FILE"_ENLocales#@$localelist@g\" "
|
||||
enall=$enall" "$localelist
|
||||
getlocalelist $FILE $NONEN_FILES_LIST
|
||||
sed_script=$sed_script"-e \"s@#"$FILE"_NonENLocales#@$localelist@g\" "
|
||||
nonenall=$nonenall" "$localelist
|
||||
done
|
||||
|
||||
usall=`(for LOC in $usall; do echo $LOC;done) |$SORT -u`
|
||||
nonusall=`(for LOC in $nonusall; do echo $LOC;done) |$SORT -u`
|
||||
enall=`(for LOC in $enall; do echo $LOC;done) |$SORT -u`
|
||||
nonenall=`(for LOC in $nonenall; do echo $LOC;done) |$SORT -u`
|
||||
|
||||
sed_script=$sed_script"-e \"s@#AvailableLocales_USLocales#@$usall@g\" "
|
||||
sed_script=$sed_script"-e \"s@#AvailableLocales_NonUSLocales#@$nonusall@g\" "
|
||||
sed_script=$sed_script"-e \"s@#AvailableLocales_ENLocales#@$enall@g\" "
|
||||
sed_script=$sed_script"-e \"s@#AvailableLocales_NonENLocales#@$nonenall@g\" "
|
||||
|
||||
sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
|
||||
eval $sed_script
|
||||
|
@ -107,5 +107,17 @@ FILES_java = \
|
||||
sun/text/resources/FormatData.java \
|
||||
sun/text/resources/JavaTimeSupplementary.java \
|
||||
sun/text/resources/en/FormatData_en.java \
|
||||
sun/text/resources/en/FormatData_en_AU.java \
|
||||
sun/text/resources/en/FormatData_en_CA.java \
|
||||
sun/text/resources/en/FormatData_en_GB.java \
|
||||
sun/text/resources/en/FormatData_en_IE.java \
|
||||
sun/text/resources/en/FormatData_en_IN.java \
|
||||
sun/text/resources/en/FormatData_en_MT.java \
|
||||
sun/text/resources/en/FormatData_en_NZ.java \
|
||||
sun/text/resources/en/FormatData_en_PH.java \
|
||||
sun/text/resources/en/FormatData_en_SG.java \
|
||||
sun/text/resources/en/FormatData_en_US.java \
|
||||
sun/text/resources/en/FormatData_en_ZA.java \
|
||||
sun/text/resources/en/JavaTimeSupplementary_en.java \
|
||||
sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
|
||||
sun/text/resources/en/JavaTimeSupplementary_en_SG.java
|
||||
|
@ -30,4 +30,7 @@ FILES_java = \
|
||||
sun/util/resources/LocaleNamesBundle.java \
|
||||
sun/util/resources/TimeZoneNamesBundle.java \
|
||||
sun/util/resources/TimeZoneNames.java \
|
||||
sun/util/resources/en/TimeZoneNames_en.java
|
||||
sun/util/resources/en/TimeZoneNames_en.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_CA.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_GB.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_IE.java
|
||||
|
@ -26,9 +26,25 @@
|
||||
FILES_compiled_properties = \
|
||||
sun/util/resources/LocaleNames.properties \
|
||||
sun/util/resources/en/LocaleNames_en.properties \
|
||||
sun/util/resources/en/LocaleNames_en_MT.properties \
|
||||
sun/util/resources/en/LocaleNames_en_PH.properties \
|
||||
sun/util/resources/en/LocaleNames_en_SG.properties \
|
||||
\
|
||||
sun/util/resources/CalendarData.properties \
|
||||
sun/util/resources/en/CalendarData_en.properties \
|
||||
sun/util/resources/en/CalendarData_en_GB.properties \
|
||||
sun/util/resources/en/CalendarData_en_IE.properties \
|
||||
sun/util/resources/en/CalendarData_en_MT.properties \
|
||||
\
|
||||
sun/util/resources/CurrencyNames.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_US.properties
|
||||
sun/util/resources/en/CurrencyNames_en_AU.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_CA.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_GB.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_IE.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_IN.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_MT.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_NZ.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_PH.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_SG.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_US.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_ZA.properties
|
||||
|
@ -55,8 +55,7 @@ FILES_export = \
|
||||
LDLIBS += dsound.lib winmm.lib user32.lib ole32.lib
|
||||
CPPFLAGS += \
|
||||
-DUSE_DAUDIO=TRUE \
|
||||
-I$(SHARE_SRC)/native/com/sun/media/sound \
|
||||
-I$(DXSDK_INCLUDE_PATH)
|
||||
-I$(SHARE_SRC)/native/com/sun/media/sound
|
||||
|
||||
#
|
||||
# Add to the ambient VPATH.
|
||||
|
@ -80,7 +80,6 @@
|
||||
# ALT_BOOTDIR
|
||||
# Windows Only:
|
||||
# ALT_UNIXCOMMAND_PATH
|
||||
# ALT_DXSDK_PATH
|
||||
# ALT_MSVCRNN_DLL_PATH
|
||||
#
|
||||
#############################################################################
|
||||
|
@ -39,7 +39,6 @@ Here are the steps:
|
||||
(on Windows):
|
||||
#>env | grep ALT
|
||||
ALT_JDK_IMPORT_PATH=c:/devtools/java/jdk1.7.0
|
||||
ALT_DXSDK_PATH=c:/devtools/DirectX/DXSDK_Dec06
|
||||
ALT_BOOTDIR=c:/DevTools/java/jdk1.6.0
|
||||
|
||||
If your build is a FASTDEBUG build, don't forget
|
||||
@ -50,7 +49,6 @@ Here are the steps:
|
||||
accordingly:
|
||||
make.options=\
|
||||
ALT_JDK_IMPORT_PATH=c:/devtools/java/jdk1.7.0 \
|
||||
ALT_DXSDK_PATH=c:/devtools/DirectX/DXSDK_Dec06 \
|
||||
ALT_BOOTDIR=c:/DevTools/java/jdk1.6.0 \
|
||||
FASTDEBUG=true
|
||||
make=c:/devtools/cygwin/bin/make
|
||||
@ -175,7 +173,6 @@ Notes on using CND (C/C++ pack) with this project and NetBeans.
|
||||
../../build/windows-i586/tmp/sun/sun.awt/splashscreen/CClassHeaders;
|
||||
../../build/windows-i586/tmp/sun/sun.font/fontmanager/CClassHeaders;
|
||||
../../build/windows-i586/tmp/sun/sun.font/t2k/CClassHeaders;
|
||||
C:/DevTools/DirectX/DXSDK_Dec06/Include;
|
||||
C:/devtools/VS2003/SDK/v1.1/include;
|
||||
C:/devtools/VS2003/VC7/ATLMFC/INCLUDE;
|
||||
C:/devtools/VS2003/VC7/INCLUDE;
|
||||
@ -188,7 +185,7 @@ Notes on using CND (C/C++ pack) with this project and NetBeans.
|
||||
Note that most paths are relative to the native project directory -
|
||||
this helps if you decide to relocate the workspace later. The ones that
|
||||
aren't relative are paths to external include directories, like those
|
||||
of the Platform SDK, DirectX SDK.
|
||||
of the Platform SDK.
|
||||
On Unix platforms these may be directories like /usr/include.
|
||||
|
||||
The parser must know some defines to correctly parse the source files,
|
||||
|
@ -564,7 +564,6 @@ OTHER_INCLUDES += -I$(CLASSHDRDIR)/../../java/jvm \
|
||||
-I$(OBJDIR) \
|
||||
-I$(SHARE_SRC)/native/common \
|
||||
-I$(WINAWT_native) \
|
||||
-I$(DXSDK_INCLUDE_PATH) \
|
||||
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
|
||||
-I$(SHARE_SRC)/native/sun/awt/image \
|
||||
-I$(SHARE_SRC)/native/sun/java2d/loops \
|
||||
|
@ -28,9 +28,8 @@
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_freeProfileNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_getProfileSize;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_getProfileData;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_getTagNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative;
|
||||
Java_sun_java2d_cmm_lcms_LCMS_colorConvert;
|
||||
|
@ -69,7 +69,6 @@ OTHER_CXXFLAGS += $(GX_OPTION) -DUNICODE -D_UNICODE
|
||||
# Other extra flags needed for compiling.
|
||||
#
|
||||
CPPFLAGS += -I$(SHARE_SRC)/native/common \
|
||||
-I$(DXSDK_INCLUDE_PATH) \
|
||||
-I$(PLATFORM_SRC)/native/sun/windows \
|
||||
-I$(CLASSHDRDIR)/../../awt/CClassHeaders \
|
||||
-I$(SHARE_SRC)/native/sun/awt/debug \
|
||||
|
@ -96,16 +96,6 @@ FILES_java = \
|
||||
sun/text/resources/el/FormatData_el.java \
|
||||
sun/text/resources/el/FormatData_el_CY.java \
|
||||
sun/text/resources/el/FormatData_el_GR.java \
|
||||
sun/text/resources/en/FormatData_en_AU.java \
|
||||
sun/text/resources/en/FormatData_en_CA.java \
|
||||
sun/text/resources/en/FormatData_en_GB.java \
|
||||
sun/text/resources/en/FormatData_en_IE.java \
|
||||
sun/text/resources/en/FormatData_en_IN.java \
|
||||
sun/text/resources/en/FormatData_en_MT.java \
|
||||
sun/text/resources/en/FormatData_en_NZ.java \
|
||||
sun/text/resources/en/FormatData_en_PH.java \
|
||||
sun/text/resources/en/FormatData_en_SG.java \
|
||||
sun/text/resources/en/FormatData_en_ZA.java \
|
||||
sun/text/resources/es/FormatData_es.java \
|
||||
sun/text/resources/es/FormatData_es_BO.java \
|
||||
sun/text/resources/es/FormatData_es_AR.java \
|
||||
@ -214,9 +204,6 @@ FILES_java = \
|
||||
sun/util/resources/zh/CurrencyNames_zh_SG.java \
|
||||
sun/util/resources/zh/LocaleNames_zh_HK.java \
|
||||
sun/util/resources/de/TimeZoneNames_de.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_CA.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_GB.java \
|
||||
sun/util/resources/en/TimeZoneNames_en_IE.java \
|
||||
sun/util/resources/es/TimeZoneNames_es.java \
|
||||
sun/util/resources/fr/TimeZoneNames_fr.java \
|
||||
sun/util/resources/hi/TimeZoneNames_hi.java \
|
||||
@ -237,8 +224,6 @@ FILES_java = \
|
||||
sun/text/resources/da/JavaTimeSupplementary_da.java \
|
||||
sun/text/resources/de/JavaTimeSupplementary_de.java \
|
||||
sun/text/resources/el/JavaTimeSupplementary_el.java \
|
||||
sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
|
||||
sun/text/resources/en/JavaTimeSupplementary_en_SG.java \
|
||||
sun/text/resources/es/JavaTimeSupplementary_es.java \
|
||||
sun/text/resources/et/JavaTimeSupplementary_et.java \
|
||||
sun/text/resources/fi/JavaTimeSupplementary_fi.java \
|
||||
|
@ -33,9 +33,6 @@ FILES_compiled_properties = \
|
||||
sun/util/resources/de/LocaleNames_de.properties \
|
||||
sun/util/resources/el/LocaleNames_el.properties \
|
||||
sun/util/resources/el/LocaleNames_el_CY.properties \
|
||||
sun/util/resources/en/LocaleNames_en_MT.properties \
|
||||
sun/util/resources/en/LocaleNames_en_PH.properties \
|
||||
sun/util/resources/en/LocaleNames_en_SG.properties \
|
||||
sun/util/resources/es/LocaleNames_es.properties \
|
||||
sun/util/resources/es/LocaleNames_es_US.properties \
|
||||
sun/util/resources/et/LocaleNames_et.properties \
|
||||
@ -88,9 +85,6 @@ FILES_compiled_properties = \
|
||||
sun/util/resources/de/CalendarData_de.properties \
|
||||
sun/util/resources/el/CalendarData_el.properties \
|
||||
sun/util/resources/el/CalendarData_el_CY.properties \
|
||||
sun/util/resources/en/CalendarData_en_GB.properties \
|
||||
sun/util/resources/en/CalendarData_en_IE.properties \
|
||||
sun/util/resources/en/CalendarData_en_MT.properties \
|
||||
sun/util/resources/es/CalendarData_es.properties \
|
||||
sun/util/resources/es/CalendarData_es_ES.properties \
|
||||
sun/util/resources/es/CalendarData_es_US.properties \
|
||||
@ -164,16 +158,6 @@ FILES_compiled_properties = \
|
||||
sun/util/resources/de/CurrencyNames_de_LU.properties \
|
||||
sun/util/resources/el/CurrencyNames_el_CY.properties \
|
||||
sun/util/resources/el/CurrencyNames_el_GR.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_AU.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_CA.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_GB.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_IE.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_IN.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_MT.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_NZ.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_PH.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_SG.properties \
|
||||
sun/util/resources/en/CurrencyNames_en_ZA.properties \
|
||||
sun/util/resources/es/CurrencyNames_es.properties \
|
||||
sun/util/resources/es/CurrencyNames_es_AR.properties \
|
||||
sun/util/resources/es/CurrencyNames_es_BO.properties \
|
||||
|
@ -11,7 +11,7 @@ public class CharacterName {
|
||||
FileReader reader = null;
|
||||
try {
|
||||
if (args.length != 2) {
|
||||
System.err.println("Usage: java CharacterName UniocdeData.txt uniName.dat");
|
||||
System.err.println("Usage: java CharacterName UnicodeData.txt uniName.dat");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,7 @@ ifneq ($(OPENJDK_TARGET_OS),macosx)
|
||||
LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
|
||||
else
|
||||
BUILD_LIBJAVA_java_props_md.c_CFLAGS:=-x objective-c
|
||||
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS:=-x objective-c
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),windows)
|
||||
@ -252,6 +253,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA,\
|
||||
LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
|
||||
LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
|
||||
-framework CoreFoundation \
|
||||
-framework Foundation \
|
||||
-framework Security -framework SystemConfiguration, \
|
||||
LDFLAGS_SUFFIX_windows:=-export:winFileHandleOpen -export:handleLseek \
|
||||
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
|
||||
@ -472,7 +474,6 @@ ifeq ($(OPENJDK_TARGET_OS),windows)
|
||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
|
||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
|
||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
|
||||
LIBAWT_CFLAGS+=-I$(DXSDK_INCLUDE_PATH)
|
||||
else
|
||||
LIBAWT_DIRS+=\
|
||||
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
|
||||
@ -1482,8 +1483,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/java2d \
|
||||
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
|
||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
|
||||
-I$(DXSDK_INCLUDE_PATH), \
|
||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
|
||||
LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
|
||||
advapi32.lib $(WIN_AWT_LIB),\
|
||||
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
|
||||
@ -2961,8 +2961,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS,\
|
||||
OPTIMIZATION:=LOW, \
|
||||
CFLAGS:=$(CFLAGS_JDKLIB) \
|
||||
$(LIBJSOUND_CFLAGS) \
|
||||
-DUSE_DAUDIO=TRUE \
|
||||
-I$(DXSDK_INCLUDE_PATH), \
|
||||
-DUSE_DAUDIO=TRUE, \
|
||||
LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN),\
|
||||
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
|
||||
|
@ -80,39 +80,6 @@ LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in
|
||||
LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
|
||||
$(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
|
||||
|
||||
# For non-US English locale data
|
||||
|
||||
LOCALEDATA_INCLUDES += \
|
||||
sun/text/resources/en/FormatData_en_AU.class \
|
||||
sun/text/resources/en/FormatData_en_CA.class \
|
||||
sun/text/resources/en/FormatData_en_GB.class \
|
||||
sun/text/resources/en/FormatData_en_IE.class \
|
||||
sun/text/resources/en/FormatData_en_IN.class \
|
||||
sun/text/resources/en/FormatData_en_MT.class \
|
||||
sun/text/resources/en/FormatData_en_NZ.class \
|
||||
sun/text/resources/en/FormatData_en_PH.class \
|
||||
sun/text/resources/en/FormatData_en_SG.class \
|
||||
sun/text/resources/en/FormatData_en_ZA.class \
|
||||
sun/util/resources/en/CalendarData_en_GB.class \
|
||||
sun/util/resources/en/CalendarData_en_IE.class \
|
||||
sun/util/resources/en/CalendarData_en_MT.class \
|
||||
sun/util/resources/en/CurrencyNames_en_AU.class \
|
||||
sun/util/resources/en/CurrencyNames_en_CA.class \
|
||||
sun/util/resources/en/CurrencyNames_en_GB.class \
|
||||
sun/util/resources/en/CurrencyNames_en_IE.class \
|
||||
sun/util/resources/en/CurrencyNames_en_IN.class \
|
||||
sun/util/resources/en/CurrencyNames_en_MT.class \
|
||||
sun/util/resources/en/CurrencyNames_en_NZ.class \
|
||||
sun/util/resources/en/CurrencyNames_en_PH.class \
|
||||
sun/util/resources/en/CurrencyNames_en_SG.class \
|
||||
sun/util/resources/en/CurrencyNames_en_ZA.class \
|
||||
sun/util/resources/en/LocaleNames_en_MT.class \
|
||||
sun/util/resources/en/LocaleNames_en_PH.class \
|
||||
sun/util/resources/en/LocaleNames_en_SG.class \
|
||||
sun/util/resources/en/TimeZoneNames_en_CA.class \
|
||||
sun/util/resources/en/TimeZoneNames_en_GB.class \
|
||||
sun/util/resources/en/TimeZoneNames_en_IE.class
|
||||
|
||||
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
|
||||
SRCS:=$(JDK_OUTPUTDIR)/classes,\
|
||||
SUFFIXES:=.class _dict _th,\
|
||||
|
@ -50,27 +50,27 @@ ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
|
||||
$(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
|
||||
endif
|
||||
|
||||
# The US locales
|
||||
US_LOCALES:=en en-US
|
||||
# The EN locales
|
||||
EN_LOCALES:=en%
|
||||
|
||||
# ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
|
||||
ALL_NON_US_LOCALES:=ja-JP-JP th-TH-TH
|
||||
ALL_NON_EN_LOCALES:=ja-JP-JP th-TH-TH
|
||||
|
||||
SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
|
||||
|
||||
# This macro creates a sed expression that substitues for example:
|
||||
# #FormatData_USLocales# with: en and/or en_US.
|
||||
# #FormatData_ENLocales# with: en% locales.
|
||||
define CaptureLocale
|
||||
$1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
|
||||
$1_US_LOCALES := $$(filter $(US_LOCALES),$$($1_LOCALES))
|
||||
$1_NON_US_LOCALES := $$(filter-out $(US_LOCALES),$$($1_LOCALES))
|
||||
$1_EN_LOCALES := $$(filter $(EN_LOCALES),$$($1_LOCALES))
|
||||
$1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES),$$($1_LOCALES))
|
||||
|
||||
ALL_US_LOCALES += $$($1_US_LOCALES)
|
||||
ALL_NON_US_LOCALES += $$($1_NON_US_LOCALES)
|
||||
ALL_EN_LOCALES += $$($1_EN_LOCALES)
|
||||
ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES)
|
||||
|
||||
# Don't sed in a space if there are no locales.
|
||||
SED_ARGS+= -e 's/$$(HASH)$1_USLocales$$(HASH)/$$(if $$($1_US_LOCALES),$$(SPACE)$$($1_US_LOCALES),)/g'
|
||||
SED_ARGS+= -e 's/$$(HASH)$1_NonUSLocales$$(HASH)/$$(if $$($1_NON_US_LOCALES),$$(SPACE)$$($1_NON_US_LOCALES),)/g'
|
||||
SED_ARGS+= -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g'
|
||||
SED_ARGS+= -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g'
|
||||
endef
|
||||
|
||||
#sun.text.resources.FormatData
|
||||
@ -91,8 +91,8 @@ $(eval $(call CaptureLocale,CurrencyNames))
|
||||
#sun.util.resources.CalendarData
|
||||
$(eval $(call CaptureLocale,CalendarData))
|
||||
|
||||
SED_ARGS+= -e 's/$(HASH)AvailableLocales_USLocales$(HASH)/$(sort $(ALL_US_LOCALES))/g'
|
||||
SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonUSLocales$(HASH)/$(sort $(ALL_NON_US_LOCALES))/g'
|
||||
SED_ARGS+= -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
|
||||
SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
|
||||
|
||||
$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
|
||||
$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,6 +25,10 @@
|
||||
|
||||
DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
|
||||
# To build with all warnings enabled, do the following:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS:=-Xlint:-unchecked,-deprecation,-overrides,classfile,dep-ann,divzero,varargs -Werror
|
||||
|
||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
||||
# boot jdk to generate tools that need to be run with the boot jdk.
|
||||
# Thus we force the target bytecode to 7.
|
||||
@ -41,7 +45,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
|
||||
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS) \
|
||||
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
|
||||
$(GENERATE_JDKBYTECODE_EXTRA_FLAGS),\
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user