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

    <tr>
        <th>Summary</th>
        <td>
            Building 32-bit compat runtimes on x86_64 fails
        </td>
    </tr>

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

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

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

<pre>
    Building 32-bit compat runtimes on an x86_64 linux system fails with a likely incorrect error message:

```
CMake Error at /home/bero/abf/llvm/BUILD/llvm-project-release-15.x/libunwind/src/CMakeLists.txt:109 (message):
  Compiler doesn't support generation of unwind tables if exception support
  is disabled.  Building libunwind DSO with runtime dependency on C++ ABI
  library is not supported.
```

I'm not disabling exceptions or anything - so the real reason is likely elsewhere. Looking at runtime-bins/CMakeFiles/CMakeErrors.log, I see various tests failing with

```
[2/2] Linking C executable cmTC_6d9b4
FAILED: cmTC_6d9b4
: && /home/bero/abf/llvm/BUILD/llvm-project-release-15.x/xc --target=i686-openmandriva-linux-gnu -resource-dir=/home/bero/abf/llvm/BUILD/llvm-project-release-15.x/build32/./lib/clang/15.0.0 -fPIC -fno-semantic-interposition -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections  -nostdlib++ -nostdinc++ -nostdlib++ -Werror=unknown-pragmas -resource-dir=/home/bero/abf/llvm/BUILD/llvm-project-release-15.x/build32/./lib/clang/15.0.0 -Wl,--color-diagnostics CMakeFiles/cmTC_6d9b4.dir/src.c.o -o cmTC_6d9b4  -lc  -lNOTFOUND && :
clang-14: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
ld.lld: error: unable to find library -lNOTFOUND
```

(Note the `-lNOTFOUND`).

Looks like I'm missing the 32-bit version of some new dependency library (building 32-bit compat libs worked with 14.0.6), and instead of erroring out/warning about that, the build system adds -lNOTFOUND and complains later.

FWIW the `xc` script referenced in my output is just a wrapper calling `clang -m32`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVltv2zYY_TX2C0FBlm0lfvBDYtdAgKwdsBZ5LCjxk8yGIgWSiu39-h1StuN2RTFgAwYIlHj5Ljznu6iy8rR-HJSWyrRsXvBKBVbbrheBucEE1ZFn1jBh2PG-_FoumFZmODJ_8oE61gilPTuosGcCO6-kT0yZ2jpHdWDknHUMGrxoaTJ_mOTbSX4Zy_z8pOnmN_FK7EMSgOlJsdvbjvCqyFm8RNVg1Pqtw-vxy9Pz9jzlvbPfYIw70iQ88dkyO8Y9VQ3moIzEt3c1xmTiWfngs3AMcGeWr2Do_uJfsbq6yNgGEChNjklL3kyKu8D80PfWBdaSISeCAiq2YaMRFkSlgZRqGB1r6tPuWeCiUnkmlY_nZMbYFfOro2z7x6cRyjPwTFJPRpKpT5GCzaR4xMMeHp8uKiHrhDtF1cZePYT-n2I8jk-4TJeOj95EH64-g2vgb05hH5c585aFPTFHQsfBww3YOhNN2tNhT44y9mzta5R4jxoEkvEX1HeA8jpJJPtM23ZSbNgT80TsTThlB88CgZ4UVVFbBOMXMTNZPhZQWkyWW_asTHJgg7tQPSQ6WN193nwt5apajAK7h6fnD1uw_LeduDYpSjz_Qegda8Z5EK4lRNlWlfcltyCyE0Y69SZ4yiDemoFB0tvB1cSlcjj7721XMazmEZZsTAKMtRYGWO9wJM9yxpvfnzYYjeWe4FRQNVcmkOutVylw-UvKXDgkRSCeYvF9bTDtIJwkycUbiBIVyAonbuiAQ0LrePQYnMAbJgYzeBzthRMdwQhWD05Bqw8OhHnMO-U9PnmjSEu4AieEVn-Si5uq67WqVeANVIe9s0O7x3Jt3xB4knvESL3nkhox6DCaRPnqyMTJaAMLBqf9eDVYA2Ix9WAKyRXGVOaNVKI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