mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #22798 Per https://stackoverflow.com/questions/33675638/gcc-link-the-math-library-by-default-in-c-on-mac-os-x and https://stackoverflow.com/questions/30694042/c-std-library-dont-appear-to-be-linked-in-object-file > There's no separate math library on OSX. While a lot of systems ship functions in the standard C math.h header in a separate math library, OSX does not do that, it's part of the libSystem library, which is always linked in. required by https://github.com/nim-lang/Nim/pull/23290
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
## The types, vars and procs are bindings for the C standard library
|
||||
## [<fenv.h>](https://en.cppreference.com/w/c/numeric/fenv) header.
|
||||
|
||||
when defined(posix) and not defined(genode):
|
||||
when defined(posix) and not defined(genode) and not defined(macosx):
|
||||
{.passl: "-lm".}
|
||||
|
||||
var
|
||||
|
||||
@@ -155,7 +155,7 @@ func fac*(n: int): int =
|
||||
|
||||
{.push checks: off, line_dir: off, stack_trace: off.}
|
||||
|
||||
when defined(posix) and not defined(genode):
|
||||
when defined(posix) and not defined(genode) and not defined(macosx):
|
||||
{.passl: "-lm".}
|
||||
|
||||
const
|
||||
|
||||
Reference in New Issue
Block a user