summaryrefslogtreecommitdiff
path: root/gmon
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-07-08 09:10:42 +0000
committerJakub Jelinek <jakub@redhat.com>2005-07-08 09:10:42 +0000
commit48f006fc656c70757103dc9efa92d5775717576b (patch)
tree49d57e1205b93471c3245fceab5dd5ac31ba743d /gmon
parent03d65262fdcc287ef8b691c7dff2f1a63cdd13c2 (diff)
Updated to fedora-glibc-20050708T0811
Diffstat (limited to 'gmon')
-rw-r--r--gmon/Makefile12
-rw-r--r--gmon/tst-profile-static.c10
2 files changed, 20 insertions, 2 deletions
diff --git a/gmon/Makefile b/gmon/Makefile
index 80a79456f7..969edd5575 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1995, 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1995,1996,1997,2001,2002,2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,15 @@ routines := gmon mcount profil sprofil bb_init_func bb_exit_func prof-freq
elide-routines.os = bb_init_func bb_exit_func
-tests := tst-sprofil
+include ../Makeconfig
+
+tests = tst-sprofil
+ifeq ($(build-profile),yes)
+tests += tst-profile-static
+tests-static += tst-profile-static
+
+LDFLAGS-tst-profile-static = -profile
+endif
# The mcount code won't work without a frame pointer.
CFLAGS-mcount.c := -fno-omit-frame-pointer
diff --git a/gmon/tst-profile-static.c b/gmon/tst-profile-static.c
new file mode 100644
index 0000000000..b2f371e782
--- /dev/null
+++ b/gmon/tst-profile-static.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+static int
+do_test (void)
+{
+ puts ("Hello world");
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"