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>
This commit is contained in:
Andrew Boie 2017-02-02 12:19:12 -08:00
commit f11910a7fb

View file

@ -9,11 +9,21 @@ ifeq ($(CONFIG_SIMULATOR_XTENSA),y)
flagBoardType= -DXT_SIMULATOR
endif
# Remove compilation flags added by top makefile and which are not supported by xcc and enable.
KBUILD_CFLAGS := $(filter-out -fno-asynchronous-unwind-tables -fno-omit-frame-pointer,${KBUILD_CFLAGS})
# Add Xtensa pecific flags
KBUILD_AFLAGS += -c -xassembler-with-cpp $(flagBoardType) $(flagALongCall)
KBUILD_CFLAGS += -DPROC_$(XTENSA_CORE) -DCONFIG_$(XTENSA_CORE) -c $(flagLongCall) -nostdinc $(flagBoardType) $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,) $(call cc-option,-fms-extensions,)
# 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