From 0f9276d4ba6707ebc42be2aab1d9aae3dce14c80 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Thu, 29 May 2014 15:10:44 -0700 Subject: [PATCH] Add -shared to clang LDFLAGS. TOT clang doesn't do the right thing with regards to -pie without this. Change-Id: Ic14cfb25d96359eb18899c09ebaf1d311e937d01 --- core/combo/TARGET_linux-arm.mk | 1 + core/combo/TARGET_linux-arm64.mk | 1 + core/combo/TARGET_linux-mips.mk | 1 + core/combo/TARGET_linux-mips64.mk | 1 + 4 files changed, 4 insertions(+) diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index 52ddbecd2..eb0a9f80b 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -225,6 +225,7 @@ $(hide) $(PRIVATE_CXX) \ -nostdlib -Wl,-soname,$(notdir $@) \ -Wl,--gc-sections \ -Wl,-shared,-Bsymbolic \ + -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 1b6e7334c..92112dd5d 100644 --- a/core/combo/TARGET_linux-arm64.mk +++ b/core/combo/TARGET_linux-arm64.mk @@ -163,6 +163,7 @@ $(hide) $(PRIVATE_CXX) \ -nostdlib -Wl,-soname,$(notdir $@) \ -Wl,--gc-sections \ -Wl,-shared,-Bsymbolic \ + -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 a0b02949e..c84ce8f4b 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -216,6 +216,7 @@ $(hide) $(PRIVATE_CXX) \ -nostdlib -Wl,-soname,$(notdir $@) \ -Wl,--gc-sections \ -Wl,-shared,-Bsymbolic \ + -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 aec00eae2..ae840b70f 100644 --- a/core/combo/TARGET_linux-mips64.mk +++ b/core/combo/TARGET_linux-mips64.mk @@ -224,6 +224,7 @@ define transform-o-to-shared-lib-inner $(hide) $(PRIVATE_CXX) \ -nostdlib -Wl,-soname,$(notdir $@) \ -Wl,--gc-sections \ + -shared \ -Wl,-shared,-Bsymbolic \ $(PRIVATE_TARGET_GLOBAL_LD_DIRS) \ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \