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

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: Enable bionic static/dynamic and nacl_io test 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
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..3bdf53440167359ed14d7810dc2a4771bad27dd8 100644
--- a/native_client_sdk/src/tools/nacl_gcc.mk
+++ b/native_client_sdk/src/tools/nacl_gcc.mk
@@ -73,6 +73,17 @@ 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 (,$(BIONIC_USE_DYNAMIC))
+BIONIC_LINK:=-static
+else
+BIONIC_LINK:=-Wl,-Ttext-segment=0x100000
+endif
+
+
LDFLAGS_SHARED = -shared
#
@@ -355,7 +366,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))
binji 2014/04/28 21:01:22 won't this affect arm newlib as well?
noelallen1 2014/04/28 23:00:33 Done.
$(call LOG,VALIDATE,$$@,$(NCVAL) $$@)
endif
endef

Powered by Google App Engine
This is Rietveld 408576698