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

Damien Lespiau damien.lespiau at intel.com
Fri Jul 15 11:09:18 UTC 2016


On Thu, Jul 14, 2016 at 06:48:26PM +0100, Chris Wilson wrote:
> 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?

Yup, that also seems to enable sse4.1 for the rest of the compilation
unit.

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

Couldn't find in less than 5 mins this information, gave up. Someone
exhibiting the problem will have to fix it :)

-- 
Damien


More information about the Intel-gfx mailing list