# HG changeset patch # User duke # Date 1499267485 -7200 # Node ID 801266d404d8549dcd57a336218471f43384c2d5 # Parent e415207ac256d879d4c94755e0f144fb44800c13# Parent 8edf6e6c291a90a2bf1c7bf35cf464b5c399ba6c Merge diff -r e415207ac256 -r 801266d404d8 .hgtags-top-repo --- a/.hgtags-top-repo Wed May 12 17:19:58 2010 -0700 +++ b/.hgtags-top-repo Wed Jul 05 17:11:25 2017 +0200 @@ -66,3 +66,4 @@ 7f1ba4459972bf84b8201dc1cc4f62b1fe1c74f4 jdk7-b89 425ba3efabbfe0b188105c10aaf7c3c8fa8d1a38 jdk7-b90 97d8b6c659c29c8493a8b2b72c2796a021a8cf79 jdk7-b91 +5f5c33d417f3a14706b09a4a95e65fa7b6fa54d6 jdk7-b92 diff -r e415207ac256 -r 801266d404d8 README-builds.html --- a/README-builds.html Wed May 12 17:19:58 2010 -0700 +++ b/README-builds.html Wed Jul 05 17:11:25 2017 +0200 @@ -183,13 +183,13 @@ Windows X86 (32-bit) Windows XP - Microsoft Visual Studio C++ 2008 Standard Edition + Microsoft Visual Studio C++ 2010 Professional Edition JDK 6u14 FCS Windows X64 (64-bit) Windows Server 2003 - Enterprise x64 Edition - Microsoft Platform SDK - April 2005 + Microsoft Visual Studio C++ 2010 Professional Edition JDK 6u14 FCS @@ -789,11 +789,7 @@
  • Install the - Microsoft Visual Studio Compilers (32-bit). -
  • -
  • - Install the - Microsoft Platform SDK. + Microsoft Visual Studio Compilers).
  • Setup all environment variables for compilers @@ -964,13 +960,28 @@ Windows i586: Microsoft Visual Studio Compilers
    +

    +BEGIN WARNING: At this time (Spring/Summer 2010) JDK 7 is starting a transition to +use the newest VS2010 Microsoft compilers. These build instructions are updated +to show where we are going. We have a QA process to go through before +official builds actually use VS2010. So for now, official builds are +still using VS2003. No other compilers are known to build the entire JDK, +including non-open portions. +So for now you should be able to build with either VS2003 or VS2010. +We do not guarantee that VS2008 will work, although there is sufficient +makefile support to make at least basic JDK builds plausible. +Visual Studio 2010 Express compilers are likely to be able to build all the +"open" sources, with only small adjustments, but this has yet to be made +to work. Also we have not yet seen the 7.1 Windows SDK with the 64 bit +compilers. END WARNING. +

    The 32-bit OpenJDK Windows build requires - Microsoft Visual Studio C++ 2008 (VS2008) Standard + Microsoft Visual Studio C++ 2010 (VS2010) Professional Edition compiler. The compiler and other tools are expected to reside in the location defined by the variable - VS90COMNTOOLS which + VS100COMNTOOLS which is set by the Microsoft Visual Studio installer.

    Once the compiler is installed, @@ -982,36 +993,21 @@ prior to building the OpenJDK. The above environment variables MUST be set. + This compiler also contains the Windows SDK v 7.0a, + which is an update to the Windows 7 SDK.

    WARNING: Make sure you check out the CYGWIN link.exe WARNING. The path /usr/bin must be after the path to the Visual Studio product.

    - Windows: Microsoft Platform SDK + Windows x64: Microsoft Visual Studio Compilers
    - On X64, the Microsoft Platform Software - Development Kit (SDK), April 2005 Edition compiler, - is required for building the OpenJDK - because it contains the C/C++ compiler. - You will need to minimally install the Core SDK and - the MDAC SDK features of this compiler. -

    - Once the Platform SDK is installed, - it is recommended that you run SetEnv.Cmd /X64 - to set the compiler environment variables - MSSDK, - MSTOOLS, - INCLUDE, - LIB, and - PATH - prior to building the - OpenJDK. - The above environment variables MUST be set. -

    - This Platform SDK compiler is only used on X64 builds - but other parts of the Platform SDK may be used - for the X86 builds. + On X64, the set up is much the same in VS2010 + except that you run amd64\VCVARS64.BAT + to set the compiler environment variables. + Previously 64 builds had used the 64 bit compiler in + an unbundled Windows SDK but this is no longer necessary.

    @@ -1314,40 +1310,16 @@ but it's normally found via the DirectX environment variable DXSDK_DIR. - MSVCRT.DLL + MSVCR100.DLL
    - i586 only: - The OpenJDK 32-bit build requires access to a redistributable - MSVCRT.DLL. - If the MSVCRT.DLL is not installed in - the system32 directory set the + The OpenJDK build requires access to a redistributable + MSVCR100.DLL. + This is usually picked up automatically from the redist + directories of Visual Studio 2010. + If this cannot be found set the ALT_MSVCRT_DLL_PATH variable to the location of this file.

    - X64 only: - The OpenJDK 64-bit build requires access to a redistributable - MSVCRT.DLL, which is - usually supplied by the - Platform SDK. - If it is not available from the Platform SDK, - set the - ALT_MSVCRT_DLL_PATH - variable to the location of this file. -

    - MSVCR90.DLL -
    - i586 only: - The - OpenJDK - build requires access to a redistributable - MSVCR90.DLL which should be - supplied by the - Visual Studio product. - If the MSVCR90.DLL is not available from the - Visual Studio product - set the - ALT_MSVCR90_DLL_PATH - variable to the location of this file.
    @@ -1623,11 +1595,10 @@ The location of the MSVCRT.DLL. -
    ALT_MSVCR90_DLL_PATH
    +
    ALT_MSVCRNN_DLL_PATH
    - i586 only: The location of the - MSVCR90.DLL. + MSVCR100.DLL.
    diff -r e415207ac256 -r 801266d404d8 hotspot/.hgtags --- a/hotspot/.hgtags Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/.hgtags Wed Jul 05 17:11:25 2017 +0200 @@ -92,3 +92,4 @@ 605c9707a766ff518cd841fc04f9bb4b36a3a30b jdk7-b90 e0a1a502e402dbe7bf2d9102b4084a7e79a99a9b jdk7-b91 25f53b53aaa3eb8b2d5391a1e8de9a76ae1dd8a2 hs18-b03 +3221d1887d30341bedfdac1dbf365ea41beff20f jdk7-b92 diff -r e415207ac256 -r 801266d404d8 hotspot/make/windows/build_vm_def.sh --- a/hotspot/make/windows/build_vm_def.sh Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/make/windows/build_vm_def.sh Wed Jul 05 17:11:25 2017 +0200 @@ -58,11 +58,11 @@ fi if [ "x$LINK_VER" != "x800" -a "x$LINK_VER" != "x900" ]; then -$DUMPBIN /symbols *.obj | "$GREP" "??_7.*@@6B@" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def +$DUMPBIN /symbols *.obj | "$GREP" "??_7.*@@6B@" | "$GREP" -v "type_info" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def else # Can't use pipes when calling cl.exe or link.exe from IDE. Using transit file vm3.def $DUMPBIN /OUT:vm3.def /symbols *.obj -"$CAT" vm3.def | "$GREP" "??_7.*@@6B@" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def +"$CAT" vm3.def | "$GREP" "??_7.*@@6B@" | "$GREP" -v "type_info" | "$AWK" '{print $7}' | "$SORT" | "$UNIQ" > vm2.def "$RM" -f vm3.def fi diff -r e415207ac256 -r 801266d404d8 hotspot/make/windows/makefiles/compile.make --- a/hotspot/make/windows/makefiles/compile.make Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/make/windows/makefiles/compile.make Wed Jul 05 17:11:25 2017 +0200 @@ -92,6 +92,7 @@ # 1399 is our fake number for the VS2005 compiler that really isn't 1400 # 1400 is for VS2005 # 1500 is for VS2008 +# 1600 is for VS2010 # Do not confuse this MSC_VER with the predefined macro _MSC_VER that the # compiler provides, when MSC_VER==1399, _MSC_VER will be 1400. # Normally they are the same, but a pre-release of the VS2005 compilers @@ -121,6 +122,9 @@ !if "$(MSC_VER)" == "1500" COMPILER_NAME=VS2008 !endif +!if "$(MSC_VER)" == "1600" +COMPILER_NAME=VS2010 +!endif !endif # Add what version of the compiler we think this is to the compile line @@ -183,6 +187,17 @@ MT=mt.exe !endif +!if "$(COMPILER_NAME)" == "VS2010" +PRODUCT_OPT_OPTION = /O2 /Oy- +FASTDEBUG_OPT_OPTION = /O2 /Oy- +DEBUG_OPT_OPTION = /Od +GX_OPTION = /EHsc +LINK_FLAGS = /manifest $(LINK_FLAGS) +# Manifest Tool - used in VS2005 and later to adjust manifests stored +# as resources inside build artifacts. +MT=mt.exe +!endif + # Compile for space above time. !if "$(Variant)" == "kernel" PRODUCT_OPT_OPTION = /O1 /Oy- diff -r e415207ac256 -r 801266d404d8 hotspot/make/windows/makefiles/defs.make --- a/hotspot/make/windows/makefiles/defs.make Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/make/windows/makefiles/defs.make Wed Jul 05 17:11:25 2017 +0200 @@ -55,6 +55,8 @@ MAKE_ARGS += Platform_arch_model=ia64 endif +# http://support.microsoft.com/kb/888731 : this can be either +# AMD64 for AMD, or EM64T for Intel chips. ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),) ARCH_DATA_MODEL=64 PLATFORM=windows-amd64 @@ -67,6 +69,19 @@ MAKE_ARGS += Platform_arch_model=x86_64 endif +# NB later OS versions than 2003 may report "Intel64" +ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) "EM64T\|Intel64"),) + ARCH_DATA_MODEL=64 + PLATFORM=windows-amd64 + VM_PLATFORM=windows_amd64 + HS_ARCH=x86 + MAKE_ARGS += LP64=1 + MAKE_ARGS += ARCH=x86 + MAKE_ARGS += BUILDARCH=amd64 + MAKE_ARGS += Platform_arch=x86 + MAKE_ARGS += Platform_arch_model=x86_64 +endif + JDK_INCLUDE_SUBDIR=win32 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined diff -r e415207ac256 -r 801266d404d8 hotspot/make/windows/makefiles/sanity.make --- a/hotspot/make/windows/makefiles/sanity.make Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/make/windows/makefiles/sanity.make Wed Jul 05 17:11:25 2017 +0200 @@ -27,9 +27,9 @@ all: checkCL checkLink checkCL: - @ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" \ + @ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" if "$(MSC_VER)" NEQ "1600" \ echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection. checkLink: - @ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" if "$(LINK_VER)" NEQ "900" \ + @ if "$(LINK_VER)" NEQ "710" if "$(LINK_VER)" NEQ "800" if "$(LINK_VER)" NEQ "900" if "$(LINK_VER)" NEQ "1000" \ echo *** WARNING *** unrecognized link.exe version $(LINK_VER) ($(RAW_LINK_VER)). Use FORCE_LINK_VER to override automatic detection. diff -r e415207ac256 -r 801266d404d8 hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed Jul 05 17:11:25 2017 +0200 @@ -290,7 +290,7 @@ // Recalculate the region size to make sure it's a power of // 2. This means that region_size is the largest power of 2 that's // <= what we've calculated so far. - region_size = 1 << region_size_log; + region_size = ((uintx)1 << region_size_log); // Now make sure that we don't go over or under our limits. if (region_size < MIN_REGION_SIZE) { diff -r e415207ac256 -r 801266d404d8 hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp --- a/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp Wed May 12 17:19:58 2010 -0700 +++ b/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp Wed Jul 05 17:11:25 2017 +0200 @@ -41,6 +41,26 @@ # pragma optimize ( "", off ) #endif +/* The above workaround now causes more problems with the latest MS compiler. + * Visual Studio 2010's /GS option tries to guard against buffer overruns. + * /GS is on by default if you specify optimizations, which we do globally + * via /W3 /O2. However the above selective turning off of optimizations means + * that /GS issues a warning "4748". And since we treat warnings as errors (/WX) + * then the compilation fails. There are several possible solutions + * (1) Remove that pragma above as obsolete with VS2010 - requires testing. + * (2) Stop treating warnings as errors - would be a backward step + * (3) Disable /GS - may help performance but you lose the security checks + * (4) Disable the warning with "#pragma warning( disable : 4748 )" + * (5) Disable planting the code with __declspec(safebuffers) + * I've opted for (5) although we should investigate the local performance + * benefits of (1) and global performance benefit of (3). + */ +#if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1600)) +#define SAFEBUF __declspec(safebuffers) +#else +#define SAFEBUF +#endif + #include // VM_LITTLE_ENDIAN is #defined appropriately in the Makefiles @@ -235,7 +255,7 @@ two24B = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ -static int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2) { +static SAFEBUF int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2) { int jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; double z,fw,f[20],fq[20],q[20]; @@ -451,7 +471,7 @@ pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ -static int __ieee754_rem_pio2(double x, double *y) { +static SAFEBUF int __ieee754_rem_pio2(double x, double *y) { double z,w,t,r,fn; double tx[3]; int e0,i,j,nx,n,ix,hx,i0;