Revert "Move compiler optimization to the SoC"

This reverts commit 778d5b11c5327be4b40c7745e9beaecfd6327e13.

This patch has been identified as breaking the build when trying
to manually build non-x86 applications.

Change-Id: I1857745049dfef7193de58737108314b7aae01c5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-01-21 17:10:39 -08:00 committed by Anas Nashif
commit 1f63ec7264
11 changed files with 17 additions and 43 deletions

View file

@ -1,10 +1,14 @@
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
include $(srctree)/arch/$(ARCH)/soc/$(SOC_NAME)/Makefile
arch-$(CONFIG_CPU_CORTEX_M3) += $(call cc-option,-mthumb -mcpu=cortex-m3) \
$(call cc-option,-mthumb -march=armv7-m)
arch-$(CONFIG_CPU_CORTEX_M4) += $(call cc-option,-mthumb -mcpu=cortex-m4) \
$(call cc-option,-mthumb -march=armv7e-m)
cflags-$(CONFIG_LTO) += $(call cc-option,-flto,)
cflags-$(CONFIG_LTO) = $(call cc-option,-flto,)
KBUILD_CFLAGS += $(cflags-y)
KBUILD_CFLAGS += $(cflags-y) $(arch-y)
KBUILD_AFLAGS += $(arch-y)
QEMU_CPU_TYPE_arm = cortex-m3
QEMU_FLAGS_arm = -cpu $(QEMU_CPU_TYPE_arm) \