Add new shared library -- libipt.

libipt is the Intel Processor Trace (Intel PT) packets decoder.

- Include libipt to amd64 build.
- Install libipt headers to /usr/include/libipt/

Sponsored by:	DARPA, AFRL
This commit is contained in:
br 2018-03-21 14:37:04 +00:00
parent a8063f7679
commit b4bdf736ef
5 changed files with 82 additions and 0 deletions

View File

@ -257,6 +257,8 @@
..
lib80211
..
libipt
..
libmilter
..
libxo

View File

@ -176,6 +176,7 @@ _libvgl= libvgl
.endif
.if ${MACHINE_CPUARCH} == "amd64"
SUBDIR.${MK_PMC}+= libipt
SUBDIR.${MK_BHYVE}+= libvmmapi
.endif

77
lib/libipt/Makefile Normal file
View File

@ -0,0 +1,77 @@
# $FreeBSD$
PACKAGE=lib${LIB}
SHLIBDIR?= /lib
.include <src.opts.mk>
PTSRC= ${SRCTOP}/contrib/processor-trace
.PATH: ${PTSRC}/libipt/src \
${PTSRC}/libipt/src/posix \
${PTSRC}/libipt/internal/include \
${PTSRC}/libipt/include \
${PTSRC}/include
LIB= ipt
SHLIB_MAJOR=0
SRCS= \
init.c \
pt_asid.c \
pt_block_cache.c \
pt_block_decoder.c \
pt_config.c \
pt_cpu.c \
pt_cpuid.c \
pt_decoder_function.c \
pt_encoder.c \
pt_error.c \
pt_event_queue.c \
pt_ild.c \
pt_image_section_cache.c \
pt_image.c \
pt_insn_decoder.c \
pt_insn.c \
pt_last_ip.c \
pt_packet_decoder.c \
pt_packet.c \
pt_query_decoder.c \
pt_retstack.c \
pt_section_file.c \
pt_section_posix.c \
pt_section.c \
pt_sync.c \
pt_time.c \
pt_tnt_cache.c \
pt_version.c
CFLAGS+= \
-I${PTSRC}/libipt/internal/include/posix \
-I${PTSRC}/libipt/internal/include \
-I${PTSRC}/libipt/include \
-I${PTSRC}/include \
-I${.CURDIR}
CFLAGS+= \
-DPT_VERSION_BUILD=0 \
-DPT_VERSION_EXT=\"\" \
-DPT_VERSION_MAJOR=1 \
-DPT_VERSION_MINOR=6
INCS= \
intel-pt.h \
pt_cpu.h \
pt_last_ip.h \
pt_time.h \
pt_compiler.h
INCSDIR=${INCLUDEDIR}/libipt
LIBADD=
WARNS?= 1
HAS_TESTS=
.include <bsd.lib.mk>

View File

@ -88,6 +88,7 @@ LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a
LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a
LIBIFCONFIG?= ${LIBDESTDIR}${LIBDIR_BASE}/libifconfig.a
LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a
LIBIPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libipt.a
LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a
LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a
LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a

View File

@ -111,6 +111,7 @@ _LIBRARIES= \
heimsqlite \
hx509 \
ipsec \
ipt \
jail \
kadm5clnt \
kadm5srv \