summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.pre.mk
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2009-01-15 02:41:26 +0000
committerrodrigc <rodrigc@FreeBSD.org>2009-01-15 02:41:26 +0000
commitcc4917abc99a62355fedeb38f7f9f55f51385227 (patch)
tree1cfe0b04efecf4cae3e41702985e456d7f75c0a2 /sys/conf/kern.pre.mk
parentc35272189093b4afa8424334b5550f146b5ab1aa (diff)
downloadFreeBSD-src-cc4917abc99a62355fedeb38f7f9f55f51385227.zip
FreeBSD-src-cc4917abc99a62355fedeb38f7f9f55f51385227.tar.gz
When building up the command-line for the DTrace ctfmerge and ctfconvert
utilities, add the ${DEBUG} variable from the kernel config. Otherwise, if we build a kernel with WITH_CTF=1 set, ctfmerge will not have the -g flag set. In this case, the cc has -g specified, so the .o files will have debug information generated, but since ctfmerge does not have -g set, it will strip out the ELF sections containing the DWARF debugging info, leading to a kernel without debugging symbols. Reviewed by: jb
Diffstat (limited to 'sys/conf/kern.pre.mk')
-rw-r--r--sys/conf/kern.pre.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index ee74a9e..9eaf582 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -129,7 +129,7 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
.if defined(CTFCONVERT)
-NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+NORMAL_CTFCONVERT= ${CTFCONVERT} ${DEBUG} ${CTFFLAGS} ${.TARGET}
.else
NORMAL_CTFCONVERT=
.endif
@@ -143,7 +143,7 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
SYSTEM_OBJS+= hack.So
.if defined(CTFMERGE)
-SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
+SYSTEM_CTFMERGE= ${CTFMERGE} ${DEBUG} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
LD+= -g
.endif
SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \
OpenPOWER on IntegriCloud