From owner-svn-src-head@FreeBSD.ORG Mon Mar 24 20:09:59 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 161E069C for ; Mon, 24 Mar 2014 20:09:59 +0000 (UTC) Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3EE932F for ; Mon, 24 Mar 2014 20:09:58 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id o15so6019674qap.9 for ; Mon, 24 Mar 2014 13:09:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=x9GDeKVcSPkE7Mvovmn3zM4ELbArpe3l/WLbukVqCgw=; b=Qrv2NWgdyhXDeo9Dr/mXFKjZsihzK9hESEZaSGFDylAEkbDS1zmJug9bxCmB30+1dH jcJMeIgFt7RBS1o9hFx6Wee1GI7bzqlW3RIdCLkNofrln4WmWZQo7lpA1Fu6Dpm9qRCE Lu6teE6CvcIVhooIUH0oXJbRLU82tFHk7TE4yigJHnhPYOfUCQOrTPULj08R2oNFkL7r d/D0wCT+7RL9TtY+1+lDzzVkx2GsXvofVyjcanYUYbtVarnXvs8cPAPFadE5UOxDAIV1 A1Ssq/8vwd2F8NZkDlKqivJdknluzCXTULJEfXtr+PYZqDmnZu6t1KNAHCkd8qWD2akC 7dHA== X-Gm-Message-State: ALoCoQlR41HTYhtiEfm995zzammniczQbjTc+vvr+6VCYKeD3/9NblviMDCUI/xA7dMC/VTryWAQ X-Received: by 10.140.95.230 with SMTP id i93mr74345785qge.1.1395691792135; Mon, 24 Mar 2014 13:09:52 -0700 (PDT) Received: from netflix-mac.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id b16sm28060655qag.14.2014.03.24.13.09.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 13:09:51 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=windows-1251 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: svn commit: r263692 - head From: Warner Losh In-Reply-To: <1395691301.81853.61.camel@revolution.hippie.lan> Date: Mon, 24 Mar 2014 14:09:50 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <78B026E6-219F-436A-92F1-0C913344899C@bsdimp.com> References: <201403241921.s2OJLFuh050413@svn.freebsd.org> <75AEE837-AD15-4310-B318-80BC12D9F89E@FreeBSD.org> <1395691301.81853.61.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1874) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 20:09:59 -0000 On Mar 24, 2014, at 2:01 PM, Ian Lepore wrote: > 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 = now >>>> 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 >=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)... >=20 > -- Ian >=20 > Index: sys/conf/kern.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/conf/kern.mk (revision 263112) > +++ sys/conf/kern.mk (working copy) > @@ -162,3 +162,7 @@ CFLAGS+=3D -ffreestanding > ${MACHINE_CPUARCH} !=3D "arm" && ${MACHINE_CPUARCH} !=3D "mips" > CFLAGS+=3D -fstack-protector > .endif > + > +.if ${COMPILER_TYPE} =3D=3D "clang" && !empty(CFLAGS:M-g*) && = empty(CFLAGS:M-gdwarf*) > +CFLAGS+=3D -gdwarf-2 > +.endif Exactly. We don=92t need more kludge-o-ramas for this in the config = files, we need fewer. Since clang doesn=92t play well with the kernel on = this detail, and since the kernel makefiles can cope, we should make = them rather than having it hard-coded in lots of config files (or std.* = files) that we=92ll just need to remove later when we have a dwarf 4 = solution. Warner=