<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/124373>124373</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc] linkage failure against __llvm_libc_errno when building libc++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          nickdesaulniers
      </td>
    </tr>
</table>

<pre>
    Linkage fails when libc++ refers to errno since the generated errno.h has `#define errno (*__llvm_libc_errno())` , while `__llvm_libc_errno` isn't defined for all configs...

```sh
$ nm /usr/lib/libc.a 2>/dev/null | grep __llvm_libc_errno
$
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkkt2O4yoMx5_GubEmIiYf7QUX05mTq_MOFQEnYYeSCkhH-_arJLPaSpUsLIz9k83fOiU3BWYFzQWaz0KveV6iCs58WU569cFxTMWw2N_qfxe-9MQ4aucTfs8c0LvBAF2ALhh55JgwL8gxhgWTC4Yxz4wTB446sz1eyhlnnRBaASQtjy7wTwnQCej9evX-cbtu6Ose38PnzVqBQB_4PTvPG-A1tRXoUgDqMh5oi-MSUXuPZgmjm1JZliDeN2vFYWneblRjuCFQv6YI1Hs3HKcpNRLI_4B6yw-gPqzeI3QfOEW-42sLO-uZX1gl7VmedcGq6mTXtXUnRDGrtu0Et62p5LlqWfCp1idpbF3Zrpa2koVTJKgRFTVi86JsRiNqpvNoT6yNraEWfNPOl1sT5RKnwqW0sqqolp0svB7Yp11bokMr2lSOast_G9YpQS28Szn9I2SX_b4Pe0Hzif5J9zUy6km7kPLr6MdODKvz1oXpaTmKNXo153xPIN-BeqB-cnleh9Ist-2b_eOve7vH5RebDNTvoySg_meah6I_AQAA__-p1tmM">