Add libgcov, a runtime support library for binaries compiled for basic

block profiling.
This commit is contained in:
Alexander Kabaev 2004-08-14 03:23:24 +00:00
parent 386aa69b89
commit 0d7a4fdf65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133707
2 changed files with 46 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# $FreeBSD$
SUBDIR= csu libgcc libdialog libregex libreadline
SUBDIR= csu libgcc libgcov libdialog libregex libreadline
# libsupc++ uses libstdc++ headers, although 'make includes' should
# have taken care of that already.

45
gnu/lib/libgcov/Makefile Normal file
View File

@ -0,0 +1,45 @@
# $FreeBSD$
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
GCCDIR= ${.CURDIR}/../../../contrib/gcc
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
LIB= gcov
NOPROFILE= yes
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCDIR}/config -I${GCCDIR} -I.
#
# Library members defined in libgcov.c.
SYMS= _gcov _gcov_merge_add _gcov_merge_delta _gcov_merge_single
OBJS= ${SYMS:S/$/.o/}
OBJS_T= ${SYMS:S/$/.o/}
OBJS_P= ${SYMS:S/$/.po/}
OBJS_S= ${SYMS:S/$/.So/}
COMMONHDRS= tm.h tconfig.h gcov-iov.h
CLEANFILES+= ${COMMONHDRS}
${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
${OBJS} beforedepend: ${COMMONHDRS}
${OBJS_T}: libgcov.c
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.if !defined(NOPIC)
${OBJS_S}: libgcov.c
${CC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.endif
.if !defined(NOPROFILE)
${OBJS_P}: libgcc2.c
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
.endif
.include <bsd.lib.mk>