summaryrefslogtreecommitdiffstats
path: root/core/combo/HOST_linux-x86.mk
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-04-28 00:35:19 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-04-28 00:53:55 +0800
commitf9613a4f730b8a385971f95150582b9a543302ae (patch)
treef9651c70667c33ca43fc3315f5c6d7dcc86ae2bf /core/combo/HOST_linux-x86.mk
parentf8dc89b49ac64331f23c97d6aad3866dd3fb7344 (diff)
downloadbuild-f9613a4f730b8a385971f95150582b9a543302ae.zip
build-f9613a4f730b8a385971f95150582b9a543302ae.tar.gz
build-f9613a4f730b8a385971f95150582b9a543302ae.tar.bz2
Added BUILD_HOST_static to build statically linked executable/shared-lib
Statically linked executable/shared-lib (eg. SDK tools) are useful in sandboxed environment. In BUILD_HOST_static zipalign needs -lpthread indirectly: zipalign->libutils.a->liblog.a->logd_write.c->pthread Change-Id: I8fa91a937b728ccdf942c4ba199efb1e2e49da3d
Diffstat (limited to 'core/combo/HOST_linux-x86.mk')
-rw-r--r--core/combo/HOST_linux-x86.mk5
1 files changed, 5 insertions, 0 deletions
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)