[linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 1/2] arm: zynq: delete AFLAGS_suspend.o to fix compile warning

quanyang.wang at windriver.com quanyang.wang at windriver.com
Tue Oct 8 19:38:19 PDT 2019


From: Quanyang Wang <quanyang.wang at windriver.com>

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 "quirk"
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 arch/arm/Makefile,
the "-mcpu=cortex-a9" is redudant here.

Signed-off-by: Quanyang Wang <quanyang.wang at windriver.com>
---
 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
 ORIG_AFLAGS := $(KBUILD_AFLAGS)
 KBUILD_AFLAGS = $(subst -march=armv6k,,$(ORIG_AFLAGS))
-AFLAGS_suspend.o 		+=-Wa,-march=armv7-a -mcpu=cortex-a9
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-- 
2.17.1



More information about the linux-yocto mailing list