lib/eal/arm/include/rte_vect.h fails to compile with clang14 for 32bit ARM

Wathsala Wathawana Vithanage wathsala.vithanage at arm.com
Wed Dec 4 16:38:01 CET 2024


> 
> clang14 does appear to support the vcopyq_laneq_u32() intrinsic, s0 we want
> to skip the conditional implementation.
> 
> Two approaches I have tested to resolve the error are:
> 
> 1) skip if building with clang:
> 
> 
> 	#if !defined(__clang__) && ((defined(RTE_ARCH_ARM) &&
> defined(RTE_ARCH_32)) || \
> 	72 (defined(RTE_ARCH_ARM64) && RTE_CC_IS_GNU &&
> (GCC_VERSION < 70000)))

Use RTE_CC_CLANG instead of __clang__

> 
> 2) skip if not building for ARMv7:
> 
> 
> 
> 
> 	#if (defined(RTE_ARCH_ARMv7) && defined(RTE_ARCH_32)) || \
> 	(defined(RTE_ARCH_ARM64) && RTE_CC_IS_GNU && (GCC_VERSION
> < 70000))
> 
> 
> 
> Both address our immediate problem, but may not be a appropriate for all
> cases.
> 
> Can anyone suggest the proper way to address this?  I'll be submitting an
> patch once I have a solution that is acceptable to the community.

I prefer skipping for clang (option 1)

--wathsala



More information about the dev mailing list