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

    <tr>
        <th>Summary</th>
        <td>
            s390x-linux-gnu-ld: cannot find llvm-project/build/lib/clang/19/lib/s390x-unknown-linux-gnu/libclang_rt.lsan.a: No such file or directory
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          iii-i
      </td>
    </tr>
</table>

<pre>
    Clang on s390x debian is currently broken: trying to build "hello, world" fails with:

```
/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
/usr/bin/ld: cannot find -lgcc: No such file or directory
/usr/bin/ld: cannot find -lgcc_s: No such file or directory
```

I believe that https://github.com/llvm/llvm-project/pull/94729 is not fully fixed yet.

Applying https://github.com/iii-i/llvm-project/commit/7a697bfb1247b46fbc93e26a1ce69ce2a54b9c09 makes things better, but sanitizers are still broken, because `Triple::normalize()` turns `s390x-linux-gnu` into `s390x-unknown-linux-gnu`, and sanitizer runtimes are placed under `llvm-project/build/lib/clang/19/lib/s390x-linux-gnu`. I'm not sure what is the correct solution here: should sanitizers be moved to `s390x-unknown-linux-gnu`, or should `Triple::normalize()` be changed?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslEtv3DYQxz8NdRmsIFGytDzo4CYQkEsv7T3gYyRNTZELPmxvPn1BJa5TL-C6RYEFV9IM_jP8zUPGSKtDnNjdL-zucyVz2nyYiOhElfLmOn2y0q3gHcRONM9gUJF0QBF0DgFdsldQwT-gY909pHAlt0LyoDJZA4zzDa31jH-CJx-sYZzDIslGeKK0se6eNZ9Z83IOzY_f91c-5xgYnxU5xmdrSgQtnfMJFnIGdEgKV3K_1b6YfvUQs95gIYvgAxgKqJMP1w_Kneyq9f8m9DV-ROrNjY_zCyi0hI8IaZMJtpQuRYvxmfF5pbRlVWu_l9D28eXvdAn-D9SJ8fmSrWV8Fv3IRSnUkVe29goLPaOBK6b653j3l4s9yvZOpKMhbkNpv-9UHkY5iFEtquX9qPphUVp0yAfZahyERi7veiV0I2CXDxghbeTWCApTwlCaQ-UEUTpK9A1DBBkQYiJrX3qruKCWOSKwofk90MViybS7dz7s0tI3ZPzMuGBDAykHF4vf0bInSy4_n1aXi41c8q-m7B6cf3J_cymxpDOv6UDILtGO39O6WKnRQHYGQxF6Q-To-wKKVOFThofxuRV_fbrNqYYvjI_7UaeYA8JTKTsVSgjah9IxEL3NibyDDUO5OcTNZ2t-hqYQdv-IBj5yQx9eFP6Zp0LQm3QrGtbNlZk6IzohK5zasT3z89CIvtomJRYtDY7jgOelPQ9cc2zFMKpFLMK0qqKJN7xvhrZru77t-vrMNTdK9A32DbYLsr7BXZKtC9Pah7WiGDNO4q5vxspKhTYei4rzH2B52VlhOmqg8hpZ31iKKb4qJEoWpzfQT7cz-9_KeEv3sB_-X0OqbZSulu8ugioHO_3rGT_AxDLlB5vHif8ZAAD__z2d39M">