svn commit: r194564 - head/gnu/lib/libgcov

Alexander Kabaev kan at
Sun Jun 21 01:54:47 UTC 2009

Author: kan
Date: Sun Jun 21 01:54:47 2009
New Revision: 194564

  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


Modified: head/gnu/lib/libgcov/Makefile
--- head/gnu/lib/libgcov/Makefile	Sun Jun 21 01:17:38 2009	(r194563)
+++ head/gnu/lib/libgcov/Makefile	Sun Jun 21 01:54:47 2009	(r194564)
@@ -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
+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/
 ${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}
 .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}
 .include <>

More information about the svn-src-all mailing list