Changes in kernel/Makefile [fe171357:4761f54] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rfe171357 r4761f54  
    5959
    6060GENMAP = tools/genmap.py
     61JOBFILE = $(ROOT_PATH)/tools/jobfile.py
    6162
    6263LINK = arch/$(KARCH)/_link.ld
    6364EMPTY_MAP = generic/src/debug/empty_map.o
    6465SIZEOK_MAP = generic/src/debug/sizeok_map.o
    65 
    66 ifeq ($(PRECHECK),y)
    67         JOBFILE = $(ROOT_PATH)/tools/jobfile.py
    68         # XXX: Do not change the order of arguments.
    69         CC_JOB = $(JOBFILE) $(JOB) $(CC) $< -o $@
    70 else
    71         CC_JOB = $(CC) $< -o $@
    72 endif
    7366
    7467.PHONY: all clean autogen_clean depend
     
    9184COMMON_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    9285        -ffreestanding -fno-builtin -nostdlib -nostdinc \
    93         -fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common \
    94         -fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
     86        -fexec-charset=UTF-8 -finput-charset=UTF-8
    9587
    9688GCC_CFLAGS = -std=gnu99 -Wall -Wextra -Wno-unused-parameter \
     
    119111# AFLAGS and LFLAGS must be initialized before the inclusion.
    120112#
    121 AFLAGS = --fatal-warnings
    122 LFLAGS = -n -T $(LINK) -M --fatal-warnings --warn-common
    123 
    124 ifeq ($(CONFIG_STRIP_BINARIES),y)
    125         LFLAGS += --strip-all
     113AFLAGS =
     114LFLAGS = -n -T $(LINK) -M --fatal-warnings
     115
     116# FIXME: This condition is a workaround for issues #693 and #694.
     117ifneq ($(KARCH),sparc64)
     118ifneq ($(KARCH),mips32)
     119        AFLAGS += --fatal-warnings
     120endif
    126121endif
    127122
     
    397392        $(LD) $(LFLAGS) -Map $(MAP) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS)
    398393endif
     394ifeq ($(CONFIG_STRIP_BINARIES),y)
     395        $(STRIP) $(RAW)
     396endif
    399397
    400398$(LINK): $(LINK).in | depend
     
    407405
    408406%.o: %.S | depend
    409         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
     407        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     408ifeq ($(PRECHECK),y)
     409        $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
     410endif
    410411
    411412%.o: %.s | depend
    412         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
     413        $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
     414ifeq ($(PRECHECK),y)
     415        $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
     416endif
    413417
    414418%.o: %.c | depend
    415         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION))
     419        $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
     420ifeq ($(PRECHECK),y)
     421        $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
     422endif
    416423
    417424$(REAL_MAP).o: $(REAL_MAP).bin
     
    451458        done
    452459
    453 depend: $(AUTOGENS_H)
     460depend: $(COMMON_HEADER_ARCH) $(AUTOGENS_H)
     461
     462$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
     463        ln -sfn ../../../../$< $@
    454464
    455465autogen_clean:
Note: See TracChangeset for help on using the changeset viewer.