From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362AbcAGU0O (ORCPT ); Thu, 7 Jan 2016 15:26:14 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:62791 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbcAGU0N (ORCPT ); Thu, 7 Jan 2016 15:26:13 -0500 From: Arnd Bergmann To: linuxppc-dev@lists.ozlabs.org Cc: Brian Norris , 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 Date: Thu, 07 Jan 2016 21:25:51 +0100 Message-ID: <10821353.mAlCTdTQBC@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160107185406.GA65420@google.com> References: <20160107185406.GA65420@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:RrHTFWMIKSNGmOQbRL15gksO6BK3eMNt342Ks8p5JmLQuFb8KK7 JFrsZkYDuzKv53RB9RX69P6UCcAmw7DQ0RmjEvbhgDCpI+iez4MilXTi5hLfFP7Ym571Lkp hL3aOWbe+IG4vCl3qCftw+xuKgo7gzqUwLVK0PjIwJiu/DTpQpCOAeyW1N5VN3jtBmSUGtW UGgV6RxcCWg4JWr2cigLw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZiOARjfp9FU=:NXG+TFTC1rCusaSmw0MDVp nNnsr6/3oyT8MdaK/upo7cNDTl5MVGP7h4KCKogvn/7v1W85Mww3qTczKLhUOdgnf90OkNKfu 7qJyJQia/SXqFzy17GwTXcasOpY+zvE2oPa+qmEmbgGzbW/OyE+U0U2OMg4YS+X2+Zg0hfLtH kd3PE1DRfDbK5Zv3WhJldjbOtVPclMbgucW5Lgi8fCPrFIxbyQnGPrPhw/QD8id3enPiVlbSY 9sJitgxHJUHVecZoqHj6prUggrS5xSLk7gFxoNIwt5cB98kfwnNE+QFJPx6eiP2n/cyMVe2g8 eaq4ZQWK9vxobdqit9MnYfnGm4NUyHEtICum5DKGYQNbczkGNfu0FlY7GRQxA/apEgrL2XMwr i/Ebw+AZpFdSaWVyzp5AZzUEsCSK3IV8jQ4qWm2XsMBOwG2NE1T58jeFJBKawfIFlua5TiDxA d4O5fjfwGYIKiL3UkLCpU5vC3zYUSR4rw7G/6My7srKLsim+qHnYGT9ZW4ZPwSucs43HkNnzk rRwar/jLcKNGSNy+nnp2/adoly64xmetBu3zokzGC/d3dCqvBsNuY3dm5YfjJRK6QTPece7zh e4cJtIFJNJButCZ1nv1jvcFttmWNK0wgXNGgHgZZ+swtMvPMcGXaPwbYjRckINpUtsh3Hiqiq 06o76EftzFjYUsYGFsFXaJutxcwkgGXHakum9P5M2dlclhIWMbJo2MDPN/gCRUpGXkNeTLUWl 7IYO7nEPombnYQ57 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 07 January 2016 10:54:06 Brian Norris wrote: > > I'm using a GCC 4.6.3 compiler for some compile tests, and I noticed > that commit 2cd55c68c0a4 ("cxl: Fix build failure due to -Wunused-variable > behaviour change") breaks my builds, because the > -Wno-unused-const-variable doesn't exist on GCC 4.6.3. > > drivers/misc/cxl/base.c: At top level: > cc1: error: unrecognized command line option "-Wno-unused-const-variable" [-Werror] > > Any thoughts on how to best fix this? I'd like not to have to scrounge > up a new cross compiler just for build tests. > This should do: diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile index 6982f603fadc..add2cc17ed91 100644 --- a/drivers/misc/cxl/Makefile +++ b/drivers/misc/cxl/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Werror -Wno-unused-const-variable +ccflags-y := -Werror $(call cc-disable-warning,unused-const-variable) cxl-y += main.o file.o irq.o fault.o native.o cxl-y += context.o sysfs.o debugfs.o pci.o trace.o 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. Arnd