summaryrefslogtreecommitdiff
path: root/gcc/libgcov.c
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-27 23:52:02 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-27 23:52:02 +0000
commit3e9fd48be053bec6f7eea5b5e28c9ab364100ca1 (patch)
treec73433785d232dc78d3cb952e9405136e43ff424 /gcc/libgcov.c
parent424b5d7fb17a76082d207229a9aae376d28cbeba (diff)
downloadgcc-3e9fd48be053bec6f7eea5b5e28c9ab364100ca1.tar.gz
2003-03-27 Janis Johnson <janis187@us.ibm.com>
* libgcov.c: Provide only dummy functions if libc is not available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64936 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcov.c')
-rw-r--r--gcc/libgcov.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/libgcov.c b/gcc/libgcov.c
index 31a160eec20..73b2379847d 100644
--- a/gcc/libgcov.c
+++ b/gcc/libgcov.c
@@ -29,6 +29,17 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#if defined(inhibit_libc)
+/* If libc and its header files are not available, provide dummy functions. */
+
+void __gcov_init (void *p);
+void __gcov_flush (void);
+
+void __gcov_init (void *p) { }
+void __gcov_flush (void) { }
+
+#else
+
/* It is incorrect to include config.h here, because this file is being
compiled for the target, and hence definitions concerning only the host
do not apply. */
@@ -507,3 +518,5 @@ __gcov_flush (void)
ptr->counter_sections[j].counters[i] = 0;
}
}
+
+#endif /* inhibit_libc */