From 4475b3babc09f816a51c61acae30b2d61bfb5e71 Mon Sep 17 00:00:00 2001 From: Jan Viktorin Date: Sat, 19 Mar 2016 20:58:03 +0100 Subject: [PATCH] mk: improve ARM NEON detection The __ARM_NEON declares that the arm_neon.h is available which is not always true for the __ARM_NEON_FP. $ arm-linux-gnueabi-gcc -dM -E - < /dev/null | grep "_FP\|_NEON" #define __ARM_FP 12 #define __ARM_NEON_FP 4 #define __VFP_FP__ 1 $ arm-linux-gnueabi-gcc -mfpu=neon -dM -E - < /dev/null | grep "_FP\|_NEON" #define __ARM_FP 12 #define __ARM_NEON_FP 4 #define __ARM_NEON__ 1 #define __VFP_FP__ 1 #define __ARM_NEON 1 $ aarch64-linux-gnu-gcc -dM -E - < /dev/null | grep "NEON\|FP" #define __FP_FAST_FMAF 1 #define __ARM_NEON 1 #define __FP_FAST_FMA 1 $ aarch64-thunderx-linux-gnu-gcc -dM -E - < /dev/null |grep "NEON\|FP" #define __ARM_FP 12 #define __ARM_NEON_FP 12 #define __FP_FAST_FMAF 1 #define __ARM_NEON 1 #define __FP_FAST_FMA 1 Signed-off-by: Jan Viktorin Acked-by: Jerin Jacob --- mk/rte.cpuflags.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index c494654271..e634abc38c 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -111,7 +111,7 @@ CPUFLAGS += VSX endif # ARM flags -ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_NEON_FP),) +ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_NEON),) CPUFLAGS += NEON endif -- 2.20.1