Module Name: src Committed By: darran Date: Wed Feb 24 21:34:57 UTC 2010
Added Files: src/tools/ctfconvert: Makefile src/tools/ctfmerge: Makefile src/tools/libctf: Makefile src/tools/libdwarf: Makefile Log Message: DTrace: add CTF tools to the toolchain (not built yet). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tools/ctfconvert/Makefile cvs rdiff -u -r0 -r1.1 src/tools/ctfmerge/Makefile cvs rdiff -u -r0 -r1.1 src/tools/libctf/Makefile cvs rdiff -u -r0 -r1.1 src/tools/libdwarf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/tools/ctfconvert/Makefile diff -u /dev/null src/tools/ctfconvert/Makefile:1.1 --- /dev/null Wed Feb 24 21:34:57 2010 +++ src/tools/ctfconvert/Makefile Wed Feb 24 21:34:57 2010 @@ -0,0 +1,57 @@ +# $NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $ + +.include <bsd.own.mk> + +HOSTPROGNAME= ${_TOOL_PREFIX}ctfconvert +HOST_SRCDIR= external/cddl/osnet/usr.bin/ctfconvert +#HOST_SRCS= alist.c \ + ctf.c \ + ctfconvert.c \ + dwarf.c \ + fixup_tdescs.c \ + hash.c \ + iidesc.c \ + input.c \ + list.c \ + memory.c \ + merge.c \ + output.c \ + st_parse.c \ + stabs.c \ + stack.c \ + strtab.c \ + symbol.c \ + tdata.c \ + traverse.c \ + util.c + +LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist +LIBDWARF_DIR= ${.CURDIR}/../../external/bsd/libdwarf/dist + +HOST_CPPFLAGS+= -I${OSNETDIR}/sys \ + -I${OSNETDIR}/include \ + -I${OPENSOLARIS_DISTDIR} \ + -I${OPENSOLARIS_DISTDIR}/head \ + -I${OPENSOLARIS_DISTDIR}/tools/ctf/common \ + -I${OPENSOLARIS_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_DISTDIR}/uts/common \ + -I${LIBELF_DIR} \ + -I${LIBDWARF_DIR} + +HOST_CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 + +OSNETDIR= ${.CURDIR}/../../external/cddl/osnet +OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist + +CTFOBJ!= cd ${.CURDIR}/../libctf && ${PRINTOBJDIR} +DWARFOBJ!= cd ${.CURDIR}/../libdwarf && ${PRINTOBJDIR} +ELFOBJ!= cd ${.CURDIR}/../libelf && ${PRINTOBJDIR} +LDADD+= -L${CTFOBJ} -lctf +LDADD+= -L${DWARFOBJ} -ldwarf +LDADD+= -L${ELFOBJ} -lelf + +.PATH: ${OPENSOLARIS_DISTDIR}/tools/ctf/common +.PATH: ${OPENSOLARIS_DISTDIR}/tools/ctf/cvt + +.include "${.CURDIR}/../Makefile.disklabel" +.include "${.CURDIR}/../Makefile.host" Index: src/tools/ctfmerge/Makefile diff -u /dev/null src/tools/ctfmerge/Makefile:1.1 --- /dev/null Wed Feb 24 21:34:57 2010 +++ src/tools/ctfmerge/Makefile Wed Feb 24 21:34:57 2010 @@ -0,0 +1,40 @@ +# $NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $ + +.include <bsd.own.mk> + +HOSTPROGNAME= ${_TOOL_PREFIX}ctfmerge +HOST_SRCDIR= external/cddl/osnet/usr.bin/ctfmerge + +LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist +LIBDWARF_DIR= ${.CURDIR}/../../external/bsd/libdwarf/dist + +HOST_CPPFLAGS+= -I${OSNETDIR}/sys \ + -I${OSNETDIR}/include \ + -I${OPENSOLARIS_DISTDIR} \ + -I${OPENSOLARIS_DISTDIR}/head \ + -I${OPENSOLARIS_DISTDIR}/tools/ctf/common \ + -I${OPENSOLARIS_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_DISTDIR}/uts/common \ + -I${LIBELF_DIR} \ + -I${LIBDWARF_DIR} + +HOST_CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 + +OSNETDIR= ${.CURDIR}/../../external/cddl/osnet +OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist + +CTFOBJ!= cd ${.CURDIR}/../libctf && ${PRINTOBJDIR} +DWARFOBJ!= cd ${.CURDIR}/../libdwarf && ${PRINTOBJDIR} +ELFOBJ!= cd ${.CURDIR}/../libelf && ${PRINTOBJDIR} +LDADD+= -L${CTFOBJ} -lctf +LDADD+= -L${DWARFOBJ} -ldwarf +LDADD+= -L${ELFOBJ} -lelf + +# need native pthread support +LDADD+= -lpthread + +.PATH: ${OPENSOLARIS_DISTDIR}/tools/ctf/common +.PATH: ${OPENSOLARIS_DISTDIR}/tools/ctf/cvt + +.include "${.CURDIR}/../Makefile.disklabel" +.include "${.CURDIR}/../Makefile.host" Index: src/tools/libctf/Makefile diff -u /dev/null src/tools/libctf/Makefile:1.1 --- /dev/null Wed Feb 24 21:34:57 2010 +++ src/tools/libctf/Makefile Wed Feb 24 21:34:57 2010 @@ -0,0 +1,65 @@ +# $NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $ + +.include <bsd.own.mk> + +HOSTLIB= ctf + +SRCS= ctf_create.c \ + ctf_decl.c \ + ctf_error.c \ + ctf_hash.c \ + ctf_labels.c \ + ctf_lib.c \ + ctf_lookup.c \ + ctf_open.c \ + ctf_subr.c \ + ctf_types.c \ + ctf_util.c + +OSNETDIR= ${.CURDIR}/../../external/cddl/osnet +OPENSOLARIS_DISTDIR= ${OSNETDIR}/dist +LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist + +CPPFLAGS+= -DCTF_OLD_VERSIONS + +.ifndef NOCOMPATLIB +COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR} +CPPFLAGS+= -I${COMPATOBJ} +.endif + +CPPFLAGS+= -I${.CURDIR}/../compat \ + -I${OSNETDIR}/sys \ + -I${OSNETDIR}/include \ + -I${OPENSOLARIS_DISTDIR}/head \ + -I${OPENSOLARIS_DISTDIR}/common/ctf \ + -I${OPENSOLARIS_DISTDIR}/lib/libctf/common \ + -I${OPENSOLARIS_DISTDIR}/uts/common \ + -I${LIBELF_DIR} + +BUILD_OSTYPE!= uname -s + +# Disable use of pre-compiled headers on Darwin. +.if ${BUILD_OSTYPE} == "Darwin" +CPPFLAGS+= -no-cpp-precomp +.endif + +# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and +# other file ops, on many systems, without changing function names. + +CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 + +.PATH: ${OPENSOLARIS_DISTDIR}/common/ctf +.PATH: ${OPENSOLARIS_DISTDIR}/lib/libctf/common + +HOST_CPPFLAGS:= ${CPPFLAGS} +CPPFLAGS:= # empty + +realinstall: install.host +install.host: ${TOOLDIR}/lib/libctf.a +${TOOLDIR}/lib/libctf.a:: libctf.a + ${_MKTARGET_INSTALL} + mkdir -p ${TOOLDIR}/lib + ${HOST_INSTALL_FILE} -m ${BINMODE} libctf.a ${.TARGET} + +.include "${.CURDIR}/../Makefile.disklabel" +.include <bsd.hostlib.mk> Index: src/tools/libdwarf/Makefile diff -u /dev/null src/tools/libdwarf/Makefile:1.1 --- /dev/null Wed Feb 24 21:34:57 2010 +++ src/tools/libdwarf/Makefile Wed Feb 24 21:34:57 2010 @@ -0,0 +1,52 @@ +# $NetBSD: Makefile,v 1.1 2010/02/24 21:34:57 darran Exp $ + +.include <bsd.own.mk> + +HOSTLIB=dwarf + +SRCS= dwarf_abbrev.c \ + dwarf_attr.c \ + dwarf_attrval.c \ + dwarf_cu.c \ + dwarf_dealloc.c \ + dwarf_die.c \ + dwarf_dump.c \ + dwarf_errmsg.c \ + dwarf_errno.c \ + dwarf_finish.c \ + dwarf_form.c \ + dwarf_init.c \ + dwarf_loc.c + +LIBDWARF_DIR= ${.CURDIR}/../../external/bsd/libdwarf/dist +LIBELF_DIR= ${.CURDIR}/../../external/bsd/libelf/dist + +INCS= dwarf.h libdwarf.h +INCSDIR= /usr/include + +.ifndef NOCOMPATLIB +COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR} +CPPFLAGS+= -I${COMPATOBJ} +.endif + +CPPFLAGS+= -I${.CURDIR}/../compat -I${LIBDWARF_DIR} -I${LIBELF_DIR} + +BUILD_OSTYPE!= uname -s + +# Disable use of pre-compiled headers on Darwin. +.if ${BUILD_OSTYPE} == "Darwin" +CPPFLAGS+= -no-cpp-precomp +.endif + +# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and +# other file ops, on many systems, without changing function names. + +CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 + +.PATH: ${LIBDWARF_DIR} + +HOST_CPPFLAGS:= ${CPPFLAGS} +CPPFLAGS:= # empty + +.include "${.CURDIR}/../Makefile.disklabel" +.include <bsd.hostlib.mk>