Module Name: src Committed By: jkoshy Date: Wed Apr 13 17:52:56 UTC 2022
Modified Files: src/tools: Makefile Added Files: src/tools/elftoolchain: Makefile src/tools/elftoolchain/common/sys: Makefile Log Message: When building tools use a dedicated subdirectory for compiling Elftoolchain code. Build and install <sys/elfdefinitions.h> in ${TOOLDIR}/include. This change prepares the ground for upgrading libelf and libdwarf to their current Elftoolchain versions. To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/elftoolchain/Makefile cvs rdiff -u -r0 -r1.1 src/tools/elftoolchain/common/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tools/Makefile diff -u src/tools/Makefile:1.212 src/tools/Makefile:1.213 --- src/tools/Makefile:1.212 Sun Nov 14 15:48:02 2021 +++ src/tools/Makefile Wed Apr 13 17:52:56 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.212 2021/11/14 15:48:02 skrll Exp $ +# $NetBSD: Makefile,v 1.213 2022/04/13 17:52:56 jkoshy Exp $ .include <bsd.own.mk> .include <bsd.endian.mk> @@ -58,6 +58,7 @@ TOOLCHAIN_BITS+= dbsym mdsetimage DTRACE_BITS= .if ${MKDTRACE} != "no" || ${MKCTF} != "no" +DTRACE_BITS+= .WAIT elftoolchain DTRACE_BITS+= .WAIT libelf DTRACE_BITS+= .WAIT libdwarf DTRACE_BITS+= .WAIT libctf Added files: Index: src/tools/elftoolchain/Makefile diff -u /dev/null src/tools/elftoolchain/Makefile:1.1 --- /dev/null Wed Apr 13 17:52:56 2022 +++ src/tools/elftoolchain/Makefile Wed Apr 13 17:52:56 2022 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $ + +SUBDIR= common + +.include <bsd.subdir.mk> Index: src/tools/elftoolchain/common/sys/Makefile diff -u /dev/null src/tools/elftoolchain/common/sys/Makefile:1.1 --- /dev/null Wed Apr 13 17:52:56 2022 +++ src/tools/elftoolchain/common/sys/Makefile Wed Apr 13 17:52:56 2022 @@ -0,0 +1,41 @@ +# $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $ + +.include <bsd.hostinit.mk> + +SRCDIR= ${.CURDIR}/../../../../external/bsd/elftoolchain/dist/common/sys + +.PATH: ${SRCDIR} + +INCS= elfdefinitions.h +HOST_INCSDIR= ${TOOLDIR}/include/sys + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + ${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +.PHONY: all clean clobber depend + +install: .PHONY ${HOST_INCSDIR} .WAIT includes + +${HOST_INCSDIR}: + ${_MKTARGET_INSTALL} + ${HOST_INSTALL_DIR} ${HOST_INCSDIR} + +.for _f in ${INCS} +HOST_INCINSTFILES+= ${HOST_INCSDIR}/${_f} +${HOST_INCSDIR}/${_f}: ${_f} + ${_MKTARGET_INSTALL} + ${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET} +.endfor + +includes: .PHONY ${HOST_INCSDIR} .WAIT ${HOST_INCINSTFILES} + +all dependall depend: ${INCS} + +clean clobber: + rm -f ${INCS} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include <bsd.obj.mk>