aboutsummaryrefslogtreecommitdiff
path: root/gmon/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'gmon/Makefile')
-rw-r--r--gmon/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/gmon/Makefile b/gmon/Makefile
index 2a5bb5f16b..3c6f85d9b2 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -32,6 +32,14 @@ CFLAGS-mcount.c := -fno-omit-frame-pointer
# We cannot compile mcount.c with -pg because that would
# create resursive calls. Just copy the normal static object.
-$(objpfx)mcount.po: $(objpfx)mcount.o
+# On systems where `profil' is not a system call, the same
+# problem exists for the internal functions in profil.c.
+
+noprof := mcount
+ifeq (,$(filter profil,$(unix-syscalls)))
+noprof += profil
+endif
+
+$(noprof:%=$(objpfx)%.po): %.po: %.o
rm -f $@
ln $< $@