Changeset cf84f1bf in mainline for kernel/Makefile
- Timestamp:
- 2010-05-26T15:36:03Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3c664d6
- Parents:
- 938f227
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r938f227 rcf84f1bf 118 118 endif 119 119 120 ifeq ($(CONFIG_LTO),y) 121 GCC_CFLAGS += -flto 122 endif 123 120 124 -include arch/$(KARCH)/Makefile.inc 121 125 -include genarch/Makefile.inc … … 167 171 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 168 172 endif 173 174 AFLAGS = 175 LFLAGS = -N -T $(LINK) -M 169 176 170 177 ## Generic kernel sources … … 348 355 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) 349 356 357 LFLAGS_LTO := $(addprefix -Xlinker ,$(LFLAGS)) 358 350 359 ifeq ($(CONFIG_SYMTAB),y) 351 360 SYMTAB_OBJECTS := generic/src/debug/real_map.o … … 361 370 362 371 $(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS) 363 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 372 ifeq ($(CONFIG_LTO),y) 373 $(GCC) $(LFLAGS_LTO) -Xlinker -Map -Xlinker $(MAP) $(DEFS) $(GCC_CFLAGS) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 374 else 375 $(LD) $(LFLAGS) -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 376 endif 364 377 ifeq ($(CONFIG_STRIP_BINARIES),y) 365 $(STRIP) $(RAW) 378 $(STRIP) $(RAW) 366 379 endif 367 380 … … 370 383 371 384 %.o: %.S $(DEPEND) 372 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@385 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c -o $@ $< 373 386 ifeq ($(PRECHECK),y) 374 387 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(GCC_CFLAGS) -D__ASM__ … … 387 400 388 401 test/fpu/%.o: test/fpu/%.c $(DEPEND) 389 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@402 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c -o $@ $< 390 403 ifeq ($(PRECHECK),y) 391 404 $(JOBFILE) $(JOB) $< $@ cc test $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) … … 397 410 398 411 %.o: %.c $(DEPEND) 399 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@412 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c -o $@ $< 400 413 ifeq ($(PRECHECK),y) 401 414 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) … … 407 420 $(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) 408 421 echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o $(EMPTY_MAP) 409 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 422 ifeq ($(CONFIG_LTO),y) 423 $(GCC) $(LFLAGS_LTO) -Xlinker -Map -Xlinker $(MAP_PREV) $(DEFS) $(GCC_CFLAGS) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 424 else 425 $(LD) $(LFLAGS) -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 426 endif 410 427 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 411 428 $(GENMAP) $(MAP_PREV) $(DUMP) $@ … … 415 432 416 433 echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o $(SIZEOK_MAP) 417 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 434 ifeq ($(CONFIG_LTO),y) 435 $(GCC) $(LFLAGS_LTO) -Xlinker -Map -Xlinker $(MAP_PREV) $(DEFS) $(GCC_CFLAGS) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 436 else 437 $(LD) $(LFLAGS) -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 438 endif 418 439 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 419 440 $(GENMAP) $(MAP_PREV) $(DUMP) $@
Note:
See TracChangeset
for help on using the changeset viewer.