[Intel-gfx] [PATCH i-g-t] tests: Fix compilation when some gcc configurations

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 14 17:48:26 UTC 2016


On Thu, Jul 14, 2016 at 06:44:59PM +0100, Chris Wilson wrote:
> On Thu, Jul 14, 2016 at 06:31:37PM +0100, Damien Lespiau wrote:
> > Depending how the gcc was compiled it may be necessary to enable SSE4
> > instructions explicitly. Otherwise:
> > 
> >   CC       gem_gtt_speed.o
> > In file included from gem_gtt_speed.c:54:0:
> > /usr/lib/gcc/x86_64-linux-gnu/4.8/include/smmintrin.h:31:3: error: #error "SSE4.1 instruction set not enabled"
> >  # error "SSE4.1 instruction set not enabled"
> 
> So the challenge is getting the function attribute applied to the
> include.
> 
> Ah, can you try
> #pragma GCC target ("sse4.1")
> in those blocks instead?

Oh, and we probably need an #if GCC > 4.y to be fully backwards
compatible.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list