afb57df680
Also: Switch FreeBSD to use libgcc_s.so.1. Use dl_iterate_phdr to locate shared objects' exception frame info instead of depending on older register_frame_info machinery. This allows us to avoid depending on libgcc_s.so.1 in binaries that do not use exception handling directly. As an additional benefit it breaks circular libc <=> libgcc_s.so.1 dependency too. Build newly added libgomp.so.1 library, the runtime support bits for OpenMP. Build LGPLed libssp library. Our libc provides our own BSD-licensed SSP callbacks implementation, so this library is only built to benefit applications that have hadcoded knowledge of libssp.so and libssp_nonshared.a. When linked in from command line, these libraries override libc implementation.
52 lines
1.5 KiB
Makefile
52 lines
1.5 KiB
Makefile
# $FreeBSD$
|
|
|
|
NO_PROFILE=
|
|
.include <bsd.own.mk>
|
|
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
|
|
|
|
GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
|
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
|
|
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
|
|
|
|
LIB= gcov
|
|
|
|
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${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
|
|
#
|
|
# Library members defined in libgcov.c.
|
|
# Defined in libgcov.c, included only in gcov library
|
|
SYMS = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
|
|
_gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
|
|
_gcov_execv _gcov_execvp _gcov_execve \
|
|
_gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler
|
|
|
|
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 options.h
|
|
CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h options.h optionlist
|
|
|
|
${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(NO_PIC)
|
|
${OBJS_S}: libgcov.c
|
|
${CC} -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
|
.endif
|
|
|
|
.if ${MK_PROFILE} != "no"
|
|
${OBJS_P}: libgcov.c
|
|
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
|
.endif
|
|
|
|
.include <bsd.lib.mk>
|