[dpdk-dev] x86_64-native-linuxapp-clang compilation broken?

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Feb 17 12:07:40 CET 2016


Hi,

> From: marc.sune at gmail.com [mailto:marc.sune at gmail.com] On Behalf Of
> Marc
> Sent: Tuesday, February 16, 2016 11:19 PM
> To: Matthew Hall
> Cc: De Lara Guarch, Pablo; Mcnamara, John; dev at dpdk.org
> Subject: Re: [dpdk-dev] x86_64-native-linuxapp-clang compilation broken?
> 
> 
> 
> On 16 February 2016 at 19:47, Matthew Hall <mhall at mhcomputing.net>
> wrote:
> On Tue, Feb 16, 2016 at 12:57:24PM +0000, De Lara Guarch, Pablo wrote:
> > We suspect this might be an architecture dependent issue.
> > Could you tell us which CPU you are using?
> >
> > Thanks,
> > Pablo
> 
> When it happens to me I am using a Skylake Core i7-6700K.
> 
> Broadwell qemu emulated.

From what I have seen, this issue happens on Broadwell/Haswell with clang versions < 3.7.

This what I see when using clang 3.6.2:

clang -Wp,-MD,./.eal.o.d.tmp -m64 -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE
-DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2

This is what I see with clang 3.7:

clang-3.7 -Wp,-MD,./.eal.o.d.tmp -m64 -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE
 -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3
 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES
 -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND
 -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,
 RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2,RTE_CPUFLAG_AES,
 RTE_CPUFLAG_PCLMULQDQ,RTE_CPUFLAG_AVX,RTE_CPUFLAG_RDRAND  

It looks like old versions of clang are not able to identify correctly the newer CPUs:

LLVM (http://llvm.org/):
  LLVM version 3.6.2

  Optimized build.
  Built Aug 18 2015 (08:39:18).
  Default target: x86_64-pc-linux-gnu
  Host CPU: x86-64 


LLVM (http://llvm.org/):
  LLVM version 3.7.0
  Optimized build.
  Built Jan 22 2016 (17:39:46).
  Default target: x86_64-redhat-linux-gnu
  Host CPU: broadwell

I will submit a patch adding a note in known issues section, unless anybody knows
how to fix this in our side (as far as I know, it is a clang issue).

Thanks,
Pablo

> 
> Marc
> 
> 
> Matthew.



More information about the dev mailing list