This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch ping
Hello,
> >> http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01148.html
> >> -- the patch to prevent code with -fprofile-arcs and
> >> -fbranch-probabilities from diverging before the
> >> profile feedback pass (which may cause profile missmatches)
> > this one is ok, wrt the libgcov bits
>
> Hi Nathan. Hi Zdenek.
>
> The gcov changes broke powerpc-eabi*, and possibly all embedded
> targets. See below. "pid_t" is not declared where you think it is.
>
> Aldy
>
> In file included from
> /home/cygnus/aldyh/source/untainted-sources/uber/gcc/libgcov.c:51:
> /home/cygnus/aldyh/source/untainted-sources/uber/gcc/gcov-io.h:452:
> error: parse error before "__gcov_fork"
> /home/cygnus/aldyh/source/untainted-sources/uber/gcc/gcov-io.h:452:
> warning: type defaults to nt' in declaration of _gcov_fork'
> /home/cygnus/aldyh/source/untainted-sources/uber/gcc/gcov-io.h:452:
> warning: data definition has no type or storage class
> make[1]: *** [libgcc/./_gcov.o] Error 1
this patch fixes the problem, by not declaring the functions when
inhibit_libc is defined. Commited as obvious.
Zdenek
* gcov-io.h (__gcov_fork, __gcov_execl, __gcov_execlp,
* __gcov_execle,
__gcov_execv, __gcov_execvp, __gcov_execve): Do not
declare when inhibit_libc is defined.
Index: gcov-io.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcov-io.h,v
retrieving revision 1.49
diff -c -3 -p -r1.49 gcov-io.h
*** gcov-io.h 23 Apr 2004 22:50:16 -0000 1.49
--- gcov-io.h 25 Apr 2004 16:33:30 -0000
*************** extern void __gcov_merge_single (gcov_ty
*** 448,453 ****
--- 448,454 ----
consecutive values. */
extern void __gcov_merge_delta (gcov_type *, unsigned);
+ #ifndef inhibit_libc
/* The wrappers around some library functions.. */
extern pid_t __gcov_fork (void);
extern int __gcov_execl (const char *, const char *, ...);
*************** extern int __gcov_execle (const char *,
*** 456,461 ****
--- 457,463 ----
extern int __gcov_execv (const char *, char *const []);
extern int __gcov_execvp (const char *, char *const []);
extern int __gcov_execve (const char *, char *const [], char *const []);
+ #endif
#endif /* IN_LIBGCOV */