public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgcc gcov_fork failure on AIX
@ 2012-03-12 17:34 David Edelsohn
  2012-03-13  9:38 ` Richard Guenther
  0 siblings, 1 reply; 2+ messages in thread
From: David Edelsohn @ 2012-03-12 17:34 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches

Richi,

Your patch for PR gcov/49484 now causes a bootstrap failure on AIX:

/farm/dje/src/src/libgcc/libgcov.c: In function '__gcov_fork':
/farm/dje/src/src/libgcc/libgcov.c:1008:5: error: 'mx' undeclared
(first use in this function)
/farm/dje/src/src/libgcc/libgcov.c:1008:5: note: each undeclared
identifier is reported only once for each function it appears in
make: *** [_gcov_fork.o] Error 1

# 1000 "/farm/dje/src/src/libgcc/libgcov.c"
pid_t
__gcov_fork (void)
{
  pid_t pid;
  extern __gthread_mutex_t __gcov_flush_mx;
  __gcov_flush ();
  pid = fork ();
  if (pid == 0)
    (mx) (&__gcov_flush_mx);
  return pid;
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libgcc gcov_fork failure on AIX
  2012-03-12 17:34 libgcc gcov_fork failure on AIX David Edelsohn
@ 2012-03-13  9:38 ` Richard Guenther
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2012-03-13  9:38 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Patches

On Mon, 12 Mar 2012, David Edelsohn wrote:

> Richi,
> 
> Your patch for PR gcov/49484 now causes a bootstrap failure on AIX:
> 
> /farm/dje/src/src/libgcc/libgcov.c: In function '__gcov_fork':
> /farm/dje/src/src/libgcc/libgcov.c:1008:5: error: 'mx' undeclared
> (first use in this function)
> /farm/dje/src/src/libgcc/libgcov.c:1008:5: note: each undeclared
> identifier is reported only once for each function it appears in
> make: *** [_gcov_fork.o] Error 1
> 
> # 1000 "/farm/dje/src/src/libgcc/libgcov.c"
> pid_t
> __gcov_fork (void)
> {
>   pid_t pid;
>   extern __gthread_mutex_t __gcov_flush_mx;
>   __gcov_flush ();
>   pid = fork ();
>   if (pid == 0)
>     (mx) (&__gcov_flush_mx);
>   return pid;
> }

Fixed with the following, applied as obvious.

Richard.

2012-03-13  Richard Guenther  <rguenther@suse.de>

	* gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Fix definition.

Index: libgcc/gthr-single.h
===================================================================
--- libgcc/gthr-single.h	(revision 185319)
+++ libgcc/gthr-single.h	(working copy)
@@ -36,7 +36,7 @@ typedef int __gthread_recursive_mutex_t;
 
 #define __GTHREAD_ONCE_INIT 0
 #define __GTHREAD_MUTEX_INIT 0
-#define __GTHREAD_MUTEX_INIT_FUNCTION (mx)
+#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
 #define __GTHREAD_RECURSIVE_MUTEX_INIT 0
 
 #define UNUSED __attribute__((unused))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-13  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 17:34 libgcc gcov_fork failure on AIX David Edelsohn
2012-03-13  9:38 ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).