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
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