OSDN Git Service

Fix bug in the handling of LOCAL_HAL_STATIC_LIBRARIES
authorAmeya Thakur <ameyat@codeaurora.org>
Mon, 8 Aug 2016 19:28:56 +0000 (12:28 -0700)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:16:26 +0000 (08:16 -0600)
The lib indicated by LOCAL_HAL_STATIC_LIBRARIES(foo) currently gets appended
to the end of the my_static_libraries list. As a result if foo is the only one
to reference something from the static_libraries_list(bar) we die during
linking since the linker would have stripped out bar. Fix this by prepending
foo to the my_static_libraries list instead.

Change-Id: Iefffcac65dd5f05d9be2d036b42729610d2394b3

core/binary.mk

index bdb6fe4..acb29b5 100644 (file)
@@ -269,8 +269,8 @@ include $(BUILD_SYSTEM)/cxx_stl_setup.mk
 ifdef LOCAL_HAL_STATIC_LIBRARIES
 $(foreach lib, $(LOCAL_HAL_STATIC_LIBRARIES), \
     $(eval b_lib := $(filter $(lib).%,$(BOARD_HAL_STATIC_LIBRARIES)))\
-    $(if $(b_lib), $(eval my_static_libraries += $(b_lib)),\
-                   $(eval my_static_libraries += $(lib).default)))
+    $(if $(b_lib), $(eval my_static_libraries := $(b_lib) $(my_static_libraries)),\
+                   $(eval my_static_libraries := $(lib).default $(my_static_libraries))))
 b_lib :=
 endif