From owner-svn-src-all@FreeBSD.ORG Mon Mar 24 20:01:50 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81A65169; Mon, 24 Mar 2014 20:01:50 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECA12B9; Mon, 24 Mar 2014 20:01:49 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WSB43-00030C-BT; Mon, 24 Mar 2014 20:01:43 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s2OK1fJn075456; Mon, 24 Mar 2014 14:01:41 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+Tfbpe6iaznA5bN56t+epl Subject: Re: svn commit: r263692 - head From: Ian Lepore To: Dimitry Andric In-Reply-To: <75AEE837-AD15-4310-B318-80BC12D9F89E@FreeBSD.org> References: <201403241921.s2OJLFuh050413@svn.freebsd.org> <75AEE837-AD15-4310-B318-80BC12D9F89E@FreeBSD.org> Content-Type: multipart/mixed; boundary="=-0/AsZsbLGY1dOja0fiDt" Date: Mon, 24 Mar 2014 14:01:41 -0600 Message-ID: <1395691301.81853.61.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 20:01:50 -0000 --=-0/AsZsbLGY1dOja0fiDt Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by damnhippie.dyndns.org id s2OK1fJn075456 On Mon, 2014-03-24 at 20:47 +0100, Dimitry Andric wrote: > On 24 Mar 2014, at 20:36, Warner Losh wrote: > > On Mar 24, 2014, at 1:21 PM, Dimitry Andric wrote: > >> Author: dim > >> Date: Mon Mar 24 19:21:14 2014 > >> New Revision: 263692 > >> URL: http://svnweb.freebsd.org/changeset/base/263692 > >>=20 > >> Log: > >> Add a note to UPDATING about customized kernel configuration files n= ow > >> requiring -gdwarf-2 for debug info, when using clang 3.4. > >=20 > > Makes we wonder why we didn=92t put this in kmod.mk=85 Is there any = reason not do? >=20 > For modules, you can just DEBUG_FLAGS, like for world. But there is no > default value of DEBUG_FLAGS in kmod.mk, at least I don't see any. >=20 > -Dimitry >=20 I guessing he meant kern.mk so that it would be in effect for both kernel and modules build. Something like this (which I've tested only for building an arm kernel without modules so far)... -- Ian --=-0/AsZsbLGY1dOja0fiDt Content-Disposition: inline; filename="gdwarf2.diff" Content-Type: text/x-patch; name="gdwarf2.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/conf/kern.mk =================================================================== --- sys/conf/kern.mk (revision 263112) +++ sys/conf/kern.mk (working copy) @@ -162,3 +162,7 @@ CFLAGS+= -ffreestanding ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif + +.if ${COMPILER_TYPE} == "clang" && !empty(CFLAGS:M-g*) && empty(CFLAGS:M-gdwarf*) +CFLAGS+= -gdwarf-2 +.endif --=-0/AsZsbLGY1dOja0fiDt--