ARM: at91: fix pm_suspend.S compilation when ARMv6 is selected
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 19 Mar 2015 20:14:40 +0000 (21:14 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Sun, 5 Apr 2015 19:59:51 +0000 (21:59 +0200)
When compiling for multiplatform for both ARMv6 and ARMv7, the default compiler
flags are for ARMv6, and results in:

arch/arm/mach-at91/pm_suspend.S:144: Error: selected processor does not support ARM mode `dsb'

Enforce ARMv7 flags for pm_suspend.o when CPU_V7 is selected.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/Makefile

index ea54c9824d891bfbaeb1d71a719ebc15784f6f4d..12440ec60924612cf612f5cae7b111d43f9c9f61 100644 (file)
@@ -15,6 +15,9 @@ obj-$(CONFIG_SOC_SAMA5)               += sama5.o
 obj-$(CONFIG_PM)               += pm.o
 obj-$(CONFIG_PM)               += pm_suspend.o
 
+ifeq ($(CONFIG_CPU_V7),y)
+AFLAGS_pm_suspend.o := -march=armv7-a
+endif
 ifeq ($(CONFIG_PM_DEBUG),y)
 CFLAGS_pm.o += -DDEBUG
 endif