[SR-9198] Glibc modulemap doesn't contain -lm for math #51689
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: 39911a1675c6af9f181df40f5ca8e1a2
Issue Description:
The glibc.modulemap has a math module, which includes the math.h header, but doesn't suggest that the m library is added. It should read:
module math {
link "m"
header "/usr/include/math.h"
export *
}
Currently the -lm is hard-coded in the Unix toolchain, where it should really be added when the math module is used instead:
https://github.com/apple/swift/blob/master/lib/Driver/UnixToolChains.cpp#L53
The text was updated successfully, but these errors were encountered: