The libm library specified multiple times in linker settings for some targets. It produces linker warning during the build about duplicate -lm option.
In addition, some of the libraries need explicit link flags on Linux only, while on MacOS they are linked implicitly.
TODO:
Remove duplicate -lm linker flags.