Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: native_client_sdk/src/tools/nacl_gcc.mk

Issue 240493003: Support static/dynamic for bionic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issues. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/nacl_gcc.mk
diff --git a/native_client_sdk/src/tools/nacl_gcc.mk b/native_client_sdk/src/tools/nacl_gcc.mk
index 832efeba97f7ccedc195a18960e60f36063c86dc..9f7c4785387c1a2454f2dd3bdc7517f181a520e7 100644
--- a/native_client_sdk/src/tools/nacl_gcc.mk
+++ b/native_client_sdk/src/tools/nacl_gcc.mk
@@ -73,6 +73,18 @@ X86_64_LDFLAGS ?= -Wl,-Map,$(X86_64_OUTDIR)/$(TARGET)_x86_64.map
ARM_LDFLAGS ?= -Wl,-Map,$(ARM_OUTDIR)/$(TARGET)_arm.map
endif
+#
+# Choose between static and dynamic linking for Bionic
+# (Default to dynamic)
+#
+ifeq ($(TOOLCHAIN),bionic)
+ifeq (,$(BIONIC_USE_DYNAMIC))
+BIONIC_LINK:=-static
+else
+BIONIC_LINK:=-Wl,-Ttext-segment=0x100000
+endif
+endif
+
LDFLAGS_SHARED = -shared
#
@@ -355,7 +367,7 @@ ifneq (,$(findstring arm,$(ARCHES)))
all: $(ARM_OUTDIR)/$(1)_arm.nexe
$(ARM_OUTDIR)/$(1)_arm.nexe: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm)) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
$(MKDIR) -p $$(dir $$@)
- $(call LOG,LINK,$$@,$(ARM_LINK) -static -o $$@ $$(filter %.o,$$^) $(NACL_LDFLAGS) $(ARM_LDFLAGS) $(foreach path,$(6),-L$(path)/$(TOOLCHAIN)_arm/$(CONFIG)) $(foreach lib,$(3),-l$(lib)) $(5))
+ $(call LOG,LINK,$$@,$(ARM_LINK) $(BIONIC_LINK) -o $$@ $$(filter %.o,$$^) $(NACL_LDFLAGS) $(ARM_LDFLAGS) $(foreach path,$(6),-L$(path)/$(TOOLCHAIN)_arm/$(CONFIG)) $(foreach lib,$(3),-l$(lib)) $(5))
$(call LOG,VALIDATE,$$@,$(NCVAL) $$@)
endif
endef
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698