Fedora plans to provide the ability to build packages in Clang instead of GCC

For implementation in Fedora 33 outlined change rules for using compilers in the distribution, according to which the compiler for building the package can be selected depending on the recommendations and preferences of the main project (upstream). Fedora currently enforces the use of GCC to build all packages, except when a package can only be built in Clang/LLVM.

The motive for making it possible to build with Clang is that some projects, for example, Firefox ΠΈ Chromium, when developing, use Clang as the main compiler and builds based on it are more qualitatively tested. Using Clang for such packages will avoid catching bugs that pop up when building in GCC, as well as coordinating fixes for these bugs with the main project. Building with GCC has a positive effect on maintaining the portability of code developed using Clang, but creates a large burden on maintainers and delays publication of updates (for example, Mozilla prohibits use the Firefox trademark when applying third-party patches, so you have to get the patches included in the mainstream first and release the update only after the fixes appear in the upstream).

It is noted that it would be logical to use Clang for packages for which this compiler is better suited and used in the main project. For such packages, it would be possible to reduce the maintenance burden if the preparation of packages is handled by representatives of the main project. If a representative from the community is building the package, then it is proposed to leave the compiler choice to the maintainer. For packages whose main projects do not favor one compiler over another, it is recommended to keep the status quo (build in GCC as before). The author of the proposal is Jeff Law of Red Hat, who is a maintainer of GCC and Binutils.

Source: opennet.ru

Add a comment