Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2005 11:58:48 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "David O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf kern.post.mk
Message-ID:  <20050913085848.GG37280@ip.net.ua>
In-Reply-To: <20050913071031.GE37280@ip.net.ua>
References:  <20050911002229.51F4916A471@hub.freebsd.org> <432382BC.5080105@root.org> <20050911023622.GA51877@dragon.NUXI.org> <4324A665.3070405@root.org> <20050912010034.GA77819@dragon.NUXI.org> <20050913071031.GE37280@ip.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--PMULwz+zIGJzpDN9
Content-Type: multipart/mixed; boundary="FUaywKC54iCcLzqT"
Content-Disposition: inline


--FUaywKC54iCcLzqT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 13, 2005 at 10:10:31AM +0300, Ruslan Ermilov wrote:
> Hi,
>=20
> On Sun, Sep 11, 2005 at 06:00:34PM -0700, David O'Brien wrote:
> > On Sun, Sep 11, 2005 at 02:49:25PM -0700, Nate Lawson wrote:
> > > David O'Brien wrote:
> > > >I was going to just install kernel.sym instead of a kernel with symb=
ols,
> > > >but kgdb's usage doesn't claim to support '-s' as the previous kgdb =
did.
> > >=20
> > > kernel.sym would be better since it wouldn't have the duplication tha=
t=20
> > > kernel and kernel.debug have.
> >=20
> > Duplication in RELENG_* or in HEAD?
> >=20
> > > Alternately, we can make loader(8) skip=20
> > > symbol sections when booting and just install kernel.debug
> >=20
> > That *is* what my change does - except it calls it "kernel" so there
> > aren't loading issues.
> > =20
> What was wrong with using installkernel.debug or "make installkernel
> -DINSTALL_DEBUG" (the latter is useful when you don't know if your
> kernel was compiled with debug or not)?  IOW, why enforce it?
>=20
I'm not saying the idea is necessarily bad, but I'm not at all happy
about the implementation in rev. 1.84.

Before this change, we had installkernel.debug installing both normal
and *.debug versions of kernel and module objects, and gdb scripts.
And that was consistent.

Now, installkernel.debug no longer installs kernel.debug but continues
to install both normal and *.debug module objects.

Also, it's very uneasy now to revert the behavior to installing only
normal objects when DEBUG is defined, e.g. for STABLE branches.

The floppies.1 target of "make release" will now provide the debugging
kernel as well.  I'm not sure if this is good or not.

To address all of this, I suggest to revert kern.post.mk to rev. 1.83
and just make INSTALL_DEBUG the default in HEAD when DEBUG is also
set.  Should this be also true for modules, I'm not sure.

My only question is do we want to install both versions of kernel and
module objects, like we did before, or install debug versions over
normal ones.  My favour is the former, because it's consistent with
documentation and POLA in general.

The only change in behavior would be that installkernel.debug now
installs *both* normal and debug versions, while previously it only
installed debug versions.

I didn't make INSTALL_DEBUG default for modules in the attached patch
because it consumes 64M on yesterday's amd64 build, and that looks
like too much.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--FUaywKC54iCcLzqT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p
Content-Transfer-Encoding: quoted-printable

Index: kern.post.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
RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v
retrieving revision 1.83
diff -u -r1.83 kern.post.mk
--- kern.post.mk	9 Jun 2005 05:38:18 -0000	1.83
+++ kern.post.mk	13 Sep 2005 08:44:55 -0000
@@ -66,6 +66,8 @@
 .if !defined(DEBUG)
 FULLKERNEL=3D	${KERNEL_KO}
 .else
+# In HEAD, we want to install .debug version by default.
+INSTALL_DEBUG=3D
 FULLKERNEL=3D	${KERNEL_KO}.debug
 ${KERNEL_KO}: ${FULLKERNEL}
 	${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO}
@@ -207,17 +209,15 @@
 	mkdir -p ${DESTDIR}${KODIR}
 .if defined(DEBUG) && defined(INSTALL_DEBUG)
 	${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR}
-.else
-	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
 .endif
+	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
=20
 kernel-reinstall:
 	@-chflags -R noschg ${DESTDIR}${KODIR}
 .if defined(DEBUG) && defined(INSTALL_DEBUG)
 	${INSTALL} -p -m 555 -o root -g wheel ${FULLKERNEL} ${DESTDIR}${KODIR}
-.else
-	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
 .endif
+	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
=20
 config.o env.o hints.o vers.o vnode_if.o:
 	${NORMAL_C}
Index: kmod.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
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.193
diff -u -r1.193 kmod.mk
--- kmod.mk	7 Sep 2005 17:38:46 -0000	1.193
+++ kmod.mk	13 Sep 2005 08:51:17 -0000
@@ -147,6 +147,8 @@
 FULLPROG=3D	${PROG}
 .else
 FULLPROG=3D	${PROG}.debug
+# In HEAD, we want to install .debug version by default.
+#INSTALL_DEBUG=3D
 ${PROG}: ${FULLPROG}
 	${OBJCOPY} --strip-debug ${FULLPROG} ${PROG}
 .endif
@@ -252,7 +254,7 @@
 .if defined(DEBUG_FLAGS) && defined(INSTALL_DEBUG)
 	${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
 	    ${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR}
-.else
+.endif
 	${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
 	    ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
=20
@@ -268,7 +270,6 @@
 		kldxref ${DESTDIR}${KMODDIR}; \
 	fi
 .endif
-.endif
 .endif # !target(realinstall)
=20
 .endif # !target(install)

--FUaywKC54iCcLzqT--

--PMULwz+zIGJzpDN9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFDJpTIqRfpzJluFF4RApU5AJwJqhl2tB6vWOXLz06QND/N5XhfkQCeMh+Z
JSJ1L55OSEElin7oiOEI+AI=
=CyWQ
-----END PGP SIGNATURE-----

--PMULwz+zIGJzpDN9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050913085848.GG37280>