summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-08-07 23:24:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-06 23:49:29 +0000
commitcbc742a1b7202dfac78795469d04c02cd323e064 (patch)
tree46d0c60a4427ff47aa813565a10f309937695d46
parentafae9fd8ddf679344b456cc3ab339d9f330557a5 (diff)
parentb6bb71b85d506dcc4763290d72c4168afd541f7d (diff)
downloadbuild-cbc742a1b7202dfac78795469d04c02cd323e064.zip
build-cbc742a1b7202dfac78795469d04c02cd323e064.tar.gz
build-cbc742a1b7202dfac78795469d04c02cd323e064.tar.bz2
Merge "Inhibit implicit -Bsymolic in -shared."
-rw-r--r--core/binary.mk1
-rw-r--r--core/combo/TARGET_linux-arm.mk2
-rw-r--r--core/combo/TARGET_linux-arm64.mk2
-rw-r--r--core/combo/TARGET_linux-mips.mk2
-rw-r--r--core/combo/TARGET_linux-mips64.mk2
-rw-r--r--core/combo/TARGET_linux-x86.mk2
-rw-r--r--core/combo/TARGET_linux-x86_64.mk2
-rw-r--r--core/definitions.mk2
8 files changed, 8 insertions, 7 deletions
diff --git a/core/binary.mk b/core/binary.mk
index 6e89ac0..6834797 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -330,6 +330,7 @@ ifneq ($(LOCAL_NO_SYNTAX_CHECK),true)
endif
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(my_cxx)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CLANG := $(my_clang)
# TODO: support a mix of standard extensions so that this isn't necessary
LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION))
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 51c1814..7c7f1f4 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -198,7 +198,7 @@ define $(combo_2nd_arch_prefix)transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) \
-Wl,--gc-sections \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk
index 7a40b33..3cef5e5 100644
--- a/core/combo/TARGET_linux-arm64.mk
+++ b/core/combo/TARGET_linux-arm64.mk
@@ -162,7 +162,7 @@ define transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) \
-Wl,--gc-sections \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index 0e4cb9d..5ec537a 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -170,7 +170,7 @@ define $(combo_2nd_arch_prefix)transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) \
-Wl,--gc-sections \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index d255e10..b5555b2 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -174,7 +174,7 @@ define transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) \
-Wl,--gc-sections \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index b17efec..2ebb887 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -154,7 +154,7 @@ define $(combo_2nd_arch_prefix)transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
-nostdlib -Wl,-soname,$(notdir $@) \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 4f4e7a2..cd9ea76 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -158,7 +158,7 @@ define transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
-nostdlib -Wl,-soname,$(notdir $@) \
- -shared \
+ $(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl,-shared) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
$(PRIVATE_ALL_OBJECTS) \
diff --git a/core/definitions.mk b/core/definitions.mk
index 24c7a07..6082790 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1309,7 +1309,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
-Wl,-rpath-link=$(PRIVATE_TARGET_OUT_INTERMEDIATE_LIBRARIES) \
-Wl,-rpath,\$$ORIGIN/../lib \
- -shared -Wl,-soname,$(notdir $@) \
+ -Wl,-shared -Wl,-soname,$(notdir $@) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(PRIVATE_ALL_OBJECTS) \