Module Name: src Committed By: uebayasi Date: Thu Aug 27 03:17:46 UTC 2015
Modified Files: src/sys/arch/usermode/conf: Makefile.usermode src/sys/conf: Makefile.kern.inc Log Message: Echo exact objects (swap*.o etc.) when linking kernel. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/usermode/conf/Makefile.usermode cvs rdiff -u -r1.193 -r1.194 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/conf/Makefile.usermode diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.37 src/sys/arch/usermode/conf/Makefile.usermode:1.38 --- src/sys/arch/usermode/conf/Makefile.usermode:1.37 Mon Aug 24 14:04:25 2015 +++ src/sys/arch/usermode/conf/Makefile.usermode Thu Aug 27 03:17:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.usermode,v 1.37 2015/08/24 14:04:25 uebayasi Exp $ +# $NetBSD: Makefile.usermode,v 1.38 2015/08/27 03:17:46 uebayasi Exp $ USETOOLS?= no NEED_OWN_INSTALL_TARGET?= no @@ -70,11 +70,15 @@ TEXTADDR?= %TEXTADDR% LINKFLAGS_NORMAL= -X KERNLDSCRIPT?= ${USERMODE}/conf/kern.ldscript -SYSTEM_LD= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ +SYSTEM_LD= @do_system_ld() { \ + target=$$1; shift; \ + ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o ${USERMODE_LIBS}; \ + ${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o ${USERMODE_LIBS} $$@; \ ${SYSTEM_LD_FIX} \ - ${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o ${USERMODE_LIBS} + ${CC} -static ${COPTS} -Wl,-Map,$@.map -o $@ ${LINKFORMAT} -Ttext ${TEXTADDR} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o ${USERMODE_LIBS} $$@; \ + }; \ + do_system_ld NVFLAGS= -n ## Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.193 src/sys/conf/Makefile.kern.inc:1.194 --- src/sys/conf/Makefile.kern.inc:1.193 Wed Aug 26 03:00:52 2015 +++ src/sys/conf/Makefile.kern.inc Thu Aug 27 03:17:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.193 2015/08/26 03:00:52 uebayasi Exp $ +# $NetBSD: Makefile.kern.inc,v 1.194 2015/08/27 03:17:46 uebayasi Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -235,10 +235,14 @@ SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS SYSTEM_CTFMERGE= ${_MKSHECHO} .endif SYSTEM_LD_HEAD?=@rm -f $@ -SYSTEM_LD?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ +SYSTEM_LD?= @do_system_ld() { \ + target=$$1; shift; \ + ${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \ ${_MKSHECHO}\ - ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \ - ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o + ${LD} -Map $@.map --cref ${LINKFLAGS} -o $${target} '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o $$@; \ + ${LD} -Map $@.map --cref ${LINKFLAGS} -o $${target} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o $$@; \ + }; \ + do_system_ld # Give MD generated ldscript dependency on ${SYSTEM_OBJ} .if defined(KERNLDSCRIPT) @@ -576,20 +580,20 @@ CPPFLAGS.kern_ksyms_buf.c+= -DCOPY_SYMTA .if !defined(COPY_SYMTAB) build_kernel: .USE ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} swap${.TARGET}.o + ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o ${SYSTEM_LD_TAIL_STAGE2} .else build_kernel: .USE ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} swap${.TARGET}.o kern_ksyms_buf.o + ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf.o ${SYSTEM_LD_TAIL_STAGE1} ${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \ -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o ${SYSTEM_LD_HEAD} - ${SYSTEM_LD} swap${.TARGET}.o kern_ksyms_buf_real.o + ${SYSTEM_LD} ${.TARGET} swap${.TARGET}.o kern_ksyms_buf_real.o ${SYSTEM_LD_TAIL_STAGE2} .endif