aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2003-03-27 23:52:02 +0000
committerJanis Johnson <janis@gcc.gnu.org>2003-03-27 23:52:02 +0000
commit01e60c33e6168fec1d7a79467b412d20a686bcf8 (patch)
treec73433785d232dc78d3cb952e9405136e43ff424
parentad59ba209d800635e12601658e043bee5d07bc23 (diff)
downloadgcc-01e60c33e6168fec1d7a79467b412d20a686bcf8.zip
gcc-01e60c33e6168fec1d7a79467b412d20a686bcf8.tar.gz
gcc-01e60c33e6168fec1d7a79467b412d20a686bcf8.tar.bz2
libgcov.c: Provide only dummy functions if libc is not available.
2003-03-27 Janis Johnson <janis187@us.ibm.com> * libgcov.c: Provide only dummy functions if libc is not available. From-SVN: r64936
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/libgcov.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a706e78..93c1921 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-27 Janis Johnson <janis187@us.ibm.com>
+
+ * libgcov.c: Provide only dummy functions if libc is not available.
+
2003-03-27 Richard Henderson <rth@redhat.com>
* real.h (struct real_value): Add signalling.
diff --git a/gcc/libgcov.c b/gcc/libgcov.c
index 31a160e..73b2379 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 */