Changes between Version 4 and Version 5 of WebKitGTK/GCCRequirement


Ignore:
Timestamp:
May 7, 2019 6:37:44 AM (5 years ago)
Author:
Michael Catanzaro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/GCCRequirement

    v4 v5  
    11WebKit 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.
    22
    3 We are aware that Linux distributions and embedded systems vendors like to be able to compile everything with the same version of GCC, which may be very old, so we have compromised with Apple to develop a [[DependenciesPolicy]] that attempts to balance the interests of both WebKit users and developers. With respect to GCC, we intend to support the version of GCC in the latest Ubuntu LTS and Debian stable releases. As of fall 2017, that is Ubuntu 16.04 (GCC 5) and Debian Stretch (GCC 6). We'll continue to support GCC 5 at least until the release of Ubuntu 18.04 in April 2018. Shortly thereafter, you should expect that an upgrade to GCC 6 will be required to build trunk. Accordingly, the 2.22 releases of WebKitGTK+ and WPE will likely be the first to require GCC 6. After that, GCC 6 will be supported at least until the next Debian stable release. While we can't be sure when the next Debian stable release will be, it will probably be in mid to late 2019, so it is likely that either the 2.26 or 2.28 release will be the first to require GCC 7.
     3We are aware that Linux distributions and embedded systems vendors like to be able to compile everything with the same version of GCC, which may be very old, so we have compromised with Apple to develop a [[DependenciesPolicy]] that attempts to balance the interests of both WebKit users and developers. We intend to support some system compiler in the latest Ubuntu LTS and Debian stable releases, 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. 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 years, in accordance with the dependencies policy.
    44
    5 This policy may mean that a new version of GCC is required 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 custom compiler instead. One option that may sometimes work is to try to build with Clang, which may be new enough when GCC is not. (Clang is the compiler that Apple uses to develop WebKit.) Another option is to bootstrap a newer version of GCC as part of your WebKit build. If you choose to stop building new versions of WebKit as a result of a GCC version increase, rather than bootstrapping a newer compiler, your users will be left vulnerable to numerous security vulnerabilities that are fixed in newer versions.
    6 
    7 == GCC 4.9 -> GCC 5 ==
    8 
    9 In very rare cases, a C++ ABI change may make upgrading to a new version of GCC unusually difficult. For example, the C++ ABI changed between GCC 4.9 and GCC 5. Building WebKit with libstdc++ 5 would ordinarily require that you recompile all C++ libraries that it links against using the newer libstdc++. However, in this particular case, a compatibility option is provided: you can configure GCC with --with-default-libstdcxx-abi=gcc4-compatible when building GCC itself. This option may not exist forever, but it appears to still be supported as of libstdc++ 7.
     5This 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.