<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang does not mangle __thread variables like MingW (__emutls_v. prefix is missing)"
   href="http://llvm.org/bugs/show_bug.cgi?id=20737">20737</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang does not mangle __thread variables like MingW (__emutls_v. prefix is missing)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yaron.keren@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, rnk@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>echo __thread unsigned a; > tls.cpp & clang -c -target i686-pc-windows-gnu
tls.cpp & nm tls.o

produces '00000000 D _a'
whereas

echo __thread unsigned a; > tls.cpp & gcc -c tls.cpp & nm tls.o
produces '00000000 D ___emutls_v.a'

this prevent the use of <mutex> in clang-compiled modules since it uses two tls
variables, 'once_call' and 'once_callable' which are mangled to 

__emutls_v._ZSt11__once_call
__emutls_v._ZSt15__once_callable

whereas the clang-compiled object refers to

_ZSt11__once_call
_ZSt15__once_callable

is the solution just prefixing '__emutls_v.' to __thread variables?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>