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


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    r874ed210 r247fdea  
    8787INCLUDES_FLAGS = $(addprefix -I,$(INCLUDES))
    8888
    89 DEFS = -D_HELENOS_SOURCE -DKERNEL -DRELEASE=$(RELEASE) "-DCOPYRIGHT=$(COPYRIGHT)" "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
     89DEFS = -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))=. \
    95         -Wa,--fatal-warnings
     94        -fdebug-prefix-map=$(realpath $(ROOT_PATH))=.
    9695
    9796GCC_CFLAGS = -std=gnu11 -Wall -Wextra -Wno-unused-parameter \
     
    102101        -Wno-missing-field-initializers -Wno-unused-command-line-argument \
    103102        -Wmissing-prototypes -Werror-implicit-function-declaration \
    104         -Wwrite-strings -pipe -fno-stack-protector -fno-PIC \
    105         -mllvm -asm-macro-max-nesting-depth=1000
     103        -Wwrite-strings -pipe -fno-stack-protector -fno-PIC
    106104
    107105ifeq ($(CONFIG_DEBUG),y)
     
    121119endif
    122120
     121AFLAGS += --fatal-warnings
    123122LDFLAGS += -Wl,-n -T $(LINK) -Wl,-M,--fatal-warnings,--warn-common
    124123
     
    208207        generic/src/lib/gsort.c \
    209208        generic/src/lib/str.c \
    210         generic/src/lib/strtol.c \
    211209        generic/src/lib/str_error.c \
    212210        generic/src/lib/elf.c \
     
    342340GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES)))
    343341
     342AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS))
     343
    344344-include $(GENERIC_DEPENDS)
    345345-include $(ARCH_DEPENDS)
    346346-include $(GENARCH_DEPENDS)
    347347
     348ifeq ($(COMPILER),clang)
     349        AS_CFLAGS += -mllvm -asm-macro-max-nesting-depth=1000
     350endif
     351
    348352ifeq ($(CONFIG_SYMTAB),y)
    349353        SYMTAB_OBJECTS := generic/src/debug/real_map.o
     
    369373
    370374%.o: %.S
    371         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS)
     375        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
    372376
    373377%.o: %.s
    374         $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS)
     378        $(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
    375379
    376380%.o: %.c
     
    378382
    379383$(REAL_MAP).o: $(REAL_MAP).bin
    380         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$<\"" | $(CC) $(CFLAGS) -x assembler -c -o $@ -
     384        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$<\"" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $@ -
    381385
    382386$(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
    383         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)" | $(CC) $(CFLAGS) -x assembler -c -o $(EMPTY_MAP) -
     387        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(EMPTY_MAP) -
    384388        $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP)
    385389        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
     
    389393        # on architectures that have bss after symtab
    390394
    391         echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$@\"" | $(CC) $(CFLAGS) -x assembler -c -o $(SIZEOK_MAP) -
     395        echo "$(AS_PROLOG)""$(SYMTAB_SECTION)"" .incbin \"$@\"" | $(CC) $(CFLAGS) $(AS_CFLAGS) -x assembler -c -o $(SIZEOK_MAP) -
    392396        $(CC) $(DEFS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP)
    393397        $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
Note: See TracChangeset for help on using the changeset viewer.