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

    <tr>
        <th>Summary</th>
        <td>
            Backport request to 14.x: 2d0c9b64a07c6c430ccfe11ea4c767d788d20461 (OpenMP underlinking fix)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    This would help us with a long-standing downstream issue in Gentoo: https://bugs.gentoo.org/816831.

The gist is that libomp was underlinked before 2d0c9b64a07c6c430ccfe11ea4c767d788d20461 (on main) which makes it difficult to use libomp as a provider of OpenMP.

The change should be safe to backport and I'm not aware of any bug reports involving it, especially given most of the time, it'd be thrown away (the -lm) if unused, as people tend to use `-Wl,--as-needed`. That is, it doesn't affect most people anyway.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU0tvnDAQ_jVwGYGMee6BQ9IoVQ9Ve4jUs7EHcNfYFJvd7L_vmE0UVT1F4mEz4_keMwxO3fqXWXu4ut0omNGssNNOhxkEGGenzAdhlbYTKHe1PmwoFtDe7wjawle0wbmkfIA5hNXTIuHPdA375PPpCOZum-hLVzRdWeQJe0rYw_35MiNM2gcqB2EWAYwe3LLCVXjYrcLNaHtGBQOObkPgisnT0FSCtbKRVcmkHLEoUFSybVrVdp3irGoKSHjnLCxC24Sf4DprOdPujB50AKXHUcvdBAiOpOI7KGEKWDd30QQMboQfK9rvP_8jLGdhJwQ_H4YNtBIjxlqDkOfVbQHILviW8HYB62h3FcSd6gl7A7IFNoxZxMVenLlEY3VI-BdAv6LUwpgbmXJBEuDIGjoYCDXoBWNSTG0P2DBv1I9Y_hYFx6TMLFGwHsk9UqbiAZK1olsNHUDi9aY5aVj2y1A8y4TPLKKi7Ibl8BLboP0dijqOnjxsScU4ogx3Sm_1SA9h56nqS3UqTyINOhjsH99t2PDPjv6wuajy1zgjn-ng3f6POYhGjfqVBKb7Zvp_x22ied2HXDoy4NmYy_sro4b-JuK0PUaWhD3XDSt5OvdcyZoP8lTXTdtVpWJFVbQKK6y7YmhkkxoxoPF9Uj8mnFu83qee1kn9lOqeM85ZQ4dqXtU8VyeBiiksq0bJSo5JxZBG0OSRR_wH0q0_KMVfg4KGBt9_BIX3eqJGHHBUX-xhdltPbfViiXd6oPcH-78AFjdS">