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

Side by Side 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, 7 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # 5 #
6 # GNU Make based build file. For details on GNU Make see: 6 # GNU Make based build file. For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html 7 # http://www.gnu.org/software/make/manual/make.html
8 # 8 #
9 9
10 # 10 #
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ifeq (,$(MULTI_PLATFORM)) 66 ifeq (,$(MULTI_PLATFORM))
67 X86_32_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_x86_32.map 67 X86_32_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_x86_32.map
68 X86_64_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_x86_64.map 68 X86_64_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_x86_64.map
69 ARM_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_arm.map 69 ARM_LDFLAGS ?= -Wl,-Map,$(OUTDIR)/$(TARGET)_arm.map
70 else 70 else
71 X86_32_LDFLAGS ?= -Wl,-Map,$(X86_32_OUTDIR)/$(TARGET)_x86_32.map 71 X86_32_LDFLAGS ?= -Wl,-Map,$(X86_32_OUTDIR)/$(TARGET)_x86_32.map
72 X86_64_LDFLAGS ?= -Wl,-Map,$(X86_64_OUTDIR)/$(TARGET)_x86_64.map 72 X86_64_LDFLAGS ?= -Wl,-Map,$(X86_64_OUTDIR)/$(TARGET)_x86_64.map
73 ARM_LDFLAGS ?= -Wl,-Map,$(ARM_OUTDIR)/$(TARGET)_arm.map 73 ARM_LDFLAGS ?= -Wl,-Map,$(ARM_OUTDIR)/$(TARGET)_arm.map
74 endif 74 endif
75 75
76 #
77 # Choose between static and dynamic linking for Bionic
78 # (Default to dynamic)
79 #
80 ifeq ($(TOOLCHAIN),bionic)
81 ifeq (,$(BIONIC_USE_DYNAMIC))
82 BIONIC_LINK:=-static
83 else
84 BIONIC_LINK:=-Wl,-Ttext-segment=0x100000
85 endif
86 endif
87
76 LDFLAGS_SHARED = -shared 88 LDFLAGS_SHARED = -shared
77 89
78 # 90 #
79 # Compile Macro 91 # Compile Macro
80 # 92 #
81 # $1 = Source Name 93 # $1 = Source Name
82 # $2 = Compile Flags 94 # $2 = Compile Flags
83 # 95 #
84 define C_COMPILER_RULE 96 define C_COMPILER_RULE
85 -include $(call SRC_TO_DEP,$(1),_x86_32) 97 -include $(call SRC_TO_DEP,$(1),_x86_32)
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 $(X86_64_OUTDIR)/$(1)_x86_64.nexe: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_ x86_64)) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp) 360 $(X86_64_OUTDIR)/$(1)_x86_64.nexe: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_ x86_64)) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
349 $(MKDIR) -p $$(dir $$@) 361 $(MKDIR) -p $$(dir $$@)
350 $(call LOG,LINK,$$@,$(X86_64_LINK) -o $$@ $$(filter %.o,$$^) $(NACL_LDFL AGS) $(X86_64_LDFLAGS) $(foreach path,$(6),-L$(path)/$(TOOLCHAIN)_x86_64/$(CONFI G)) $(foreach lib,$(3),-l$(lib)) $(5)) 362 $(call LOG,LINK,$$@,$(X86_64_LINK) -o $$@ $$(filter %.o,$$^) $(NACL_LDFL AGS) $(X86_64_LDFLAGS) $(foreach path,$(6),-L$(path)/$(TOOLCHAIN)_x86_64/$(CONFI G)) $(foreach lib,$(3),-l$(lib)) $(5))
351 $(call LOG,VALIDATE,$$@,$(NCVAL) $$@) 363 $(call LOG,VALIDATE,$$@,$(NCVAL) $$@)
352 endif 364 endif
353 365
354 ifneq (,$(findstring arm,$(ARCHES))) 366 ifneq (,$(findstring arm,$(ARCHES)))
355 all: $(ARM_OUTDIR)/$(1)_arm.nexe 367 all: $(ARM_OUTDIR)/$(1)_arm.nexe
356 $(ARM_OUTDIR)/$(1)_arm.nexe: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm)) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp) 368 $(ARM_OUTDIR)/$(1)_arm.nexe: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm)) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
357 $(MKDIR) -p $$(dir $$@) 369 $(MKDIR) -p $$(dir $$@)
358 » $(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)) 370 » $(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))
359 $(call LOG,VALIDATE,$$@,$(NCVAL) $$@) 371 $(call LOG,VALIDATE,$$@,$(NCVAL) $$@)
360 endif 372 endif
361 endef 373 endef
362 374
363 375
364 # 376 #
365 # Generalized Link Macro 377 # Generalized Link Macro
366 # 378 #
367 # $1 = Target Name 379 # $1 = Target Name
368 # $2 = List of Sources 380 # $2 = List of Sources
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) 557 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set)
546 endif 558 endif
547 $(SEL_LDR_PATH) $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe -- $(EXE_ARGS) 559 $(SEL_LDR_PATH) $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe -- $(EXE_ARGS)
548 560
549 debug: all 561 debug: all
550 ifndef NACL_ARCH 562 ifndef NACL_ARCH
551 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) 563 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set)
552 endif 564 endif
553 $(SEL_LDR_PATH) -d $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe -- $(EXE_ARGS) 565 $(SEL_LDR_PATH) -d $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe -- $(EXE_ARGS)
554 endif 566 endif
OLDNEW
« 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