Build: use CPP just for pre-processing
Using AS for pre-processing looks a bit weird, and some assembly specific options are given for nothing. Rather, use CPP. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
f2e1d57e43
commit
59de50963c
18
Makefile
18
Makefile
|
@ -143,16 +143,14 @@ TF_CFLAGS_aarch64 = -mgeneral-regs-only -mstrict-align
|
||||||
ASFLAGS_aarch32 = -march=armv8-a
|
ASFLAGS_aarch32 = -march=armv8-a
|
||||||
TF_CFLAGS_aarch32 = -march=armv8-a
|
TF_CFLAGS_aarch32 = -march=armv8-a
|
||||||
|
|
||||||
ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
|
CPPFLAGS = ${DEFINES} ${INCLUDES} -nostdinc \
|
||||||
-Werror -Wmissing-include-dirs \
|
-Wmissing-include-dirs -Werror
|
||||||
-D__ASSEMBLY__ $(ASFLAGS_$(ARCH)) \
|
ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \
|
||||||
${DEFINES} ${INCLUDES}
|
-D__ASSEMBLY__ -ffreestanding \
|
||||||
TF_CFLAGS += -nostdinc -ffreestanding -Wall \
|
-Wa,--fatal-warnings
|
||||||
-Werror -Wmissing-include-dirs \
|
TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
|
||||||
-std=c99 -Os \
|
-ffreestanding -Wall -std=c99 -Os \
|
||||||
$(TF_CFLAGS_$(ARCH)) \
|
-ffunction-sections -fdata-sections
|
||||||
${DEFINES} ${INCLUDES}
|
|
||||||
TF_CFLAGS += -ffunction-sections -fdata-sections
|
|
||||||
|
|
||||||
LDFLAGS += --fatal-warnings -O1
|
LDFLAGS += --fatal-warnings -O1
|
||||||
LDFLAGS += --gc-sections
|
LDFLAGS += --gc-sections
|
||||||
|
|
|
@ -262,11 +262,11 @@ $(eval PREREQUISITES := $(1).d)
|
||||||
|
|
||||||
$(1): $(2)
|
$(1): $(2)
|
||||||
@echo " PP $$<"
|
@echo " PP $$<"
|
||||||
$$(Q)$$(AS) $$(ASFLAGS) -P -E -D__LINKER__ -o $$@ $$<
|
$$(Q)$$(CPP) $$(CPPFLAGS) -P -D__ASSEMBLY__ -D__LINKER__ -o $$@ $$<
|
||||||
|
|
||||||
$(PREREQUISITES): $(2) | $(dir ${1})
|
$(PREREQUISITES): $(2) | $(dir ${1})
|
||||||
@echo " DEPS $$@"
|
@echo " DEPS $$@"
|
||||||
$$(Q)$$(AS) $$(ASFLAGS) -M -MT $(1) -MF $$@ $$<
|
$$(Q)$$(CPP) $$(CPPFLAGS) -D__ASSEMBLY__ -M -MT $(1) -MF $$@ $$<
|
||||||
|
|
||||||
ifdef IS_ANYTHING_TO_BUILD
|
ifdef IS_ANYTHING_TO_BUILD
|
||||||
-include $(PREREQUISITES)
|
-include $(PREREQUISITES)
|
||||||
|
|
Loading…
Reference in New Issue