From: James Bottomley Date: Thu, 21 Jun 2012 07:50:02 +0000 (+0000) Subject: SCSI: lpfc: fix problems with -Werror X-Git-Tag: v3.5.5~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4134110803b08c03f051a1c7379474f28ebec83;p=thirdparty%2Fkernel%2Fstable.git SCSI: lpfc: fix problems with -Werror commit 4bdd03e61b7a5c4c6bc2b25d46fcd491788fdfb3 upstream. Commit d38bd3aef ("Add -Werror compilation flag") is causing build breakage with random gcc incarnations. These look like gcc problems, but we shouldn't break the build because of a bad gcc. Fix this by adding a make flag WARNINGS_BECOME_ERRORS=1 which is the same as aic7xxx uses so ordinarily the build doesn't use -Werror Reported-by: Fengguang Wu Cc: Alex Iannicelli Cc: James Smart Cc: Jonathan Nieder Cc: Mike Pagano Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/lpfc/Makefile b/drivers/scsi/lpfc/Makefile index fe5d396aca73b..e2516ba8ebfa9 100644 --- a/drivers/scsi/lpfc/Makefile +++ b/drivers/scsi/lpfc/Makefile @@ -22,7 +22,9 @@ ccflags-$(GCOV) := -fprofile-arcs -ftest-coverage ccflags-$(GCOV) += -O0 +ifdef WARNINGS_BECOME_ERRORS ccflags-y += -Werror +endif obj-$(CONFIG_SCSI_LPFC) := lpfc.o