Changeset 009c485 in mainline for kernel/Makefile
- Timestamp:
- 2018-05-01T19:02:23Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 742fc98e
- Parents:
- 5261062
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r5261062 r009c485 116 116 endif 117 117 118 # 119 # Mind the mutual ordering with the inclusion of the arch Makefile.inc. 120 # AFLAGS and LFLAGS must be initialized before the inclusion. 121 # 122 AFLAGS = --fatal-warnings 123 LFLAGS = -n -T $(LINK) -M --fatal-warnings --warn-common 118 AFLAGS += --fatal-warnings 119 LDFLAGS += -Wl,-n -T $(LINK) -Wl,-M,--fatal-warnings,--warn-common 124 120 125 121 ifeq ($(CONFIG_STRIP_BINARIES),y) 126 LFLAGS += --strip-all 127 endif 128 129 # 130 # Mind the mutual ordering with the initialization of AFLAGS and LFLAGS. 131 # The arch Makefile.inc must be included after the initialization. 132 # 122 LDFLAGS += -s 123 endif 124 133 125 -include arch/$(KARCH)/Makefile.inc 134 126 -include genarch/Makefile.inc … … 358 350 359 351 AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS)) 360 LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS))361 352 362 353 -include $(GENERIC_DEPENDS) … … 385 376 386 377 $(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS) 387 ifeq ($(CONFIG_LTO),y) 388 $(CC) $(DEFS) $(CFLAGS) $(LD_CFLAGS) -Xlinker -Map -Xlinker $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 389 else 390 $(LD) $(LFLAGS) -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 391 endif 378 $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 392 379 393 380 $(LINK): $(LINK).in … … 411 398 $(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) 412 399 echo "$(AS_PROLOG)""$(SYMTAB_SECTION)" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(EMPTY_MAP) - 413 ifeq ($(CONFIG_LTO),y) 414 $(CC) $(DEFS) $(CFLAGS) $(LD_CFLAGS) -Xlinker -Map -Xlinker $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 415 else 416 $(LD) $(LFLAGS) -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 417 endif 400 $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 418 401 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 419 402 $(GENMAP) $(MAP_PREV) $(DUMP) $@ … … 423 406 424 407 echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$@\"" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(SIZEOK_MAP) - 425 ifeq ($(CONFIG_LTO),y) 426 $(CC) $(DEFS) $(CFLAGS) $(LD_CFLAGS) -Xlinker -Map -Xlinker $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 427 else 428 $(LD) $(LFLAGS) -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 429 endif 408 $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 430 409 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 431 410 $(GENMAP) $(MAP_PREV) $(DUMP) $@
Note:
See TracChangeset
for help on using the changeset viewer.