Date: Mon, 24 Mar 2014 14:09:50 -0600 From: Warner Losh <imp@bsdimp.com> To: Ian Lepore <ian@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric <dim@FreeBSD.org> Subject: Re: svn commit: r263692 - head Message-ID: <78B026E6-219F-436A-92F1-0C913344899C@bsdimp.com> In-Reply-To: <1395691301.81853.61.camel@revolution.hippie.lan> References: <201403241921.s2OJLFuh050413@svn.freebsd.org> <B806F9C4-1918-4BF4-9FF8-84FE60C49034@gmail.com> <75AEE837-AD15-4310-B318-80BC12D9F89E@FreeBSD.org> <1395691301.81853.61.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 24, 2014, at 2:01 PM, Ian Lepore <ian@FreeBSD.org> wrote: > On Mon, 2014-03-24 at 20:47 +0100, Dimitry Andric wrote: >> On 24 Mar 2014, at 20:36, Warner Losh <imp@bsdimp.com> wrote: >>> On Mar 24, 2014, at 1:21 PM, Dimitry Andric <dim@FreeBSD.org> 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=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78B026E6-219F-436A-92F1-0C913344899C>