[dpdk-dev] [PATCH v4 00/10] Fix build errors related to exported headers

Adrien Mazarguil adrien.mazarguil at 6wind.com
Thu Sep 8 14:39:53 CEST 2016


On Tue, Aug 23, 2016 at 06:36:57PM +0200, Thomas Monjalon wrote:
> After rebasing the patchset, the compilation of each patch seems good.
> But the new checks fail with clang:
> 	rte_memcpy.h:814:2: error:
> 		implicit declaration of function '_mm_alignr_epi8' is invalid in C99

This is an unfortunate false positive. mmintrin.h and other x86 intrinsics
headers files define their macros and types only if compiled with the right
-march or CPU flags options. check-includes.sh does not provide any of
those and relies on whatever the C compiler falls back to by default.

The problem is actually that we haven't implemented any fallback in DPDK for
such cases. In the meantime it can be worked around like this:

 EXTRA_CFLAGS=-march=core2 EXTRA_CXXFLAGS=-march=core2 ./scripts/check-includes.sh

> Other comments about the script:
> - it is too long (can it be parallelized?)
> - it does not stop printing errors after the first one

Addressing these concerns would require a complete redesign of that script
as a Makefile, and even then it would most likely end up taking too long
when there are no errors (all headers end up being checked).

I've removed it from test-build.sh, people will have to run it manually like
check-git-log.sh, updated v5 accordingly.

-- 
Adrien Mazarguil
6WIND


More information about the dev mailing list