Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf Move the ctfmerge call from SYSTEM_LD_TAIL (used by...



details:   https://anonhg.NetBSD.org/src/rev/513dec91e386
branches:  trunk
changeset: 982214:513dec91e386
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Apr 05 06:22:00 2021 +0000

description:
Move the ctfmerge call from SYSTEM_LD_TAIL (used by both STAGE1 and STAGE2)
to SYSTEM_LD_TAIL_STAGE2 only.  ctfmerge is slow enough that just calling
it once is enough.

diffstat:

 sys/conf/Makefile.kern.inc |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r 90b2a750a0ec -r 513dec91e386 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Mon Apr 05 05:47:31 2021 +0000
+++ b/sys/conf/Makefile.kern.inc        Mon Apr 05 06:22:00 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.277 2021/01/31 23:17:21 rillig Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.278 2021/04/05 06:22:00 simonb Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -210,11 +210,6 @@
 SYSTEM_LIB=    ${MD_LIBS} ${LIBKERN}
 SYSTEM_OBJ?=   ${_MD_OBJS} ${OBJS} ${SYSTEM_LIB}
 SYSTEM_DEP+=   Makefile ${SYSTEM_OBJ:O}
-.if defined(CTFMERGE)
-SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
-.else
-SYSTEM_CTFMERGE= ${_MKSHECHO}
-.endif
 
 REMOVE_SWAP=   [@]
 .for k in ${KERNELS}
@@ -242,7 +237,7 @@
 LINKFLAGS_DEBUG?=      -X
 
 SYSTEM_LD_TAIL?=@${TOOL_SED} '/const char sccs/!d;s/.*@(.)//;s/" "//;s/\\.*//' vers.c && \
-               ${SIZE} $@ && ${SYSTEM_CTFMERGE} && chmod 755 $@
+               ${SIZE} $@ && chmod 755 $@
 SYSTEM_LD_TAIL_DEBUG?=&& \
                echo mv -f $@ $@.gdb && mv -f $@ $@.gdb && \
                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb && \
@@ -265,6 +260,11 @@
 SYSTEM_LD_HEAD+=       ${SYSTEM_LD_HEAD_EXTRA}
 SYSTEM_LD_TAIL_STAGE1= ${SYSTEM_LD_TAIL}
 SYSTEM_LD_TAIL_STAGE2= ${SYSTEM_LD_TAIL}
+.if defined(CTFMERGE)
+SYSTEM_LD_TAIL_STAGE2+= && echo ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ... \
+                       && time -t ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} \
+                           ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
+.endif
 .if defined(COPY_SYMTAB)
 SYSTEM_LD_TAIL_STAGE2+=        && echo ${DBSYM} $@ && ${DBSYM} $@
 .if !empty(DEBUG:M-g)



Home | Main Index | Thread Index | Old Index