Changes in kernel/Makefile [f8d07859:a721f6a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
rf8d07859 ra721f6a 82 82 83 83 INCLUDES = generic/include 84 85 ifeq ($(CONFIG_OPTIMIZE_FOR_SIZE),y) 86 OPTIMIZATION = s 87 else 88 OPTIMIZATION = 3 89 endif 84 OPTIMIZATION = 3 90 85 91 86 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__ … … 96 91 -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \ 97 92 -Werror-implicit-function-declaration -Wwrite-strings \ 98 - pipe93 -Werror -pipe 99 94 100 95 ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \ 101 96 -ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wmissing-prototypes \ 102 -Werror-implicit-function-declaration - wd17097 -Werror-implicit-function-declaration -Werror -wd170 103 98 104 99 SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \ … … 113 108 -pipe -arch $(CLANG_ARCH) 114 109 115 ifeq ($(CONFIG_DEBUG),y)116 GCC_CFLAGS += -Werror117 ICC_CFLAGS += -Werror118 endif119 120 ifeq ($(CONFIG_LTO),y)121 GCC_CFLAGS += -flto122 endif123 124 110 -include arch/$(KARCH)/Makefile.inc 125 111 -include genarch/Makefile.inc … … 171 157 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 172 158 endif 173 174 AFLAGS =175 LFLAGS = -N -T $(LINK) -M176 159 177 160 ## Generic kernel sources … … 355 338 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) 356 339 357 LFLAGS_LTO := $(addprefix -Xlinker ,$(LFLAGS))358 359 340 ifeq ($(CONFIG_SYMTAB),y) 360 341 SYMTAB_OBJECTS := generic/src/debug/real_map.o … … 370 351 371 352 $(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_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 377 ifeq ($(CONFIG_STRIP_BINARIES),y) 378 $(STRIP) $(RAW) 379 endif 353 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) 380 354 381 355 $(LINK): $(LINK).in $(DEPEND) … … 383 357 384 358 %.o: %.S $(DEPEND) 385 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c -o $@ $<359 $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@ 386 360 ifeq ($(PRECHECK),y) 387 361 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(GCC_CFLAGS) -D__ASM__ … … 400 374 401 375 test/fpu/%.o: test/fpu/%.c $(DEPEND) 402 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c -o $@ $<376 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@ 403 377 ifeq ($(PRECHECK),y) 404 378 $(JOBFILE) $(JOB) $< $@ cc test $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) … … 410 384 411 385 %.o: %.c $(DEPEND) 412 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c -o $@ $<386 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@ 413 387 ifeq ($(PRECHECK),y) 414 388 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) … … 420 394 $(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) 421 395 echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o $(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 396 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) 427 397 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 428 398 $(GENMAP) $(MAP_PREV) $(DUMP) $@ … … 432 402 433 403 echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o $(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 404 $(LD) -N $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) 439 405 $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP) 440 406 $(GENMAP) $(MAP_PREV) $(DUMP) $@
Note:
See TracChangeset
for help on using the changeset viewer.