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:
@@ -211,11 +211,12 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
flags.LdFlags = append(flags.LdFlags, linker.Properties.Host_ldlibs...)
|
||||
|
||||
if !ctx.Windows() {
|
||||
// Add -ldl, -lpthread and -lrt to host builds to match the default behavior of device
|
||||
// Add -ldl, -lpthread, -lm and -lrt to host builds to match the default behavior of device
|
||||
// builds
|
||||
flags.LdFlags = append(flags.LdFlags,
|
||||
"-ldl",
|
||||
"-lpthread",
|
||||
"-lm",
|
||||
)
|
||||
if !ctx.Darwin() {
|
||||
flags.LdFlags = append(flags.LdFlags, "-lrt")
|
||||
|
Reference in New Issue
Block a user