Announcement

Collapse
No announcement yet.

Fedora 33 Proposal To Allow Packages To Build With LLVM Clang Rather Than Requiring GCC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fedora 33 Proposal To Allow Packages To Build With LLVM Clang Rather Than Requiring GCC

    Phoronix: Fedora 33 Proposal To Allow Packages To Build With LLVM Clang Rather Than Requiring GCC

    A feature proposal raised by Red Hat's Jeff Law would allow Fedora packages to be built under the LLVM Clang compiler rather than defaulting that all packages to be built under GCC. Clang-built packages would happen where the upstream software recommends using Clang by default or for software without an upstream to let the packager(s) make their own decision...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    "Using GCC to build Firefox can at times lead to build problems given Mozilla's Clang focus and reportedly also in some instances less than ideal performance." I've built Firefox using GCC more times than I can count, and I find this statement a little hard to believe. The problems are always with Rust and with the rust tools getting out of date or getting their sym links out of whack, not with GCC. Firefox built locally with GCC always out-performs distro binaries. It could be that a locally built Clang version would out-perform a GCC build, but I'd have to see some testing.

    Comment


    • #3
      Originally posted by andyprough View Post
      I've built Firefox using GCC more times than I can count, and I find this statement a little hard to believe. The problems are always with Rust and with the rust tools getting out of date or getting their sym links out of whack, not with GCC. Firefox built locally with GCC always out-performs distro binaries. It could be that a locally built Clang version would out-perform a GCC build, but I'd have to see some testing.
      GCC builds of Firefox have been breaking for quite a while when building with profiling + LTO enabled.

      Comment


      • #4
        Aren't there RPM macros for clang already? Did they really go out of their way to force GCC?

        Comment


        • #5
          Originally posted by andyprough View Post
          "Using GCC to build Firefox can at times lead to build problems given Mozilla's Clang focus and reportedly also in some instances less than ideal performance." I've built Firefox using GCC more times than I can count, and I find this statement a little hard to believe.
          The part about build problems? Those are repeatedly well documented whenever there are major changes. Also for Chromium. If you are sure you can do better, please contribute and be part of the Fedora package group for those packages. Other distros (such as Debian) use the compiler (clang/llvm) that upstream uses to reduce the work to package these large and complex packages. Forcing the Fedora packagers to perform hoop jumping is long past time to be eliminated. Individuals who wish to use gcc are still free to do so.

          Firefox built locally with GCC always out-performs distro binaries.
          And this is surprising to anyone why? Building locally with native architecture flags almost always produces faster code. Real distro package have to compromise to the LCD.

          It could be that a locally built Clang version would out-perform a GCC build, but I'd have to see some testing.
          We look forward to your statistically valid testing result.

          Comment


          • #6
            Originally posted by angrypie View Post
            Aren't there RPM macros for clang already? Did they really go out of their way to force GCC?
            Yes, due to the existing Fedora policy, they really went out of their way to force GCC even when upstream primarily tested with clang/llvm. While some distro packagers happen to be great coders, many have other talents (including being good packagers), and have to recruit others to assist in any code changes necessary.

            A lot of upstream codes are compiler agnostic. But the examples used (firefox, chromium) are only reliably tested with clang/llvm upstream, and as (very) large, (very) complex code bases this can be a large burden.

            Comment


            • #7
              What standard library will they use for the clang builds?

              stdlibc++ or libc++

              Comment


              • #8
                Most of the issues I've had compiling chromium have been due to Google using libc++ and me using gcc's stdlibc++

                Yes there aren't as many compile errors with clang but there's still quite a few

                Clang & lld do LTO rather well

                Comment


                • #9
                  I can see this becoming a slippery slope towards incompatibility.

                  If it is not Red Hat/Fedora making sure software remains compatible with GCC, chances are in very short order it will stop being the case for the web browser engines.

                  Comment


                  • #10
                    Why is GCC compatibility so important? As long as it compiles on a shipping compiler it should be fine. Why should developers contort themselves making GCC work? Code moves in, GCC can either come to the plate or cede the territory.

                    Comment

                    Working...
                    X