diff options
author | Ying Wang <wangying@google.com> | 2014-04-04 23:10:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-04 23:10:28 +0000 |
commit | b5956468e4cbfbd3a97fa6775b81406c4c949e22 (patch) | |
tree | 8cdac53152b3e4284a7c9afdc840ca58b5a371b8 | |
parent | b9d6f6f15c7ea54a55f892654a450fff609b1f5f (diff) | |
parent | faf3d5ed0fe24acef0b14a1297d78058bcedb016 (diff) | |
download | build-b5956468e4cbfbd3a97fa6775b81406c4c949e22.tar.gz |
Merge "Disable host -fPIE if BUILD_HOST_static is set."
-rw-r--r-- | core/definitions.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/definitions.mk b/core/definitions.mk index 107813ba02..adf8d40df5 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1395,6 +1395,11 @@ endef ########################################################### ## Commands for running gcc to link a host executable ########################################################### +ifdef BUILD_HOST_static +HOST_FPIE_FLAGS := +else +HOST_FPIE_FLAGS := -fPIE -pie +endif ifneq ($(HOST_CUSTOM_LD_COMMAND),true) define transform-host-o-to-executable-inner @@ -1412,7 +1417,7 @@ $(hide) $(PRIVATE_CXX) \ $(HOST_GLOBAL_LD_DIRS) \ $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \ $(PRIVATE_HOST_GLOBAL_LDFLAGS) \ - -fPIE -pie \ + $(HOST_FPIE_FLAGS) \ ) \ $(PRIVATE_LDFLAGS) \ -o $@ \ |