Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2006 06:54:53 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 96293 for review
Message-ID:  <200604280654.k3S6srYW047764@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96293

Change 96293 by jb@jb_freebsd2 on 2006/04/28 06:54:29

	Add build support for CTF info in the kernel.
	
	This change involves 'config' because of the way that the 'compile-with'
	option in 'sys/conf/files' works. I don't think the config version 
	needs to change because using a version prior to this change will 
	simply build a kernel without symbols. That is not fatal, nor is it
	even remotely bad. It just means that you can't DTrace the symbols in
	the kernel.

Affected files ...

.. //depot/projects/dtrace/src/sys/conf/kern.post.mk#2 edit
.. //depot/projects/dtrace/src/sys/conf/kern.pre.mk#2 edit
.. //depot/projects/dtrace/src/usr.sbin/config/mkmakefile.c#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/conf/kern.post.mk#2 (text+ko) ====

@@ -86,6 +86,9 @@
 	@rm -f ${.TARGET}
 	@echo linking ${.TARGET}
 	${SYSTEM_LD}
+.if defined(CTFMERGE)
+	${SYSTEM_CTFMERGE}
+.endif
 .if !defined(DEBUG)
 	${OBJCOPY} --strip-debug ${.TARGET}
 .endif

==== //depot/projects/dtrace/src/sys/conf/kern.pre.mk#2 (text+ko) ====

@@ -131,6 +131,12 @@
 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}
+.else
+NORMAL_CTFCONVERT=
+.endif
+
 NORMAL_LINT=	${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
 
 GEN_CFILES= $S/$M/$M/genassym.c ${MFILES:T:S/.m$/.c/}
@@ -139,6 +145,10 @@
 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
+LD+= -g
+.endif
 SYSTEM_LD= @${LD} -Bdynamic -T $S/conf/ldscript.$M \
 	-warn-common -export-dynamic -dynamic-linker /red/herring \
 	-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o

==== //depot/projects/dtrace/src/usr.sbin/config/mkmakefile.c#2 (text+ko) ====

@@ -727,7 +727,7 @@
 				printf("config: don't know rules for %s\n", np);
 				break;
 			}
-			snprintf(cmd, sizeof(cmd), "${%s_%c%s}", ftype,
+			snprintf(cmd, sizeof(cmd), "${%s_%c%s}; ${NORMAL_CTFCONVERT}", ftype,
 			    toupper(och),
 			    ftp->f_flags & NOWERROR ? "_NOWERROR" : "");
 			compilewith = cmd;



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