kern/98091: [ patch ] Makefile style of mfi kernel module broke the WARNS/NO_WERROR logic

Dan Lukes dan at obluda.cz
Mon May 29 08:10:35 PDT 2006


>Number:         98091
>Category:       kern
>Synopsis:       [ patch ] Makefile style of mfi kernel module broke the WARNS/NO_WERROR logic
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 29 15:10:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
Obludarium
>Environment:
System: FreeBSD kulesh.obluda.cz 6.1-STABLE FreeBSD 6.1-STABLE #3: Mon May 15 02:41:49 CEST 2006 dan at kulesh.obluda.cz:/usr/obj/usr/src/sys/KULESH i386
src/sys/modules/mfi/Makefile,v 1.1.2.1 2006/04/04 03:24:49 scottl

>Description:
	The forced use of -Werror in CFLAGS made module uncompilable in some environments 
(when -O3 and requested, for example):
/usr/src/sys/modules/mfi/../../dev/mfi/mfi.c: In function 
fi_attach':
@/dev/mfi/mfivar.h:259: warning: inlining failed in call to 'mfi_dequeue_free': --param in
line-unit-growth limit reached
/usr/src/sys/modules/mfi/../../dev/mfi/mfi.c:434: warning: called from here
@/dev/mfi/mfivar.h:259: warning: inlining failed in call to 'mfi_dequeue_free': --param in
line-unit-growth limit reached
/usr/src/sys/modules/mfi/../../dev/mfi/mfi.c:475: warning: called from here
*** Error code 1
	


>How-To-Repeat:
	Add -O3 to CFLAGS then try to build the module
>Fix:

	Use WARNS logic included in on mod.sys.mk, not direct setting of CFLAGS

	It allow the user to customize CFLAGS using the NO_WERROR if necesarry.

--- sys/modules/mfi/Makefile.ORIG	Mon May 29 16:37:21 2006
+++ sys/modules/mfi/Makefile	Mon May 29 16:38:19 2006
@@ -6,7 +6,7 @@
 SRCS=	mfi.c mfi_pci.c mfi_disk.c
 SRCS+=	opt_mfi.h
 SRCS+=	device_if.h bus_if.h pci_if.h
-CFLAGS+= -Wall -Werror
+WARNS=	2
 
 # To enable debug output from the driver, uncomment these two lines.
 #CFLAGS+= -DMFI_DEBUG=2

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list