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