From: Quanyang Wang <>

When using arm-linux-gnueabihf-gcc v9.2.0 to compile kernel, there will be
warning info as below:

cc1: warning: switch '-mcpu=cortex-a9' conflicts with '-march=armv7-a' switch

This is because that if "-march" and "-mcpu" options are passed to gcc together,
gcc will check if there is conflict between the two options unconsidering 
and "fpu" features. In gcc, the commit e319ca91f665 ("PR target/88799 Add +mp
and +sec extensions to ARMv7-a") add "mp" and "sec" features to "cortex-a9".
So the check will fail because the features in "cortex-a9" and "armv7-a" are no
longer the same.

Since suspend.S doesn't contain any "mp (Multiprocessing Extensions for v7-A
and v7-R architectures)" and "sec" (Security Extensions for v6K and v7-A
architectures) instruction, and "-march=armv7-a" has been defined in 
the "-mcpu=cortex-a9" is redudant here.

Signed-off-by: Quanyang Wang <>
 arch/arm/mach-zynq/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile
index 374207c87f96..dbb75be53deb 100644
--- a/arch/arm/mach-zynq/Makefile
+++ b/arch/arm/mach-zynq/Makefile
@@ -9,5 +9,4 @@ obj-y                           := common.o efuse.o slcr.o 
zynq_ocm.o pm.o
 obj-$(CONFIG_SMP)              += headsmp.o platsmp.o
 KBUILD_AFLAGS = $(subst -march=armv6k,,$(ORIG_AFLAGS))
-AFLAGS_suspend.o               +=-Wa,-march=armv7-a -mcpu=cortex-a9
 obj-$(CONFIG_SUSPEND)          += suspend.o

linux-yocto mailing list

Reply via email to