wiki:WebKitGTK/GCCRequirement

Version 10 (modified by Michael Catanzaro, 16 months ago) (diff)

--

WebKit is a complex C++ library that often requires relatively new versions of GCC to build. Older versions of GCC tend to have bugs that prevent code from compiling successfully, which tend to be fixed in newer versions of GCC, and which are often encountered in practice by WebKit developers. Apple also likes to be able to use new C++ features, which are often not present in older versions of GCC, relatively early.

We are aware that Linux distributions and embedded systems vendors like to be able to compile everything with the same system build toolchain, which may be very old, so we have compromised with Apple to develop a DependenciesPolicy that attempts to balance the interests of both WebKit distributors and developers. We intend to support some system compiler in the latest Ubuntu LTS and Debian stable releases until one year after the subsequent release, but, depending on the age of the release, this might be some version of Clang rather than GCC. We no longer provide any timeline as to how long a particular version of GCC may be supported, as this decision will be made by WebKit developers on a case-by-case basis. However, we will always support the version of libstdc++ available in these releases until one year after the subsequent release. Preserving compatibility with older standard library versions is necessary to allow updates on older systems, even if a newer compiler is used to build those updates. In general, you can expect a new standard library version to be supported by WebKit for approximately three to four years, in accordance with the dependencies policy.

This policy means that WebKit may require a new version of GCC sooner than you might prefer. Because Apple does not use GCC to develop WebKit, and because of the relatively high number of compatibility issues caused by supporting GCC, we should be grateful that it is still possible to build WebKit with GCC at all. Unless you are able to upgrade your systems to newer GCCs on a regular basis, it is expected that your system GCC may not be new enough to build WebKit. We urge you to consider building with a different compiler if your system compiler is too old. If you choose to stop building new versions of WebKit as a result of an increased GCC version requirement, rather than building with a newer compiler, your users will be left vulnerable to numerous security vulnerabilities that are fixed in newer versions.

Outlook as of July 2019

Interpreting the DependenciesPolicy as of July 2019, we conclude that Ubuntu 18.04 will remain supported until April 2021, one year after the release of Ubuntu 20.04. We also conclude that Debian Buster will remain supported until one year after the release of Debian Bullseye, which doesn't have a set release date but is likely to occur during the second half of 2021. Therefore, Debian Buster will likely be supported until the second half of 2022. Knowing the versions of GCC, Clang, and libstdc++ provided by Ubuntu 18.04 and Debian Buster, we conclude:

  • (GCC 7 OR Clang 6) AND libstdc++ 7, the versions in Ubuntu 18.04, will be supported until April 2021
  • (GCC 8 OR Clang 7) AND libstdc++ 8, the versions in Debian Buster, will be supported until, roughly, late 2022

This policy affects trunk, so the first stable branch to require the new dependencies would be later than that date:

  • WebKitGTK or WPE WebKit 2.24 (released March 2019) support GCC 6
  • WebKitGTK or WPE WebKit 2.26 (scheduled for September 2019) will be the first release to require GCC 7
  • The first release to require libstdc++ 8 should be WebKitGTK or WPE WebKit 2.34 (scheduled for September 2021).
  • The first release to require libstdc++ 9 should be WebKitGTK or WPE WebKit 2.38 (scheduled for September 2022) or 2.40 (scheduled for March 2023).