From: Chengwen Feng Date: Fri, 21 May 2021 03:33:54 +0000 (+0800) Subject: config/arm: check SVE CPU flag X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3c1199c2db62c25480e7af64bf799e287377bfe8;p=dpdk.git config/arm: check SVE CPU flag If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary could not run on non-SVE platform else it will encounter illegal instruction [1]. This patch fixes it by adding 'RTE_CPUFLAG_SVE' to compile_time_cpuflags, so that rte_cpu_is_supported() will print meaningful log under above situation. [1] http://mails.dpdk.org/archives/dev/2021-May/209124.html Signed-off-by: Chengwen Feng Acked-by: Ruifeng Wang --- diff --git a/config/arm/meson.build b/config/arm/meson.build index e83a56e0d5..9b147c0b93 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -480,6 +480,10 @@ if (cc.get_define('__ARM_NEON', args: machine_args) != '' or compile_time_cpuflags += ['RTE_CPUFLAG_NEON'] endif +if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != '' + compile_time_cpuflags += ['RTE_CPUFLAG_SVE'] +endif + if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != '' compile_time_cpuflags += ['RTE_CPUFLAG_CRC32'] endif