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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 15, 2016 at 12:07:42PM +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"
>    ^
> 
> v2: Use a pragma directive (Chris)
> 
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
> ---
>  tests/gem_exec_flush.c | 1 +
>  tests/gem_gtt_speed.c  | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
> index c81a977..b43d511 100644
> --- a/tests/gem_exec_flush.c
> +++ b/tests/gem_exec_flush.c
> @@ -41,6 +41,7 @@ IGT_TEST_DESCRIPTION("Basic check of flushing after batches");
>  #define MOVNT 512
>  
>  #if defined(__x86_64__)
> +#pragma GCC target ("sse4.1")

I jumped ahead and did
#pragma GCC push_options
#pragma GCC target ("sse4.1")
..
#pragma GCC pop_options

Compiling with gcc 4.2 or even older will be fixed whenever...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux