From owner-freebsd-drivers@FreeBSD.ORG Wed Jul 10 16:05:45 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DB6DE424 for ; Wed, 10 Jul 2013 16:05:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id BAFBC1AAC for ; Wed, 10 Jul 2013 16:05:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3B881B94A; Wed, 10 Jul 2013 12:05:45 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: Newbie question - Custom compiler flags in Makefile Date: Wed, 10 Jul 2013 11:57:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307101157.13096.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Jul 2013 12:05:45 -0400 (EDT) X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 16:05:45 -0000 On Tuesday, July 02, 2013 4:53:50 am Arjun wrote: > Hey, > > I am writing a memory driver and i am using the standard freebsd driver > Makefile which includes .bsd.kmod.mk > > So, this comes with its own compiler flags. Specifically, i dont want the > -Wmissing-prototypes option. How do i remove it. > > In general, how can one change the default compiler flags for compilation. ? > > I read bsd.sys.mk file and it seems that for the above option to be > removed, i need to have WARNS <3. But i want all other -W options except > for this. > > How do i do this.? > > Any help is appreciated. Well, you could just add the missing prototypes. :) However, you can probably manipulate CFLAGS using the modifiers make supports? Something like: CFLAGS = ${CFLAGS:N-Wmissing-prototype} (might need := rather than =) -- John Baldwin