Thu, 11 Nov 2010 23:17:26 -0800
Added tag hs20-b02 for changeset 3ef7426b4dea
trims@1907 | 1 | Copyright (c) 2007 Oracle and/or its affiliates. All rights reserved. |
duke@435 | 2 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 3 | |
duke@435 | 4 | This code is free software; you can redistribute it and/or modify it |
duke@435 | 5 | under the terms of the GNU General Public License version 2 only, as |
duke@435 | 6 | published by the Free Software Foundation. |
duke@435 | 7 | |
duke@435 | 8 | This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 9 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 10 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 11 | version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 12 | accompanied this code). |
duke@435 | 13 | |
duke@435 | 14 | You should have received a copy of the GNU General Public License version |
duke@435 | 15 | 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 16 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 17 | |
trims@1907 | 18 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 19 | or visit www.oracle.com if you need additional information or have any |
trims@1907 | 20 | questions. |
duke@435 | 21 | |
duke@435 | 22 | ________________________________________________________________________________ |
duke@435 | 23 | |
duke@435 | 24 | __Introduction__________________________________________________________________ |
duke@435 | 25 | |
duke@435 | 26 | This readme file should provide all the information needed to build |
duke@435 | 27 | the HotSpot VM for Windows 95/Windows NT from its teamware workspace. |
duke@435 | 28 | It is intended as a starting point for people who want to learn how |
duke@435 | 29 | to work with the current HotSpot source workspace and who need to |
duke@435 | 30 | build the VM locally. It is not intended as a tutorial for licensees. |
duke@435 | 31 | |
duke@435 | 32 | Last update: 03/28/05 |
duke@435 | 33 | |
duke@435 | 34 | |
duke@435 | 35 | __Platform______________________________________________________________________ |
duke@435 | 36 | |
duke@435 | 37 | The VM builds under the following platforms: |
duke@435 | 38 | - Windows NT 4.0 on Intel x486 or greater |
duke@435 | 39 | - x486 PC (or greater), 32MByte or more |
duke@435 | 40 | |
duke@435 | 41 | |
duke@435 | 42 | __Tools_________________________________________________________________________ |
duke@435 | 43 | |
duke@435 | 44 | For building/testing the following tools need to be available: |
duke@435 | 45 | - Microsoft Visual C++ 6.0 (with nmake version 1.62.7022 or greater) |
duke@435 | 46 | - MKS Toolkit 6.1 or greater |
duke@435 | 47 | see: /net/reinstall/export/vol0/pc-archive/software/mks6.1 (NFS) |
duke@435 | 48 | or: \\reinstall\pc-archive\software\mks6.1 (NT) |
duke@435 | 49 | |
duke@435 | 50 | |
duke@435 | 51 | __JDK___________________________________________________________________________ |
duke@435 | 52 | |
duke@435 | 53 | The workspace works with the following version of the JDK: |
duke@435 | 54 | (NOTE: these are out of date) |
duke@435 | 55 | - JDK1.2FCS "V" build |
duke@435 | 56 | see: /usr/local/java/jdk1.2/win32 |
duke@435 | 57 | |
duke@435 | 58 | and the following version(s) of HotJava: |
duke@435 | 59 | - hjb1.1.4 |
duke@435 | 60 | - hjb1.1.5 |
duke@435 | 61 | see /usr/local/java/hjb1.1.x/win32 |
duke@435 | 62 | |
duke@435 | 63 | |
duke@435 | 64 | __Environment variables_________________________________________________________ |
duke@435 | 65 | |
duke@435 | 66 | The following environment variables need to be set up for the IDE |
duke@435 | 67 | build process. For batch builds these do not need to be set. |
duke@435 | 68 | |
duke@435 | 69 | HotSpotMksHome points to the (NFS or PC-local) directory where the MKS |
duke@435 | 70 | executables (like sh.exe and grep.exe) are installed |
duke@435 | 71 | |
duke@435 | 72 | Optionally you may set the following variables in your environment and they |
duke@435 | 73 | will be picked up by the create.bat script used to generate the vm.vcproj files. |
duke@435 | 74 | See the section on building within MS Developer Studio for more details. |
duke@435 | 75 | |
duke@435 | 76 | HotSpotWorkSpace points to the (NFS) directory where the workspace is located |
duke@435 | 77 | HotSpotBuildSpace points to the (PC-local) directory where the vm is built |
duke@435 | 78 | HotSpotReleaseBinDest points to the (NFS or PC-local) directory where the product DLL is |
duke@435 | 79 | written |
duke@435 | 80 | HotSpotDebugBinDest points to the (NFS or PC-local) directory where the debug DLL is |
duke@435 | 81 | written |
duke@435 | 82 | |
duke@435 | 83 | NOTE: For both batch and IDE builds, java and javac must be in your |
duke@435 | 84 | PATH, and the versions found by default must work. (If this turns out |
duke@435 | 85 | to be a problem, we can define HotSpotJava and HotSpotJavaC for |
duke@435 | 86 | bootstrapping...) |
duke@435 | 87 | |
duke@435 | 88 | __Building the JVM from the command line________________________________________ |
duke@435 | 89 | |
duke@435 | 90 | 1) choose a directory in which you want to build the vm |
duke@435 | 91 | (the build process will create a subdirectory) |
duke@435 | 92 | |
duke@435 | 93 | 2) To build the 'core' version (debug || optimized) |
duke@435 | 94 | %HotSpotWorkSpace%\build\windows\build <flavor> core %HotSpotWorkSpace% <jdk_dir> |
duke@435 | 95 | To build the 'compiler2' version (debug || optimized) |
duke@435 | 96 | %HotSpotWorkSpace%\build\windows\build <flavor> compiler2 %HotSpotWorkSpace% <jdk_dir> |
duke@435 | 97 | |
duke@435 | 98 | where <jdk_dir> is a full path to a JDK in which bin/java and |
duke@435 | 99 | bin/javac are present and working. |
duke@435 | 100 | |
duke@435 | 101 | 3) If you have problems with building, first try: |
duke@435 | 102 | vcvars32 <CR> (sets path for VC++) |
duke@435 | 103 | |
duke@435 | 104 | 4) In addition to jvm.dll, the Serviceability Agent (SA) based JDI connector |
duke@435 | 105 | and command line tools are built if dbgeng.h and dbgeng.lib |
duke@435 | 106 | can be located, and BUILD_WIN_SA=1 is specified. We look for dbgeng.h here: |
duke@435 | 107 | $(MSVCDIR)\PlatformSDK\Include |
duke@435 | 108 | $(SYSTEMROOT)\..\Program Files\Microsoft SDK\include |
duke@435 | 109 | |
duke@435 | 110 | The first directory is part of Visual Studio VC .NET 2003. |
duke@435 | 111 | The second is used on Windows-amd64. |
duke@435 | 112 | |
duke@435 | 113 | |
duke@435 | 114 | __Building the JVM from within MS Developer Studio______________________________ |
duke@435 | 115 | |
duke@435 | 116 | 0) Set environment variables as described above |
duke@435 | 117 | |
duke@435 | 118 | 1) Run the following script: |
duke@435 | 119 | %HotSpotWorkSpace%\build\windows\create <type> { <workspace> <buildspace> <productbindest> <debugbindest> } |
duke@435 | 120 | where type is one of core, compiler1, compiler2. If you leave off the |
duke@435 | 121 | "<workspace> <buildspace> <productbindest> <debugbindest>" part, the script expects to find their |
duke@435 | 122 | values in the HotSpotWorkSpace, HotSpotBuildSpace, HotSpotReleaseBinDest, and HotSpotDebugBinDest environment |
duke@435 | 123 | variables. The resulting vm.vcproj does not depend on these values in the environment. |
duke@435 | 124 | |
duke@435 | 125 | This will populate the build space with the appropriate makefiles |
duke@435 | 126 | and run nmake in it. This builds and runs makedeps, which now |
duke@435 | 127 | generates the appropriate vm.vcproj into the build space. It also |
duke@435 | 128 | builds and runs adlc. |
duke@435 | 129 | |
duke@435 | 130 | To regenerate the .incl and .dsp files after changing the include |
duke@435 | 131 | databases, just run nmake in the build space. |
duke@435 | 132 | |
duke@435 | 133 | The build process now relies on java and javac. For the IDE builds, |
duke@435 | 134 | the full path to a JDK (in which bin/java and bin/javac are present |
duke@435 | 135 | and working) can be specified either explicitly with the |
duke@435 | 136 | ALT_BOOTDIR environment variable (like the JDK build process), via |
duke@435 | 137 | the JDK build's default BOOTDIR environment variable, via JAVA_HOME, |
duke@435 | 138 | or implicitly via the PATH. |
duke@435 | 139 | |
duke@435 | 140 | (Note that there are now many more command line options to MakeDeps |
duke@435 | 141 | on the Windows platform than before. These have been bundled into |
duke@435 | 142 | makefiles/makedeps.make, but it is still necessary to keep this in |
duke@435 | 143 | sync with the batch makefiles, in vm/generated.) |
duke@435 | 144 | |
duke@435 | 145 | If you have problems with building (i.e,. finding nmake), first try: |
duke@435 | 146 | vcvars32 <CR> (sets path for VC++) |
duke@435 | 147 | |
duke@435 | 148 | 2) Double-click the vm.vcproj file in the %HotSpotBuildSpace% directory |
duke@435 | 149 | to open MS Developer Studio. |
duke@435 | 150 | |
duke@435 | 151 | 3) build desired or all versions: |
duke@435 | 152 | menu Build -> Batch Build... -> Build (or Rebuild All) |
duke@435 | 153 | |
duke@435 | 154 | 4) jvm.dll is in the %HotSpotReleaseBinDest% or %HotSpotDebugBinDest% directory |
duke@435 | 155 | depending on which configuration you built (release or debug). |
duke@435 | 156 | |
duke@435 | 157 | Note: do not edit any of the files (especially the vm.vcproj file) in the |
duke@435 | 158 | build space, since they are all either autogenerated or copied from |
duke@435 | 159 | the work space. If necessary, modify the original Makefiles in |
duke@435 | 160 | %HotSpotWorkSpace%\build\windows\projectfiles, or the shared |
duke@435 | 161 | makedeps arguments in |
duke@435 | 162 | %HotSpotWorkSpace%\build\windows\makefiles\makedeps.make. |
duke@435 | 163 | |
duke@435 | 164 | Note that it appears that some options set in the IDE (for example, |
duke@435 | 165 | the default executable) show up not in the .dsp file, but in the .opt |
duke@435 | 166 | file, so the automatic regeneration of the .dsp file should not |
duke@435 | 167 | destroy the project settings. However, makedeps.make should be edited |
duke@435 | 168 | to supply per-file compiler options. |
duke@435 | 169 | |
duke@435 | 170 | To build adlc from within the IDE for debugging purposes: |
duke@435 | 171 | |
duke@435 | 172 | 1) in MS Developer Studio, open ADLCompiler.dsw: |
duke@435 | 173 | menu File -> Open Workspace... |
duke@435 | 174 | select & double-click ADLCompiler.dsw |
duke@435 | 175 | |
duke@435 | 176 | 2) rebuild all (debug mode is enough) |
duke@435 | 177 | menu Build -> Rebuild All (make sure Win32 Debug version is selected) |
duke@435 | 178 | |
duke@435 | 179 | |
duke@435 | 180 | __Testing the VM________________________________________________________________ |
duke@435 | 181 | |
duke@435 | 182 | To test the VM using the Tonga Testsuite, use testlook. testlook is a very |
duke@435 | 183 | simple testing framework on top of Tonga which allows us to use one (Tonga) |
duke@435 | 184 | test file, that can be extended with attributes. |
duke@435 | 185 | |
duke@435 | 186 | 1) copy %HotSpotWorkSpace%\test\testlook.bat onto PC (preferably |
duke@435 | 187 | %HotSpotBuildSpace%\bin, which should ideally be in the path) |
duke@435 | 188 | |
duke@435 | 189 | 2) run testlook <cr> or testlook help <cr> for details |
duke@435 | 190 | |
duke@435 | 191 | 3) to run testlook you need to have Tonga mounted: |
duke@435 | 192 | net use T: \\tapas\export1\psqe |
duke@435 | 193 | |
duke@435 | 194 | |
duke@435 | 195 | __HotJava under HotSpot_________________________________________________________ |
duke@435 | 196 | |
duke@435 | 197 | To run HotJava, use the .bat file %HotSpotWorkSpace%\test\h.bat. Copy |
duke@435 | 198 | it into %HotSpotBuildSpace%/<flavor> (which ideally is in the path) and run |
duke@435 | 199 | HotJava: h java <flags> (e.g., h java_g -Xint). |
duke@435 | 200 | |
duke@435 | 201 | |
duke@435 | 202 | __Preferred directory setup under Windows NT____________________________________ |
duke@435 | 203 | |
duke@435 | 204 | Within the HotSpot group we are using the following directory setup: |
duke@435 | 205 | |
duke@435 | 206 | D:\jdk1.2 - where we install the JDK |
duke@435 | 207 | |
duke@435 | 208 | The following drives are mounted for testing/putbacks/etc.: |
duke@435 | 209 | |
duke@435 | 210 | net use T: \\tapas\export1\psqe |
duke@435 | 211 | net use Y: \\rschmidt\GammaBase |
duke@435 | 212 | net use Z: \\animorphic\animorphic |