From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753754AbcAGXCa (ORCPT ); Thu, 7 Jan 2016 18:02:30 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35804 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbcAGXC3 (ORCPT ); Thu, 7 Jan 2016 18:02:29 -0500 Date: Thu, 7 Jan 2016 15:02:25 -0800 From: Brian Norris To: Daniel Axtens Cc: Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Michael Neuling , Anton Blanchard , linux-kernel@vger.kernel.org, Michal Marek , Ian Munsie Subject: Re: Build failure: -Wno-unused-const-variable DNE on old GCC Message-ID: <20160107230225.GA126548@google.com> References: <20160107185406.GA65420@google.com> <10821353.mAlCTdTQBC@wuerfel> <87oacx6m14.fsf@gamma.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oacx6m14.fsf@gamma.ozlabs.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 08, 2016 at 09:51:35AM +1100, Daniel Axtens wrote: > > > Alternatively, remove the -Werror. We occasionally get people that add this > > flag to a Makefile, but it tends to cause more trouble whenever a new > > gcc version arrives. ^^ Your reasons below don't really address this point. No matter how well you patch a later kernel release, you can't fix a problem in an existing kernel release that is triggered by a new warning in a new compiler. This shouldn't cause a build failure. > Speaking up as the person who added -Werror to cxl, I'd really rather > it stayed. There are a number of reasons I think this. Here's the first > three that came to mind. > > - cxl is powerpc specific (and always will be for deep seated hardware > reasons), and is handled through the powerpc tree. arch/powerpc > compiles with -Werror, and as part of the powerpc ecosystem, cxl > should too. > > - It forces cxl developers to a higher standard. cxl has already had > more than it's fair share of incredibly difficult to debug issues, > so any way we can reduce the risk of errors going in makes our lives > (and our end-users lives) better. One problem with this point: not all warnings are under the purview of cxl developers. For instance, if I turn up warning verbosity (W=1), then the *header* files start producing plenty of warnings. Should this break the build? Your code didn't change, and you can't fix those errors. That is a real use case for me daily: I turn the warning verbosity up on my compile tests, then (smart)diff the build logs before and after new patches. That way, I can see what new warnings (even potentially false positive ones) are introduced. I can't do that if every random developer wants to stick -Werror in their Makefile. > - I am (and I'm quite confident the other cxl people are) quite happy to > send patches to fix build-breaking issues such as this. Indeed, I > would have, except you sent it during the Australian night :) > > If it's really super-duper important we can consider putting it behind a > config guard, but I'd really rather not. I think there are plenty of reasons to either remove -Werror, or make it configurable. Some of them are detailed above. Maybe you can gate the -Werror on CONFIG_PPC_WERROR, just like the rest of PowerPC? Brian