-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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. Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and `x86_64-pc-linux-gnu`. (cherry picked from commit 1e6b0df3503567488e7df2d574c90f8f31a001a2)
- Loading branch information
Showing
2 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters