Re: F35 Change: CompilerPolicy Change (System-Wide Change proposal)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/23/2021 9:57 AM, Daniel P. Berrangé wrote:
On Fri, Apr 23, 2021 at 11:18:59AM -0400, Ben Cotton wrote:
https://fedoraproject.org/wiki/Changes/CompilerPolicy == Summary == Fedora has historically forced packages to build with GCC unless the upstream project for the package only supported Clang/LLVM. This change proposal replaces that policy with one where, given a good technical reason, a packager may: * Choose to build with their package with clang even if the upstream project supports gcc. * Choose to build with gcc even if upstream does not support it. The goal is to give the packager the ability to use their own technical judgement to choose the best compiler.
Does the choice have to be consistent per package, or is it within expectations to use different compilers on different Fedora arches ?
I'd think most packages would be consistent, but I don't think it necessarily needs to be policy.  If a package maintainer has a good reason to use gcc for part of the package and llvm/clang for another, then they should be able to do that.

== Detailed Description == It is worth noting that Clang/LLVM's implementation of -fstack-clash-protection, which is one of Fedora's default compiler flags, is under development and does not yet have an implementation for AArch64.
This would suggest need to use GCC on x86 and CLang on aarch64 within a single package.
Note the lack of stack-clash on aarch64 is a transient issue.  It is being worked on, but just didn't make it into llvm12, I would expect it to land for llvm13 (Tom's a better resource on that going forward, so if he's got newer information than mine, believe his :-)


Upstream QEMU has been considering whether there's any loss of features implied by replacing GCC with use of CLang in QEMU builds. One edge case was discovered for s390x target. GCC has a min code generation target of z900 (hw release circa 2000), CLang has a min code genreation target of z10 (hw release circa 2008) This doesn't matter for compiling QEMU itself, as anyone actually running QEMU on an s390x is likely to have z10 or newer. It does cause a problem with firmware builds though. If QEMU wants to emulate old hardware (qemu-system-s390x -cpu z900 ..args...), then the firmware blob needs to have been built to target z900 which is not possible with CLang. So if QEMU is switched to use CLang, then we will possibly need to use GCC still for QEMU's firmware builds, or only use CLang on certain Fedora arches. This is quite a niche problem that's unlikely to cause issues for most people, but its a illustration that swapping compilers out can have unexpected consequences/complications.
This is a great example where trying to force consistency doesn't make sense and the maintainers can/should do what is best for the package and Fedora.

jeff
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux