Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Since g++ uses stdc++_p when building with -pg make...
details: https://anonhg.NetBSD.org/src/rev/ec00e4e2d911
branches: trunk
changeset: 447286:ec00e4e2d911
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 06 17:02:32 2019 +0000
description:
Since g++ uses stdc++_p when building with -pg make this PIC on the
platforms where PIC is available, so that linking shared objects with
-pg works, without needing to create a shared library version of the
profiled libraries.
diffstat:
share/mk/bsd.lib.mk | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r 59a701fa2e27 -r ec00e4e2d911 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk Sun Jan 06 16:19:12 2019 +0000
+++ b/share/mk/bsd.lib.mk Sun Jan 06 17:02:32 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.377 2018/07/25 23:34:25 kamil Exp $
+# $NetBSD: bsd.lib.mk,v 1.378 2019/01/06 17:02:32 christos Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -57,6 +57,11 @@
AFLAGS+= ${PIE_AFLAGS}
.endif
+PGFLAGS+= -pg
+.if ${MKPIC} != "no"
+PGFLAGS+= -fPIC
+.endif
+
##### Libraries that this may depend upon.
.if defined(LIBDPLIBS) && ${MKPIC} != "no" # {
.for _lib _dir in ${LIBDPLIBS}
@@ -230,7 +235,7 @@
.c.po:
${_MKTARGET_COMPILE}
- ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
+ ${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${PGFLAGS} ${.IMPSRC} -o ${.TARGET}
.if defined(CTFCONVERT)
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
.endif
@@ -258,7 +263,7 @@
.cc.po .cpp.po .cxx.po .C.po:
${_MKTARGET_COMPILE}
- ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
+ ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${PGFLAGS} ${.IMPSRC} -o ${.TARGET}
.if defined(LIBSTRIPCOBJS)
${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
.endif
@@ -286,7 +291,7 @@
.f.po:
${_MKTARGET_COMPILE}
- ${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
+ ${COMPILE.f} ${PROFFLAGS} ${PGFLAGS} ${.IMPSRC} -o ${.TARGET}
.if defined(CTFCONVERT)
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
.endif
@@ -321,7 +326,7 @@
.m.po:
${_MKTARGET_COMPILE}
- ${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
+ ${COMPILE.m} ${PROFFLAGS} ${PGFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
.if defined(CTFCONVERT)
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
.endif
Home |
Main Index |
Thread Index |
Old Index