Place linker arguments after objects for gcc
gcc 4.6.1 does not properly link if libraries are specified before objects. Change-Id: Iabe3eac831fe597abe8a93a946ab7a22d584db46
This commit is contained in:
@@ -1290,13 +1290,6 @@ endef
|
|||||||
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
|
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
|
||||||
define transform-host-o-to-executable-inner
|
define transform-host-o-to-executable-inner
|
||||||
$(hide) $(PRIVATE_CXX) \
|
$(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) \
|
$(PRIVATE_ALL_OBJECTS) \
|
||||||
-Wl,--whole-archive \
|
-Wl,--whole-archive \
|
||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
||||||
@@ -1305,6 +1298,13 @@ $(hide) $(PRIVATE_CXX) \
|
|||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
|
||||||
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
|
||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||||
|
-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) \
|
||||||
|
) \
|
||||||
-o $@ \
|
-o $@ \
|
||||||
$(PRIVATE_LDLIBS)
|
$(PRIVATE_LDLIBS)
|
||||||
endef
|
endef
|
||||||
|
Reference in New Issue
Block a user