Announcement

Collapse
No announcement yet.

Linux 5.15 Enabling "-Werror" By Default For All Kernel Builds

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

  • Linux 5.15 Enabling "-Werror" By Default For All Kernel Builds

    Phoronix: Linux 5.15 Enabling "-Werror" By Default For All Kernel Builds

    A change made by Linus Torvalds and merged today for Linux 5.15 is enabling the "-Weror" compiler flag by default for all kernel builds...

    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
    Typo:

    Originally posted by phoronix View Post
    Phoronix: Linux 5.15 Enabling "-Werror" By Default For All Kernel Builds

    A change made by Linus Torvalds and merged today for Linux 5.15 is enabling the "-Weror" compiler flag by default for all kernel builds...

    https://www.phoronix.com/scan.php?pa...ux-5.15-Werror
    Amazing! I've been using -Werror for a while now (besides -Wall, -Wextra and -Wno-unused-parameter) and really helps with code quality.

    Now if only the Mesa developers were to do this instead of hiding warnings....
    Last edited by tildearrow; 05 September 2021, 04:09 PM. Reason: add reference

    Comment


    • #3
      While I understand it and respect Sir Linus,

      Comment


      • #4
        It seems like a good idea on the face of it but compilers flag up more and more things as warnings with every release, meaning that trying to build older kernels with newer compilers won't work. Good thing it's configurable.

        Comment


        • #5
          it will specially effect the staging drivers, maybe cause a remove of bad maintained staging drivers. It is not bad, open source is not about releasing code. It is about to maintain code together with a community in public repositories.

          Comment


          • #6
            Originally posted by Chewi View Post
            It seems like a good idea on the face of it but compilers flag up more and more things as warnings with every release, ...
            The key is mostly in which warnings are enabled. I was glad to see this part:

            "We ... will disable specific over-eager warnings as required, if we can't fix them."

            As long as you enable only the warnings with an extremely low false-positive rate, then it should be fine. Of course, that means certain things will be missed, but you can do additional static analysis not as part of the build.

            Comment


            • #7
              Originally posted by perpetually high View Post
              While I understand it and respect Sir Linus,
              The biggest problem I have with static analysis (besides too much time wasted "fixing" false-positive warnings) is the false sense of security some people seem to take from it. It's only one tool in the toolbox. Over-reliance on any one tool is going to be unproductive.

              Comment


              • #8
                The fact this has not been enabled until now is ridiculous.

                Comment


                • #9
                  Originally posted by perpetually high View Post
                  While I understand it and respect Sir Linus,
                  Why would they want to do the right thing when they can do the wrong thing instead.

                  Comment


                  • #10
                    Ideally they'll add "-Werror=format-security" to new versions, like Fedora does. Don't complain that it's more difficult for someone else to write defensive code, when you're the one most affected.

                    Comment

                    Working...
                    X