diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-08-21 12:58:45 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-21 12:58:45 -0700 |
commit | cd3050c541f665ee4b8462d1ccdabfe1ed2dbf4a (patch) | |
tree | 6ffc8675e9151c6a8db96ac67f671c2b5814f581 /core | |
parent | 50187e53450fba54131e5d5857e5f05cb6b0e849 (diff) | |
parent | 4d69e06b764d030dcc3ce9bc8b103a75eff3175a (diff) | |
download | build-cd3050c541f665ee4b8462d1ccdabfe1ed2dbf4a.zip build-cd3050c541f665ee4b8462d1ccdabfe1ed2dbf4a.tar.gz build-cd3050c541f665ee4b8462d1ccdabfe1ed2dbf4a.tar.bz2 |
am 4d69e06b: Merge "Added BUILD_HOST_static to build statically linked executable/shared-lib"
* commit '4d69e06b764d030dcc3ce9bc8b103a75eff3175a':
Added BUILD_HOST_static to build statically linked executable/shared-lib
Diffstat (limited to 'core')
-rw-r--r-- | core/combo/HOST_darwin-x86.mk | 5 | ||||
-rw-r--r-- | core/combo/HOST_linux-x86.mk | 5 | ||||
-rw-r--r-- | core/combo/HOST_windows-x86.mk | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index 85bb2cd..23f3994 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -29,6 +29,11 @@ HOST_GLOBAL_CFLAGS += -m32 HOST_GLOBAL_LDFLAGS += -m32 endif # BUILD_HOST_64bit +ifneq ($(strip $(BUILD_HOST_static)),) +# Statically-linked binaries are desirable for sandboxed environment +HOST_GLOBAL_LDFLAGS += -static +endif # BUILD_HOST_static + build_mac_version := $(shell sw_vers -productVersion) mac_sdk_version := 10.6 mac_sdk_root := /Developer/SDKs/MacOSX$(mac_sdk_version).sdk diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index a4da5ce..b369199 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -52,6 +52,11 @@ HOST_GLOBAL_CFLAGS += -m32 HOST_GLOBAL_LDFLAGS += -m32 endif # BUILD_HOST_64bit +ifneq ($(strip $(BUILD_HOST_static)),) +# Statically-linked binaries are desirable for sandboxed environment +HOST_GLOBAL_LDFLAGS += -static +endif # BUILD_HOST_static + HOST_GLOBAL_CFLAGS += -fPIC HOST_GLOBAL_CFLAGS += \ -include $(call select-android-config-h,linux-x86) diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk index fe4bd66..85bc1e0 100644 --- a/core/combo/HOST_windows-x86.mk +++ b/core/combo/HOST_windows-x86.mk @@ -46,6 +46,10 @@ HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows) HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup +ifneq ($(strip $(BUILD_HOST_static)),) +# Statically-linked binaries are desirable for sandboxed environment +HOST_GLOBAL_LDFLAGS += -static +endif # BUILD_HOST_static # when building under Cygwin, ensure that we use Mingw compilation by default. # you can disable this (i.e. to generate Cygwin executables) by defining the |