Comment 4 for bug 1018832

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: ~zkrynicki/panda-ics-gcc47-tilt-tracking-tests-blob fails to build on ubuntu 12.04

Digging deeper:

The rule that builds executables is defined in: build/core/definitions.mk in the transform-host-o-to-executable-inner variable

This is how it looks like

ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
define transform-host-o-to-executable-inner
$(hide) $(PRIVATE_CXX) \
    -Wl,-rpath-link=$(HOST_OUT_INTERMEDIATE_LIBRARIES) \
    -Wl,-rpath,\$$ORIGIN/../lib \
    $(HOST_GLOBAL_LD_DIRS) \
    $(PRIVATE_LDFLAGS) \
    $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
        $(HOST_GLOBAL_LDFLAGS) \
    ) \
    $(PRIVATE_ALL_OBJECTS) \
    -Wl,--whole-archive \
    $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
    -Wl,--no-whole-archive \
    $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
    $(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
    $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
    $(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
    -o $@ \
    $(PRIVATE_LDLIBS)
endef
endif

 Based on that I simply thing that instead of saying

LOCAL_LDFLAGS = ...

the test should simply state

LOCAL_LDLIBS = ...