zephyr/arch/xtensa/Makefile
Andrew Boie f11910a7fb xtensa: Makefile: cleanup
Some options which are already defined by the build system
for the C compiler or assembler have been removed: -c,
-xassembler-with-cpp, -nostdinc.
References to deleted variable flagALongCall and flagLongCall
removed.
Formatting for 80 columns, there is now one flag per line.

Change-Id: Ieecdb75e26f64c6f58dec3cc636552e7b31a678d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-13 08:04:27 -08:00

42 lines
1.2 KiB
Makefile

SOC_PATH=${XTENSA_CORE}
export SOC_PATH
flagBoardType=
ifeq ($(CONFIG_BOARD_XTENSA),y)
flagBoardType= -DXT_BOARD
endif
ifeq ($(CONFIG_SIMULATOR_XTENSA),y)
flagBoardType= -DXT_SIMULATOR
endif
# XCC emits an annoying warning if this is used even though the
# $(call cc-option,) test in toplevel Makefile passes.
KBUILD_CFLAGS := $(filter-out -fno-omit-frame-pointer, \
${KBUILD_CFLAGS})
# Put functions and data in their own binary sections so that ld can
# garbage collect them
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) \
$(call cc-option,-fdata-sections,)
KBUILD_AFLAGS += $(flagBoardType)
KBUILD_CFLAGS += -DPROC_$(XTENSA_CORE) \
-DCONFIG_$(XTENSA_CORE) \
$(flagBoardType) \
$(call cc-option,-fms-extensions,)
include $(srctree)/arch/$(ARCH)/core/Makefile
include $(srctree)/arch/$(ARCH)/soc/$(SOC_PATH)/Makefile
cflags-$(CONFIG_LTO) += $(call cc-option,-flto,)
KBUILD_CFLAGS += $(cflags-y)
KBUILD_CXXFLAGS += $(cflags-y)
QEMU_CPU_TYPE_xtensa ?= unsupported
QEMU_FLAGS_xtensa = -cpu $(QEMU_CPU_TYPE_xtensa) \
-machine sim -semihosting -nographic
QEMU_xtensa = qemu-system-xtensa
export QEMU_FLAGS_xtensa QEMU_xtensa