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: I6a07e12053090eb6997b79d4091c28ac9a9022de
This commit is contained in:
Dan Willemsen
2017-09-26 20:26:11 -07:00
parent b182ea7bcb
commit a3a06feeed
5 changed files with 2 additions and 12 deletions

View File

@@ -89,7 +89,6 @@ ifneq ($(filter $(my_cxx_stl),libc++ libc++_static),)
ifdef LOCAL_IS_HOST_MODULE
my_cppflags += -nostdinc++
my_ldflags += -nodefaultlibs
my_ldlibs += -lpthread -lm
my_cxx_ldlibs += $($($(my_prefix)OS)_$(my_link_type)_gcclibs)
else
ifeq (arm,$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))