Add -lm to the default libs for Linux & Darwin

libm is a default library for device builds, so default it for host
builds as well.

Also removes duplicate additions of -ldl, -lpthread, -lm and -lrt.

Test: m host
Change-Id: I8f7e799d48a1f427e48dcfb1d0ccba93c5f9780b
This commit is contained in:
Dan Willemsen
2017-09-26 20:23:34 -07:00
parent 1596e6ee11
commit 27991b7652
4 changed files with 2 additions and 9 deletions

View File

@@ -134,7 +134,6 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
if !ctx.toolchain().Bionic() {
flags.CppFlags = append(flags.CppFlags, "-nostdinc++")
flags.LdFlags = append(flags.LdFlags, "-nodefaultlibs")
flags.LdFlags = append(flags.LdFlags, "-lpthread", "-lm")
if ctx.staticBinary() {
flags.LdFlags = append(flags.LdFlags, hostStaticGccLibs[ctx.Os()]...)
} else {