doc/building.html
changeset 50490 cbae0e359538
parent 50267 1582de22e3a1
child 50586 4bba6dea2e73
equal deleted inserted replaced
50489:580159eeac07 50490:cbae0e359538
   503 <h3 id="common-make-targets">Common Make Targets</h3>
   503 <h3 id="common-make-targets">Common Make Targets</h3>
   504 <p>Apart from the default target, here are some common make targets:</p>
   504 <p>Apart from the default target, here are some common make targets:</p>
   505 <ul>
   505 <ul>
   506 <li><code>hotspot</code> - Build all of hotspot (but only hotspot)</li>
   506 <li><code>hotspot</code> - Build all of hotspot (but only hotspot)</li>
   507 <li><code>hotspot-&lt;variant&gt;</code> - Build just the specified jvm variant</li>
   507 <li><code>hotspot-&lt;variant&gt;</code> - Build just the specified jvm variant</li>
   508 <li><code>images</code> or <code>product-images</code> - Build the JRE and JDK images</li>
   508 <li><code>images</code> or <code>product-images</code> - Build the JDK image</li>
   509 <li><code>docs</code> or <code>docs-image</code> - Build the documentation image</li>
   509 <li><code>docs</code> or <code>docs-image</code> - Build the documentation image</li>
   510 <li><code>test-image</code> - Build the test image</li>
   510 <li><code>test-image</code> - Build the test image</li>
   511 <li><code>all</code> or <code>all-images</code> - Build all images (product, docs and test)</li>
   511 <li><code>all</code> or <code>all-images</code> - Build all images (product, docs and test)</li>
   512 <li><code>bootcycle-images</code> - Build images twice, second time with newly built JDK (good for testing)</li>
   512 <li><code>bootcycle-images</code> - Build images twice, second time with newly built JDK (good for testing)</li>
   513 <li><code>clean</code> - Remove all files generated by make, but not those generated by configure</li>
   513 <li><code>clean</code> - Remove all files generated by make, but not those generated by configure</li>
   637 <h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
   637 <h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
   638 <p>A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using <code>--with-abi-profile</code>: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported on OpenJDK.</p>
   638 <p>A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using <code>--with-abi-profile</code>: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported on OpenJDK.</p>
   639 <p>OpenJDK contains two different ports for the aarch64 platform, one is the original aarch64 port from the <a href="http://openjdk.java.net/projects/aarch64-port">AArch64 Port Project</a> and one is a 64-bit version of the Oracle contributed ARM port. When targeting aarch64, by the default the original aarch64 port is used. To select the Oracle ARM 64 port, use <code>--with-cpu-port=arm64</code>. Also set the corresponding value (<code>aarch64</code> or <code>arm64</code>) to --with-abi-profile, to ensure a consistent build.</p>
   639 <p>OpenJDK contains two different ports for the aarch64 platform, one is the original aarch64 port from the <a href="http://openjdk.java.net/projects/aarch64-port">AArch64 Port Project</a> and one is a 64-bit version of the Oracle contributed ARM port. When targeting aarch64, by the default the original aarch64 port is used. To select the Oracle ARM 64 port, use <code>--with-cpu-port=arm64</code>. Also set the corresponding value (<code>aarch64</code> or <code>arm64</code>) to --with-abi-profile, to ensure a consistent build.</p>
   640 <h3 id="verifying-the-build">Verifying the Build</h3>
   640 <h3 id="verifying-the-build">Verifying the Build</h3>
   641 <p>The build will end up in a directory named like <code>build/linux-arm-normal-server-release</code>.</p>
   641 <p>The build will end up in a directory named like <code>build/linux-arm-normal-server-release</code>.</p>
   642 <p>Inside this build output directory, the <code>images/jdk</code> and <code>images/jre</code> will contain the newly built JDK and JRE, respectively, for your <em>target</em> system.</p>
   642 <p>Inside this build output directory, the <code>images/jdk</code> will contain the newly built JDK, for your <em>target</em> system.</p>
   643 <p>Copy these folders to your <em>target</em> system. Then you can run e.g. <code>images/jdk/bin/java -version</code>.</p>
   643 <p>Copy these folders to your <em>target</em> system. Then you can run e.g. <code>images/jdk/bin/java -version</code>.</p>
   644 <h2 id="build-performance">Build Performance</h2>
   644 <h2 id="build-performance">Build Performance</h2>
   645 <p>Building OpenJDK requires a lot of horsepower. Some of the build tools can be adjusted to utilize more or less of resources such as parallel threads and memory. The <code>configure</code> script analyzes your system and selects reasonable values for such options based on your hardware. If you encounter resource problems, such as out of memory conditions, you can modify the detected values with:</p>
   645 <p>Building OpenJDK requires a lot of horsepower. Some of the build tools can be adjusted to utilize more or less of resources such as parallel threads and memory. The <code>configure</code> script analyzes your system and selects reasonable values for such options based on your hardware. If you encounter resource problems, such as out of memory conditions, you can modify the detected values with:</p>
   646 <ul>
   646 <ul>
   647 <li><p><code>--with-num-cores</code> -- number of cores in the build system, e.g. <code>--with-num-cores=8</code>.</p></li>
   647 <li><p><code>--with-num-cores</code> -- number of cores in the build system, e.g. <code>--with-num-cores=8</code>.</p></li>