summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-06-07 21:40:02 +0000
committeremaste <emaste@FreeBSD.org>2013-06-07 21:40:02 +0000
commit390d8402e005d267efedefcb438af08e196b3d95 (patch)
tree1f627bceaf932e22013baa1c3a548108de20a7f1 /etc
parent6445326c71cfbc6642679290f0fed222d43f477f (diff)
downloadFreeBSD-src-390d8402e005d267efedefcb438af08e196b3d95.zip
FreeBSD-src-390d8402e005d267efedefcb438af08e196b3d95.tar.gz
Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries. The "-g" debug flag is automatically applied when WITH_DEBUG_FILES is set. The debug files are now named ${prog}.debug and ${shlib}.debug for consistency with other systems and documentation. In addition they are installed under /usr/lib/debug, to simplify the process of installing them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the base system place the standalone debug files in a .debug subdirectory. GDB automatically searches both of these directories for standalone debug files. Thanks to everyone who contributed changes, review, and testing during development.
Diffstat (limited to 'etc')
-rw-r--r--etc/Makefile6
-rw-r--r--etc/mtree/BSD.debug.dist48
-rw-r--r--etc/mtree/Makefile4
3 files changed, 58 insertions, 0 deletions
diff --git a/etc/Makefile b/etc/Makefile
index c0806e8..f509a19 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -143,6 +143,9 @@ MTREE+= BIND.chroot.dist
MTREE+= BIND.include.dist
.endif
.endif
+.if ${MK_DEBUG_FILES} != "no"
+MTREE+= BSD.debug.dist
+.endif
PPPCNF= ppp.conf
@@ -312,6 +315,9 @@ MTREES= mtree/BSD.root.dist / \
mtree/BSD.var.dist /var \
mtree/BSD.usr.dist /usr \
mtree/BSD.include.dist /usr/include
+.if ${MK_DEBUG_FILES} != "no"
+MTREES+= mtree/BSD.debug.dist /usr/lib
+.endif
.if ${MK_BIND_LIBS} != "no"
MTREES+= mtree/BIND.include.dist /usr/include
.endif
diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist
new file mode 100644
index 0000000..ab75d0f
--- /dev/null
+++ b/etc/mtree/BSD.debug.dist
@@ -0,0 +1,48 @@
+# $FreeBSD$
+#
+# Please see the file src/etc/mtree/README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+ debug
+ bin
+ ..
+ boot
+ ..
+ lib
+ geom
+ ..
+ ..
+ libexec
+ ..
+ sbin
+ ..
+ usr
+ bin
+ ..
+ games
+ ..
+ lib
+ engines
+ ..
+ ..
+ lib32
+ ..
+ libexec
+ bsdinstall
+ ..
+ lpr
+ ru
+ ..
+ ..
+ sendmail
+ ..
+ sm.bin
+ ..
+ ..
+ sbin
+ ..
+ ..
+ ..
+..
diff --git a/etc/mtree/Makefile b/etc/mtree/Makefile
index 15da1bf..06aeb19 100644
--- a/etc/mtree/Makefile
+++ b/etc/mtree/Makefile
@@ -4,6 +4,7 @@
FILES= ${_BIND.chroot.dist} \
${_BIND.include.dist} \
+ ${_BSD.debug.dist} \
BSD.include.dist \
BSD.root.dist \
${_BSD.sendmail.dist} \
@@ -16,6 +17,9 @@ _BIND.chroot.dist= BIND.chroot.dist
_BIND.include.dist= BIND.include.dist
.endif
.endif
+.if ${MK_DEBUG_FILES} != "no"
+_BSD.debug.dist= BSD.debug.dist
+.endif
.if ${MK_GROFF} != "no"
_BSD.groff.dist= BSD.groff.dist
.endif
OpenPOWER on IntegriCloud