------- Comment #11 from davek at gcc dot gnu dot org  2007-05-02 15:38 -------
  From the initial PR:

> There ought to be a way to detect that threading support is disabled so that 
> pessimizations like mutex locks can be left out.

  From the definition of -mthreads in TFM:

" `-mthreads'
     Support thread-safe exception handling on `Mingw32'.  Code that
     relies on thread-safe exception handling must compile and link all
     code with the `-mthreads' option.  When compiling, `-mthreads'
     defines `-D_MT'; when linking, it links in a special thread helper
     library `-lmingwthrd' which cleans up per thread exception
     handling data. "

  Having checked, the /only/ effects of -mthreads are to define the
preprocessor symbol and add the library to the linker command (i.e., it makes
no difference to the code generated by the backend, there is no target flag for
it, no target switch, and no reference to it anywhere except in the specs), it
is simply the case that cygwin does not implement or support the functionality
in question; there is no equivalent cygwin link library.

  So, given that cygwin does *not* support -mthread and does *not* define _MT,
I don't see any reason why #ifdef _MT / #ifndef _MT won't do the exactly
correct thing on all platforms.

  Hence I am closing this 3-year old PR as invalid, just to tidy up Bugzila a
little.  Sorry for any surprise caused by seeing this ghost of the past coming
at you from out of nowhere!

    cheers,
      DaveK


-- 

davek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davek at gcc dot gnu dot org
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to