[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 9/9] build: Check the minimum GCC version for arm32



Similar to ARM64, the optimization processor flags have the minimum
gcc version requirement. So we still need to check the GCC version
for arm32.

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
 arch/arm/Makefile.uk | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Makefile.uk b/arch/arm/Makefile.uk
index 03e809f..18d5748 100644
--- a/arch/arm/Makefile.uk
+++ b/arch/arm/Makefile.uk
@@ -6,8 +6,13 @@
 # $(4): The minimum GCC minor number for target CPU
 define set_cc_flags =
 $(call check_valid_gcc_version,$(3),$(4),$(2))
+ifeq ($(UK_ARCH),arm)
+CFLAGS-y   += -mcpu=$(2) -mtune=$(2)
+CXXFLAGS-y += -mcpu=$(2) -mtune=$(2)
+else
 CFLAGS-y   += -march=$(1) -mcpu=$(2) -mtune=$(2)
 CXXFLAGS-y += -march=$(1) -mcpu=$(2) -mtune=$(2)
+endif
 endef
 
 # Setup compiler flags and objects for arm32
@@ -22,10 +27,15 @@ CXXFLAGS += -marm -fms-extensions
 
 #-march=armv7-a
 
-CFLAGS-$(MARCH_A20NEON)    += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 
-mfpu=neon-vfpv4 -funsafe-math-optimizations
-CXXFLAGS-$(MARCH_A20NEON)  += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 
-mfpu=neon-vfpv4 -funsafe-math-optimizations
-CFLAGS-$(MARCH_CORTEXA7)   += -mcpu=cortex-a7 -mtune=cortex-a7
-CXXFLAGS-$(MARCH_CORTEXA7) += -mcpu=cortex-a7 -mtune=cortex-a
+ifeq ($(MARCH_A20NEON),y)
+$(eval $(call set_cc_flags,armv7-a,cortex-a7,4,7))
+CFLAGS-y    += -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations
+CXXFLAGS-y  += -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations
+endif
+
+ifeq ($(MARCH_CORTEXA7),y)
+$(eval $(call set_cc_flags,armv7-a,cortex-a7,4,7))
+endif
 
 $(eval $(call addlib,libarmmath))
 LIBARMMATH_SRCS-y += $(UK_BASE)/arch/arm/arm32/divsi3.S
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.