diff options
author | Ying Wang <wangying@google.com> | 2012-01-31 21:04:25 -0800 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2012-01-31 21:04:25 -0800 |
commit | b4c2a6404089805ca2bae0c82677115c240cbdd6 (patch) | |
tree | 7e80c1227baf47677de91c4678f325d5c2add4ad /core/combo | |
parent | 324b3a8bc5720f1d030b94fbe05b4034af1c7b0e (diff) | |
download | build-b4c2a6404089805ca2bae0c82677115c240cbdd6.zip build-b4c2a6404089805ca2bae0c82677115c240cbdd6.tar.gz build-b4c2a6404089805ca2bae0c82677115c240cbdd6.tar.bz2 |
Set install name with absolute path for Mac host shared libraries.
Before this change, path of the install name is relative to the top dir.
That means you can execute dynamically-linked binaries only in the top dir.
With this change, you can execute dynamically-linked binaries anywhere.
Change-Id: I1c6441579ffb68505ea678296aceb2e66a6df1be
Diffstat (limited to 'core/combo')
-rw-r--r-- | core/combo/HOST_darwin-x86.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index f5fd001..ca396eb 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -82,6 +82,12 @@ $(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \ $(call _darwin-extract-and-include-single-whole-static-lib, $(lib))) endef +ifeq (,$(filter /%,$(HOST_OUT_SHARED_LIBRARIES))) +ABP_HOST_OUT_SHARED_LIBRARIES := $(shell pwd)/$(HOST_OUT_SHARED_LIBRARIES) +else +ABP_HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT_SHARED_LIBRARIES) +endif + define transform-host-o-to-shared-lib-inner $(call darwin-extract-and-include-whole-static-libs) $(hide) $(PRIVATE_CXX) \ @@ -96,6 +102,7 @@ $(hide) $(PRIVATE_CXX) \ $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \ $(PRIVATE_LDLIBS) \ -o $@ \ + -install_name $(ABP_HOST_OUT_SHARED_LIBRARIES)/$(notdir $@) \ $(PRIVATE_LDFLAGS) \ $(HOST_LIBGCC) endef |