diff options
author | kan <kan@FreeBSD.org> | 2009-06-21 01:54:47 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2009-06-21 01:54:47 +0000 |
commit | 59210f78f431491c3feeb14cd2602251f6ce5703 (patch) | |
tree | d5f0f98352c681312e2a55c60a5a282731b6c2ff /gnu/lib/libgcov | |
parent | a6e30dd398b725cfcd3ad6e7a5b50c68793273e1 (diff) | |
download | FreeBSD-src-59210f78f431491c3feeb14cd2602251f6ce5703.zip FreeBSD-src-59210f78f431491c3feeb14cd2602251f6ce5703.tar.gz |
Compile static gcov library with -fPIC to match what stock GCC builds
are doing. This is required for libgcov.a to be usable on amd64.
Reported by: stas
Diffstat (limited to 'gnu/lib/libgcov')
-rw-r--r-- | gnu/lib/libgcov/Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile index 623a793..36be1ea 100644 --- a/gnu/lib/libgcov/Makefile +++ b/gnu/lib/libgcov/Makefile @@ -27,7 +27,15 @@ 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 +#----------------------------------------------------------------------- +# +# Helpful shortcuts for compiler invocations. +# +CC_T = ${CC} -c ${CFLAGS} -fPIC +CC_P = ${CC} -c ${CFLAGS} -p -fPIC +CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED + +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 @@ -36,16 +44,16 @@ ${COMMONHDRS}: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile ${OBJS} beforedepend: ${COMMONHDRS} ${OBJS_T}: libgcov.c - ${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} + ${CC_T} -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} + ${CC_S} -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} + ${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c} .endif .include <bsd.lib.mk> |