]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcov.c: Provide only dummy functions if libc is not available.
authorJanis Johnson <janis187@us.ibm.com>
Thu, 27 Mar 2003 23:52:02 +0000 (23:52 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Thu, 27 Mar 2003 23:52:02 +0000 (23:52 +0000)
2003-03-27  Janis Johnson  <janis187@us.ibm.com>

* libgcov.c: Provide only dummy functions if libc is not available.

From-SVN: r64936

gcc/ChangeLog
gcc/libgcov.c

index a706e78f8c301b487c2d24f6570f3fc888422e07..93c1921439d40b5c5d6879f09873148950e84425 100644 (file)
@@ -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.
index 31a160eec206ea63b77d2adae0b07700db076e4d..73b2379847dcaaf5139bbdfd53a83f58b45216cd 100644 (file)
@@ -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 */