From 5a01d982396490e39cc21d9d931b93af2b1b7b3f Mon Sep 17 00:00:00 2001 From: kan Date: Sat, 14 Aug 2004 03:23:24 +0000 Subject: Add libgcov, a runtime support library for binaries compiled for basic block profiling. --- gnu/lib/Makefile | 2 +- gnu/lib/libgcov/Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gnu/lib/libgcov/Makefile (limited to 'gnu') diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 494f888..0e5b51c 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -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. diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile new file mode 100644 index 0000000..04ad011 --- /dev/null +++ b/gnu/lib/libgcov/Makefile @@ -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 -- cgit v1.1