diff --git a/deps/brotli/brotli.gyp b/deps/brotli/brotli.gyp index f82660d82c6cfa..f1f487945e5727 100644 --- a/deps/brotli/brotli.gyp +++ b/deps/brotli/brotli.gyp @@ -59,14 +59,15 @@ 'defines': [ 'OS_MACOSX' ] + }, { + 'libraries': [ + '-lm', + ], }], ], 'direct_dependent_settings': { 'include_dirs': [ 'c/include' ] }, - 'libraries': [ - '-lm', - ], 'sources': [ '<@(brotli_sources)', ] diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni index 5e07e106672a04..91001fa43ea480 100644 --- a/deps/brotli/unofficial.gni +++ b/deps/brotli/unofficial.gni @@ -25,7 +25,7 @@ template("brotli_gn_build") { } else if (target_os == "freebsd") { defines = [ "OS_FREEBSD" ] } - if (!is_win) { + if (is_linux) { libs = [ "m" ] } if (is_clang || !is_win) { diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni index 348d2f0703e47c..864414475fa69c 100644 --- a/deps/uv/unofficial.gni +++ b/deps/uv/unofficial.gni @@ -87,11 +87,11 @@ template("uv_gn_build") { ] } if (is_posix) { - libs = [ "m" ] ldflags = [ "-pthread" ] } if (is_linux) { libs += [ + "m", "dl", "rt", ] diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index fea86b4af7826e..8c8d7d00fd2913 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -220,7 +220,6 @@ '<@(uv_sources_posix)', ], 'link_settings': { - 'libraries': [ '-lm' ], 'conditions': [ ['OS=="solaris"', { 'ldflags': [ '-pthreads' ], @@ -231,6 +230,11 @@ ['OS != "solaris" and OS != "android" and OS != "zos"', { 'ldflags': [ '-pthread' ], }], + ['OS!="mac"', { + 'libraries': [ + '-lm' + ], + }], ], }, 'conditions': [