Announcement

Collapse
No announcement yet.

GCC 10 Likely To See "-flto=auto" Option

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

  • GCC 10 Likely To See "-flto=auto" Option

    Phoronix: GCC 10 Likely To See "-flto=auto" Option

    With OpenSUSE now LTO'ing their Tumbleweed packages by default, SUSE's compiler team is looking at improving the compilation experience and one of those steps is via a proposed "-flto=auto" option...

    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
    Huh, so if you just use -flto, you simply don't get any LTO parallelism? I'm amazed that this was not the default in the first place.
    Also I'm amazed how complicated the patchset has to be for what it is. Isn't gcc supposed to be C++? Are they rejecting to use the std library or have a good reason to not use std::thread::hardware_concurrency()?

    Comment


    • #3
      Originally posted by AsuMagic View Post
      Huh, so if you just use -flto, you simply don't get any LTO parallelism? I'm amazed that this was not the default in the first place.
      Also I'm amazed how complicated the patchset has to be for what it is. Isn't gcc supposed to be C++? Are they rejecting to use the std library or have a good reason to not use std::thread::hardware_concurrency()?
      They only use a small subset of C++ features to make bootstrapping easier, and even less of the standard library.

      Remember gcc also implements the standard library, and you can't write the standard library using the standard library.

      Comment


      • #4
        This should be the default

        Comment


        • #5
          Originally posted by carewolf View Post

          They only use a small subset of C++ features to make bootstrapping easier, and even less of the standard library.

          Remember gcc also implements the standard library, and you can't write the standard library using the standard library.
          What? Please someone correct me if I'm wrong. I'm no compiler expert, but GCC's compiler and GCC's standard library are two different things. Nothing prevents for the GCC compiler code to use libstdc++.

          Comment


          • #6
            Originally posted by AsuMagic View Post
            Huh, so if you just use -flto, you simply don't get any LTO parallelism? I'm amazed that this was not the default in the first place.
            Also I'm amazed how complicated the patchset has to be for what it is. Isn't gcc supposed to be C++? Are they rejecting to use the std library or have a good reason to not use std::thread::hardware_concurrency()?
            I think the code base used to be in C and then they migrated to C++. That's why the code looks a lot like C.

            Comment


            • #7
              Here list of gcc's dependencies. Basically ISO C++98 compiler, C standard library and headers and some tools.

              http://www.linuxfromscratch.org/lfs/...gcc-pass1.html
              Last edited by pkunk; 24 July 2019, 10:10 AM.

              Comment


              • #8
                Originally posted by Ignacio Taranto View Post

                What? Please someone correct me if I'm wrong. I'm no compiler expert, but GCC's compiler and GCC's standard library are two different things. Nothing prevents for the GCC compiler code to use libstdc++.
                I wouldn't say nothing. It is the same source code module, and they build gcc first to then build the standard library, not the other way around. If they wanted to reverse the order, then the standard library couldn't use GCC specific enhancements or builtins. Or they would need to write two gcc compilers, a bootstrapping one not using the standard library, and the final one using it. Right now the compiler is the first step and the one capable of being built by non-gcc compilers.

                But yes, they could use more C++ if they wanted to, but it would be controversial.

                Comment


                • #9
                  Looking forward to seeing ninja running 16 concurrent make jobs, each running 16 concurrent gcc jobs, and now each gcc process running 16 LTO threads, especially if that becomes the new default, LOL.

                  That's actually rather realistic when building a whole Linux distro, like with Yocto.
                  Last edited by andreano; 24 July 2019, 10:38 AM.

                  Comment


                  • #10
                    Originally posted by FireBurn View Post
                    This should be the default
                    I don't think so. If you changed the implicit contract that gcc runs a single thread unless explicitly told so, devops would be out there to murder you, because that patch caused the CI server to get hogged with a single build job.

                    Comment

                    Working...
                    X