From nobody@FreeBSD.org  Mon Jan  2 11:16:25 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 46359106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2012 11:16:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 34AAD8FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2012 11:16:25 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q02BGO8I082202
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Jan 2012 11:16:24 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q02BGOsL082201;
	Mon, 2 Jan 2012 11:16:24 GMT
	(envelope-from nobody)
Message-Id: <201201021116.q02BGOsL082201@red.freebsd.org>
Date: Mon, 2 Jan 2012 11:16:24 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sfxge(4) explitly sets -g -DDEBUG=1; infects kernel build with debug symbols
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163775
>Category:       bin
>Synopsis:       [patch] sfxge(4) explitly sets -g -DDEBUG=1; infects kernel build with debug symbols
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 02 11:20:09 UTC 2012
>Closed-Date:    
>Last-Modified:  Tue Apr 30 12:30:02 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.0-PRERELEASE
>Organization:
n/a
>Environment:
FreeBSD bayonetta.local 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0 r229187M: Sun Jan  1 14:39:27 PST 2012     gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA  amd64
>Description:
The attached patch removes the explicit setting of DEBUG_FLAGS in sfxge/Makefile, s.t. it doesn't affect developers such as myself who depend on DEBUG_FLAGS to be a user-defined value and thus react accordingly via make.conf.
>How-To-Repeat:
1. Add the following to make.conf:

.if defined(DEBUG_FLAGS) && !empty(DEBUG_FLAGS)
.error "I didn't do it!"
.endif

2. Run `make buildkernel'.
>Fix:


Patch attached with submission follows:

Index: sys/modules/sfxge/Makefile
===================================================================
--- sys/modules/sfxge/Makefile	(revision 229264)
+++ sys/modules/sfxge/Makefile	(working copy)
@@ -20,6 +20,4 @@
 SRCS+=	siena_mac.c siena_nic.c siena_nvram.c siena_phy.c
 SRCS+=	siena_sram.c siena_vpd.c 
 
-DEBUG_FLAGS= -g -DDEBUG=1
-
 .include <bsd.kmod.mk>


>Release-Note:
>Audit-Trail:

From: r4721@tormail.org
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/163775: [patch] sfxge(4) explitly sets -g -DDEBUG=1; infects
 kernel build with debug symbols
Date: Tue, 30 Apr 2013 02:02:20 -0000

 ------=_20130430020220_20595
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit
 
 this is happen in mps driver also.
 ------=_20130430020220_20595
 Content-Type: text/plain; name="mps.txt"
 Content-Transfer-Encoding: 8bit
 Content-Disposition: attachment; filename="mps.txt"
 
 Index: sys/modules/mps/Makefile
 ===================================================================
 --- sys/modules/mps/Makefile	(revision 250078)
 +++ sys/modules/mps/Makefile	(working copy)
 @@ -9,7 +9,6 @@
  SRCS+=	device_if.h bus_if.h pci_if.h
  
  #CFLAGS += -DMPS_DEBUG
 -DEBUG_FLAGS += -g
  
  .include <bsd.kmod.mk>
  
 ------=_20130430020220_20595--
 
 
>Unformatted:
