[SCSI] lpfc: fix problems with -Werror
authorJames Bottomley <jbottomley@parallels.com>
Thu, 21 Jun 2012 07:50:02 +0000 (07:50 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 20 Jul 2012 07:58:54 +0000 (08:58 +0100)
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 <fengguang.wu@intel.com>
Cc: Alex Iannicelli <alex.iannicelli@emulex.com>
Cc: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/Makefile

index fe5d396aca73b7b6bc13e0d8fd3199f9759b7a82..e2516ba8ebfa91a25a50a8f21b9797914f73c196 100644 (file)
@@ -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