Changes in kernel/Makefile [247fdea:874ed210] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r247fdea r874ed210  
    8787INCLUDES_FLAGS = $(addprefix -I,$(INCLUDES))
    8888
    89 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DCOPYRIGHT=$(COPYRIGHT)" "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
     89DEFS = -D_HELENOS_SOURCE -DKERNEL -DRELEASE=$(RELEASE) "-DCOPYRIGHT=$(COPYRIGHT)" "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
    9090
    9191COMMON_CFLAGS = $(INCLUDES_FLAGS) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
    9292        -ffreestanding -nostdlib \
    9393        -fexec-charset=UTF-8 -finput-charset=UTF-8 -fno-common \
    94         -fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
     94        -fdebug-prefix-map=$(realpath $(ROOT_PATH))=. \
     95        -Wa,--fatal-warnings
    9596
    9697GCC_CFLAGS = -std=gnu11 -Wall -Wextra -Wno-unused-parameter \
     
    101102        -Wno-missing-field-initializers -Wno-unused-command-line-argument \
    102103        -Wmissing-prototypes -Werror-implicit-function-declaration \
    103         -Wwrite-strings -pipe -fno-stack-protector -fno-PIC
     104        -Wwrite-strings -pipe -fno-stack-protector -fno-PIC \
     105        -mllvm -asm-macro-max-nesting-depth=1000
    104106
    105107ifeq ($(CONFIG_DEBUG),y)
     
    119121endif
    120122
    121 AFLAGS += --fatal-warnings
    122123LDFLAGS += -Wl,-n -T $(LINK) -Wl,-M,--fatal-warnings,--warn-common
    123124
     
    207208        generic/src/lib/gsort.c \
    208209        generic/src/lib/str.c \
     210        generic/src/lib/strtol.c \
    209211        generic/src/lib/str_error.c \
    210212        generic/src/lib/elf.c \
     
    340342GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES)))
    341343
    342 AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
    343 
    344344-include $(GENERIC_DEPENDS)
    345345-include $(ARCH_DEPENDS)
    346346-include $(GENARCH_DEPENDS)
    347347
    348 ifeq ($(COMPILER),clang)
    349         AS_CFLAGS += -mllvm -asm-macro-max-nesting-depth=1000
    350 endif
    351 
    352348ifeq ($(CONFIG_SYMTAB),y)
    353349        SYMTAB_OBJECTS := generic/src/debug/real_map.o
     
    373369
    374370%.o: %.S
    375         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
     371        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS)
    376372
    377373%.o: %.s
    378         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
     374        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS)
    379375
    380376%.o: %.c
     
    382378
    383379$(REAL_MAP).o: $(REAL_MAP).bin
    384         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$<\"" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $@ -
     380        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$<\"" | $(CC) $(CFLAGS) -x assembler -c -o $@ -
    385381
    386382$(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
    387         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(EMPTY_MAP) -
     383        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)" | $(CC) $(CFLAGS) -x assembler -c -o $(EMPTY_MAP) -
    388384        $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP)
    389385        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
     
    393389        # on architectures that have bss after symtab
    394390
    395         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$@\"" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(SIZEOK_MAP) -
     391        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$@\"" | $(CC) $(CFLAGS) -x assembler -c -o $(SIZEOK_MAP) -
    396392        $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP)
    397393        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
Note: See TracChangeset for help on using the changeset viewer.