Source-Changes-HG archive

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

[src/trunk]: src/tools DTrace: add CTF tools to the toolchain (not built yet).



details:   https://anonhg.NetBSD.org/src/rev/c297d4e0abbc
branches:  trunk
changeset: 752384:c297d4e0abbc
user:      darran <darran%NetBSD.org@localhost>
date:      Wed Feb 24 21:34:57 2010 +0000

description:
DTrace: add CTF tools to the toolchain (not built yet).

diffstat:

 tools/ctfconvert/Makefile |  57 +++++++++++++++++++++++++++++++++++++++++
 tools/ctfmerge/Makefile   |  40 ++++++++++++++++++++++++++++
 tools/libctf/Makefile     |  65 +++++++++++++++++++++++++++++++++++++++++++++++
 tools/libdwarf/Makefile   |  52 +++++++++++++++++++++++++++++++++++++
 4 files changed, 214 insertions(+), 0 deletions(-)

diffs (230 lines):

diff -r 52d9094db65c -r c297d4e0abbc tools/ctfconvert/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ctfconvert/Makefile Wed Feb 24 21:34:57 2010 +0000
@@ -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"
diff -r 52d9094db65c -r c297d4e0abbc tools/ctfmerge/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ctfmerge/Makefile   Wed Feb 24 21:34:57 2010 +0000
@@ -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"
diff -r 52d9094db65c -r c297d4e0abbc tools/libctf/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libctf/Makefile     Wed Feb 24 21:34:57 2010 +0000
@@ -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>
diff -r 52d9094db65c -r c297d4e0abbc tools/libdwarf/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libdwarf/Makefile   Wed Feb 24 21:34:57 2010 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index