From owner-freebsd-bugs@FreeBSD.ORG Mon May 29 15:10:29 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 337B316AB30 for ; Mon, 29 May 2006 15:10:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC90843D5E for ; Mon, 29 May 2006 15:10:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4TFAD70055329 for ; Mon, 29 May 2006 15:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4TFADBh055327; Mon, 29 May 2006 15:10:13 GMT (envelope-from gnats) Resent-Date: Mon, 29 May 2006 15:10:13 GMT Resent-Message-Id: <200605291510.k4TFADBh055327@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E20116A640 for ; Mon, 29 May 2006 15:01:07 +0000 (UTC) (envelope-from dan@kulesh.obluda.cz) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [195.113.24.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93BFF43D55 for ; Mon, 29 May 2006 15:01:06 +0000 (GMT) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (openvpn.ms.mff.cuni.cz [195.113.20.87]) by smtp1.kolej.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k4TF12qM066574 for ; Mon, 29 May 2006 17:01:04 +0200 (CEST) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (localhost [127.0.0.1] (may be forged)) by kulesh.obluda.cz (8.13.6/8.13.6) with ESMTP id k4TF12Qj077862 for ; Mon, 29 May 2006 17:01:02 +0200 (CEST) (envelope-from dan@kulesh.obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.6/8.13.6/Submit) id k4TF11wn077841; Mon, 29 May 2006 17:01:01 +0200 (CEST) (envelope-from dan) Message-Id: <200605291501.k4TF11wn077841@kulesh.obluda.cz> Date: Mon, 29 May 2006 17:01:01 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/98091: [ patch ] Makefile style of mfi kernel module broke the WARNS/NO_WERROR logic X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 15:10:35 -0000 >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@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: