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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user