[Intel-gfx] [PATCH i-g-t] tests: Fix compilation when some gcc configurations
Chris Wilson
chris at chris-wilson.co.uk
Fri Jul 15 11:35:36 UTC 2016
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 at chris-wilson.co.uk>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
> 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
More information about the Intel-gfx
mailing list