304 <code>false</code> (this is asked during installation).</p></li>
305 </ul></li>
306 </ul>
307 <p>Failure to follow this procedure might result in hard-to-debug build
308 problems.</p></li>
309 </ul>
310 <h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
311 <p>The JDK is a massive project, and require machines ranging from
312 decent to powerful to be able to build in a reasonable amount of time,
313 or to be able to complete a build at all.</p>
314 <p>We <em>strongly</em> recommend usage of an SSD disk for the build,
315 since disk speed is one of the limiting factors for build
316 performance.</p>
317 <h3 id="building-on-x86">Building on x86</h3>
318 <p>At a minimum, a machine with 2-4 cores is advisable, as well as 2-4
319 GB of RAM. (The more cores to use, the more memory you need.) At least 6
320 GB of free disk space is required.</p>
321 <p>Even for 32-bit builds, it is recommended to use a 64-bit build
322 machine, and instead create a 32-bit target using
323 <code>--with-target-bits=32</code>.</p>
324 <h3 id="building-on-aarch64">Building on aarch64</h3>
325 <p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
326 RAM. (The more cores to use, the more memory you need.) At least 6 GB of
327 free disk space is required.</p>
328 <p>If you do not have access to sufficiently powerful hardware, it is
329 also possible to use <a href="#cross-compiling">cross-compiling</a>.</p>
330 <h4 id="branch-protection">Branch Protection</h4>
331 <p>In order to use Branch Protection features in the VM,
332 <code>--enable-branch-protection</code> must be used. This option
333 requires C++ compiler support (GCC 9.1.0+ or Clang 10+). The resulting
334 build can be run on both machines with and without support for branch
335 protection in hardware. Branch Protection is only supported for Linux
336 targets.</p>
337 <h3 id="building-on-32-bit-arm">Building on 32-bit arm</h3>
338 <p>This is not recommended. Instead, see the section on <a
339 href="#cross-compiling">Cross-compiling</a>.</p>
340 <h2 id="operating-system-requirements">Operating System
341 Requirements</h2>
342 <p>The mainline JDK project supports Linux, macOS, AIX and Windows.
343 Support for other operating system, e.g. BSD, exists in separate "port"
380 <h3 id="windows">Windows</h3>
381 <p>Windows XP is not a supported platform, but all newer Windows should
382 be able to build the JDK.</p>
383 <p>On Windows, it is important that you pay attention to the
384 instructions in the <a href="#special-considerations">Special
385 Considerations</a>.</p>
386 <p>Windows is the only non-POSIX OS supported by the JDK, and as such,
387 requires some extra care. A POSIX support layer is required to build on
388 Windows. Currently, the only supported such layers are Cygwin, Windows
389 Subsystem for Linux (WSL), and MSYS2. (MSYS is no longer supported due
390 to an outdated bash; While OpenJDK can be built with MSYS2, support for
391 it is still experimental, so build failures and unusual errors are not
392 uncommon.)</p>
393 <p>Internally in the build system, all paths are represented as
394 Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather
395 than <code>C:\git\jdk\Makefile</code>. This rule also applies to input
396 to the build system, e.g. in arguments to <code>configure</code>. So,
397 use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than
398 <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this
399 conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
400 <h4 id="cygwin">Cygwin</h4>
401 <p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment
402 is required for building the JDK on Windows. If you have a 64-bit OS, we
403 strongly recommend using the 64-bit version of Cygwin.</p>
404 <p><strong>Note:</strong> Cygwin has a model of continuously updating
405 all packages without any easy way to install or revert to a specific
406 version of a package. This means that whenever you add or update a
407 package in Cygwin, you might (inadvertently) update tools that are used
408 by the JDK build process, and that can cause unexpected build
409 problems.</p>
410 <p>The JDK requires GNU Make 4.0 or greater in Cygwin. This is usually
411 not a problem, since Cygwin currently only distributes GNU Make at a
412 version above 4.0.</p>
413 <p>Apart from the basic Cygwin installation, the following packages must
414 also be installed:</p>
415 <ul>
416 <li><code>autoconf</code></li>
417 <li><code>make</code></li>
418 <li><code>zip</code></li>
419 <li><code>unzip</code></li>
|
304 <code>false</code> (this is asked during installation).</p></li>
305 </ul></li>
306 </ul>
307 <p>Failure to follow this procedure might result in hard-to-debug build
308 problems.</p></li>
309 </ul>
310 <h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
311 <p>The JDK is a massive project, and require machines ranging from
312 decent to powerful to be able to build in a reasonable amount of time,
313 or to be able to complete a build at all.</p>
314 <p>We <em>strongly</em> recommend usage of an SSD disk for the build,
315 since disk speed is one of the limiting factors for build
316 performance.</p>
317 <h3 id="building-on-x86">Building on x86</h3>
318 <p>At a minimum, a machine with 2-4 cores is advisable, as well as 2-4
319 GB of RAM. (The more cores to use, the more memory you need.) At least 6
320 GB of free disk space is required.</p>
321 <p>Even for 32-bit builds, it is recommended to use a 64-bit build
322 machine, and instead create a 32-bit target using
323 <code>--with-target-bits=32</code>.</p>
324 <p>Note: The Windows x86 port is deprecated.</p>
325 <h3 id="building-on-aarch64">Building on aarch64</h3>
326 <p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
327 RAM. (The more cores to use, the more memory you need.) At least 6 GB of
328 free disk space is required.</p>
329 <p>If you do not have access to sufficiently powerful hardware, it is
330 also possible to use <a href="#cross-compiling">cross-compiling</a>.</p>
331 <h4 id="branch-protection">Branch Protection</h4>
332 <p>In order to use Branch Protection features in the VM,
333 <code>--enable-branch-protection</code> must be used. This option
334 requires C++ compiler support (GCC 9.1.0+ or Clang 10+). The resulting
335 build can be run on both machines with and without support for branch
336 protection in hardware. Branch Protection is only supported for Linux
337 targets.</p>
338 <h3 id="building-on-32-bit-arm">Building on 32-bit arm</h3>
339 <p>This is not recommended. Instead, see the section on <a
340 href="#cross-compiling">Cross-compiling</a>.</p>
341 <h2 id="operating-system-requirements">Operating System
342 Requirements</h2>
343 <p>The mainline JDK project supports Linux, macOS, AIX and Windows.
344 Support for other operating system, e.g. BSD, exists in separate "port"
381 <h3 id="windows">Windows</h3>
382 <p>Windows XP is not a supported platform, but all newer Windows should
383 be able to build the JDK.</p>
384 <p>On Windows, it is important that you pay attention to the
385 instructions in the <a href="#special-considerations">Special
386 Considerations</a>.</p>
387 <p>Windows is the only non-POSIX OS supported by the JDK, and as such,
388 requires some extra care. A POSIX support layer is required to build on
389 Windows. Currently, the only supported such layers are Cygwin, Windows
390 Subsystem for Linux (WSL), and MSYS2. (MSYS is no longer supported due
391 to an outdated bash; While OpenJDK can be built with MSYS2, support for
392 it is still experimental, so build failures and unusual errors are not
393 uncommon.)</p>
394 <p>Internally in the build system, all paths are represented as
395 Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather
396 than <code>C:\git\jdk\Makefile</code>. This rule also applies to input
397 to the build system, e.g. in arguments to <code>configure</code>. So,
398 use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than
399 <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this
400 conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
401 <p>Note: The Windows x86 port is deprecated.</p>
402 <h4 id="cygwin">Cygwin</h4>
403 <p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment
404 is required for building the JDK on Windows. If you have a 64-bit OS, we
405 strongly recommend using the 64-bit version of Cygwin.</p>
406 <p><strong>Note:</strong> Cygwin has a model of continuously updating
407 all packages without any easy way to install or revert to a specific
408 version of a package. This means that whenever you add or update a
409 package in Cygwin, you might (inadvertently) update tools that are used
410 by the JDK build process, and that can cause unexpected build
411 problems.</p>
412 <p>The JDK requires GNU Make 4.0 or greater in Cygwin. This is usually
413 not a problem, since Cygwin currently only distributes GNU Make at a
414 version above 4.0.</p>
415 <p>Apart from the basic Cygwin installation, the following packages must
416 also be installed:</p>
417 <ul>
418 <li><code>autoconf</code></li>
419 <li><code>make</code></li>
420 <li><code>zip</code></li>
421 <li><code>unzip</code></li>
|