aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gmon/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gmon/Makefile.inc')
-rw-r--r--lib/libc/gmon/Makefile.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/gmon/Makefile.inc b/lib/libc/gmon/Makefile.inc
index 36d47e51acdf..535e7dee2557 100644
--- a/lib/libc/gmon/Makefile.inc
+++ b/lib/libc/gmon/Makefile.inc
@@ -10,6 +10,12 @@ MAN+= moncontrol.3
MLINKS+=moncontrol.3 monstartup.3
+.if ${MACHINE_ARCH} == amd64
+# mcount needs to be compiled with frame pointers and without profiling
+mcount.po: mcount.c
+ ${CC} ${CFLAGS} -fno-omit-frame-pointer -c ${.IMPSRC} -o ${.TARGET}
+.else
# mcount cannot be compiled with profiling
mcount.po: mcount.o
cp mcount.o mcount.po
+.endif