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

Re: [Minios-devel] [UNIKRAFT PATCHv4 12/43] arch/arm: Check gcc version and set processor flags for arm32



Hi Simon,

I am composing the new version patch series, but I still have some
Concern about this patch.

> -----Original Message-----
> From: Wei Chen <Wei.Chen@xxxxxxx>
> Sent: 2018年7月6日 17:03
> To: minios-devel@xxxxxxxxxxxxxxxxxxxx; simon.kuenzer@xxxxxxxxx
> Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; Wei Chen <Wei.Chen@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: [Minios-devel] [UNIKRAFT PATCHv4 12/43] arch/arm: Check gcc version
> and set processor flags 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. As we have already defined a makefile function to do such
> task, so we can use this function for arm32 too.
> 
> Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
> ---
>  arch/arm/arm/Makefile.uk | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/arm/Makefile.uk b/arch/arm/arm/Makefile.uk
> index a84f2b8..a187946 100644
> --- a/arch/arm/arm/Makefile.uk
> +++ b/arch/arm/arm/Makefile.uk
> @@ -5,12 +5,15 @@ CFLAGS   += -marm -fms-extensions
>  CXXFLAGS += -D__ARM_32__
>  CXXFLAGS += -marm -fms-extensions
> 
> -#-march=armv7-a
> +# Set GCC flags for MARCH_ARM32_A20NEON. GCC supports -mcpu=cortex-a7 from
> 4.7
> +ifeq ($(CONFIG_MARCH_ARM32_A20NEON),y)
> +$(eval $(call set_flags_if_gcc_version_ge,4,7,-mcpu=cortex-a7 -mtune=cortex-
> a7 -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations))
> +endif
> 
> -CFLAGS-$(CONFIG_MARCH_ARM32_A20NEON)    += -mcpu=cortex-a7 -mtune=cortex-a7 -
> mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations
> -CXXFLAGS-$(CONFIG_MARCH_ARM32_A20NEON)  += -mcpu=cortex-a7 -mtune=cortex-a7 -
> mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations
> -CFLAGS-$(CONFIG_MARCH_ARM32_CORTEXA7)   += -mcpu=cortex-a7 -mtune=cortex-a7
> -CXXFLAGS-$(CONFIG_MARCH_ARM32_CORTEXA7) += -mcpu=cortex-a7 -mtune=cortex-a
> +# Set GCC flags for MARCH_ARM32_CORTEXA7. GCC supports -mcpu=cortex-a7 from
> 4.7
> +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA7),y)
> +$(eval $(call set_flags_for_valid_gcc,4,7,-mcpu=cortex-a7 -mtune=cortex-a7))
> +endif
> 

As these flags are processor optimize flags, if the GCC version doesn't match
the minimal version should we stop the building or just print a warning?

ifeq ($(CONFIG_MARCH_ARM32_CORTEXA7),y)
$(call error_if_gcc_version_lt,4,7) or $(call warn_if_gcc_version_lt,4,7)
CFLAGS-$(call gcc_version_ge,4,7)       += -mcpu=cortex-a7 -mtune=cortex-a7
CXXFLAGS-$(call gcc_version_ge,4,7)     += -mcpu=cortex-a7 -mtune=cortex-a7
endif



>  $(eval $(call addlib,libarmmath))
>  LIBARMMATH_SRCS-$(CONFIG_ARCH_ARM_32) += $(CONFIG_UK_BASE)/arch/arm/divsi3.S
> --
> 2.17.1

_______________________________________________
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®.