<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/71302>71302</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Merge 1e6b0df3503567488e7df2d574c90f8f31a001a2 into 17.0.X
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
brad0
</td>
</tr>
</table>
<pre>
[Driver] Fix linking with -lm on Solaris (#65632)
As noticed in D158846, the Solaris driver deviates from other targets in
that it links every executable with `-lm`, but doesn't for shared
objects. For C code, this is unnecessary, while for C++ `libm` is always
needed, even for shared objects.
This patch fixes this by following the `Gnu.cpp` precedent. It adjusts
the `solaris-ld.c` test accordingly, adding some more tests.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxMkr-StDYQxJ9GJFNLCYH4ExDc3da6HDiyA6dCGkCfhbSlEbu3b-8SfHd1CVDMdP-aRorILh5xZPKdyWuh9rSGOE5RGV5Mwbzy4BrtAyOTV7jZT3DW_2f9Ak-bVri4DYKHv4NT0RIw0TNRt7KtBRMD41fG387rG4EPyWo0YD1cK9n3TcvEB6QVv-XmAIHBh1UJCeYYNghpxQhJxQUTgfWnX1pVApuONAT4wPgC_ES9JzU5PMOxll_cxlqeOdOewAQkz0SXYA4RaFURzWkXpl-oE5VwCxE-QAeDZzhLYAl271EjkYqv_Pq5WoeHxwcT70y8Z5SzU2bldeWe6kWns0c0aLIKH-h_gOGL-bOmfzLwrpJeYbafSGeC6QVzcC48c--5MNbyP_xe6vs9E-8RNRr0qYQ_Eyjza6dEXzUdy3QWfHGm1FmRkBIorUM01i_u-Chl8jNQ2BC2EPFYorIwY22GelAFjlU7DJWsRTMU6yhk21dcCkTToTB9I6TEChsuZNP2qAs7Ci7qquKS15w3Q9m1slJD3-bpVCvNGo6bsq507rGVIS6FJdpx7Kqai8KpCR0dB1MIj084hkyIfE7jmDWXaV-INdzZnPTbJdnkcPwL44JQYTtxM9eS17Ltmr7HzszCyK7RA5_7ua4U55USYH0KUHUlL_8t9ujGNaU7sfqNiRsTt8WmdZ9KHTYmbhn0-3a5x5D_IhO3Ix4xcTvi_x8AAP__vKQP0A">