Recommended GCC version for JDK17+?
Stewart Addison
sxa at redhat.com
Wed Dec 22 14:21:54 UTC 2021
Hi everyone,
What is the definitive "recommended" version of GCC to use for building
JDK17 and later?
The reason for asking is because the OpenJDK wiki seems to recommend the
(Red Hat vendor branch) GCC 8.2.1:
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms
The JDK17+ building.md, however, seems to reference 10.2 as the "known to
work" version:
https://github.com/openjdk/jdk17u/blob/master/doc/building.md#gcc (But also
states that anything at 5.0 and above /should/ also work)
Looking at what some of the different openjdk providers use there seems to
be a mix of versions in use although 7.3.1 seems particularly popular -
possibly because 7.3 is listed in the devkits section of the document, or
because 7.3.0 is the one listed in the building.md for jdk11u and some
vendors have just stuck with it for now. Oracle's current JDK17 seems to
use a more recent version than other providers - 10.3 from what I can tell.
While different versions obviously work, is there a formal "recommended"
version of GCC that should be used for compiling production versions of
JDK17 on Linux? My gut feel is that it should possibly be 10.2 or a later
10 as the one listed as being known to work, but Oracle seems to have gone
one up from that too so perhaps 10.2 should be replaced with 10.3 in the
docs now ... And should the wiki be adjusted to be in sync with the level
mentioned in building.md And I guess one final question would be whether
anyone has done any comparisons with JDKs compiled with different versions
that might sway any decisions?
Regards,
Stewart...
--
Working on Adoptium Temurin <https://adoptium.net> for Red Hat
<https://www.redhat.com> <http://nodejs.org>
https://twitter.com/sxaTech
https://github.com/sxa
More information about the jdk-dev
mailing list