public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
@ 2012-03-19 20:51 burnus at gcc dot gnu.org
  2012-03-20  9:51 ` [Bug gcov-profile/52627] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-19 20:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52627

             Bug #: 52627
           Summary: [4.8 Regression] Build of libgcc fails w/o
                    __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: rguenth@gcc.gnu.org
             Build: i586-pc-mingw32


On i586-pc-mingw32, one gets the following failure:

../../../gcc-trunk/libgcc/libgcov.c: In function 'init_mx':
../../../gcc-trunk/libgcc/libgcov.c:716:35: error: 'mx' undeclared (first use
in this function)
../../../gcc-trunk/libgcc/libgcov.c:716:35: note: each undeclared identifier is
reported only once for each function it appears in


The source code has the following - and unless it is declared in an #include
file, no global "mx" variable exists. "grep -w mx" find just line 716:

   707  #ifdef __GTHREAD_MUTEX_INIT
   708  ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx =
__GTHREAD_MUTEX_INIT;
   709  #define init_mx_once()
   710  #else
   711  __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
   712  
   713  static void
   714  init_mx (void)
   715  {
   716    __GTHREAD_MUTEX_INIT_FUNCTION (&mx);
   717  }


The code has been added by the commit:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185231

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

        * gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
        * gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
        (__gthread_mutex_init_function): New function.
        * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.

        PR gcov/49484
        * libgcov.c: Include gthr.h.
        (__gcov_flush_mx): New global variable.
        (init_mx, init_mx_once): New functions.
        (__gcov_flush): Protect self with a mutex.
        (__gcov_fork): Re-initialize mutex after forking.
        * unwind-dw2-fde.c: Change condition under which to use
        __GTHREAD_MUTEX_INIT_FUNCTION.


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

* [Bug gcov-profile/52627] [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
  2012-03-19 20:51 [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared burnus at gcc dot gnu.org
@ 2012-03-20  9:51 ` rguenth at gcc dot gnu.org
  2012-03-20 11:21 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-20  9:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52627

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-03-20
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-20 09:46:57 UTC ---
Oops.  Can you try

Index: libgcc/libgcov.c
===================================================================
--- libgcc/libgcov.c    (revision 185562)
+++ libgcc/libgcov.c    (working copy)
@@ -713,7 +713,7 @@ __gthread_mutex_t __gcov_flush_mx ATTRIB
 static void
 init_mx (void)
 {
-  __GTHREAD_MUTEX_INIT_FUNCTION (&mx);
+  __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
 }
 static void
 init_mx_once (void)

?


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

* [Bug gcov-profile/52627] [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
  2012-03-19 20:51 [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared burnus at gcc dot gnu.org
  2012-03-20  9:51 ` [Bug gcov-profile/52627] " rguenth at gcc dot gnu.org
@ 2012-03-20 11:21 ` rguenth at gcc dot gnu.org
  2012-03-20 11:24 ` rguenth at gcc dot gnu.org
  2012-03-21  6:59 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-20 11:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52627

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-20 11:19:01 UTC ---
Author: rguenth
Date: Tue Mar 20 11:18:57 2012
New Revision: 185569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185569
Log:
2012-03-20  Richard Guenther  <rguenther@suse.de>

    PR gcov-profile/52627
    * libgcov.c (init_mx): Fix mutex name.

Modified:
    trunk/libgcc/ChangeLog
    trunk/libgcc/libgcov.c


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

* [Bug gcov-profile/52627] [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
  2012-03-19 20:51 [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared burnus at gcc dot gnu.org
  2012-03-20  9:51 ` [Bug gcov-profile/52627] " rguenth at gcc dot gnu.org
  2012-03-20 11:21 ` rguenth at gcc dot gnu.org
@ 2012-03-20 11:24 ` rguenth at gcc dot gnu.org
  2012-03-21  6:59 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-20 11:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52627

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-20 11:19:25 UTC ---
Fixed.


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

* [Bug gcov-profile/52627] [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared
  2012-03-19 20:51 [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-03-20 11:24 ` rguenth at gcc dot gnu.org
@ 2012-03-21  6:59 ` burnus at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-21  6:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52627

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-21 06:55:03 UTC ---
(In reply to comment #1)
> Oops.  Can you try

I was told that the patch works as advertised. Thanks for the quick fix.


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

end of thread, other threads:[~2012-03-21  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 20:51 [Bug gcov-profile/52627] New: [4.8 Regression] Build of libgcc fails w/o __GTHREAD_MUTEX_INIT: error: 'mx' undeclared burnus at gcc dot gnu.org
2012-03-20  9:51 ` [Bug gcov-profile/52627] " rguenth at gcc dot gnu.org
2012-03-20 11:21 ` rguenth at gcc dot gnu.org
2012-03-20 11:24 ` rguenth at gcc dot gnu.org
2012-03-21  6:59 ` burnus at gcc dot gnu.org

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).