|
1
|
+From a414d4e24461da1cb4cef8ee910bc57bab360ceb Mon Sep 17 00:00:00 2001
|
|
2
|
+From: Adam Jackson <ajax@redhat.com>
|
|
3
|
+Date: Tue, 6 Mar 2018 12:07:46 -0500
|
|
4
|
+Subject: [PATCH] Fix build on i686
|
|
5
|
+
|
|
6
|
+Presumably this only matters for i686 because amd64 implies sse2, but:
|
|
7
|
+
|
|
8
|
+BUILDSTDERR: In file included from gen4_vertex.c:34:
|
|
9
|
+BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex':
|
|
10
|
+BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch
|
|
11
|
+BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y)
|
|
12
|
+BUILDSTDERR: ^~~~~~~~~~~~~~
|
|
13
|
+BUILDSTDERR: gen4_vertex.c:308:25: note: called from here
|
|
14
|
+BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */
|
|
15
|
+BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
16
|
+BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX'
|
|
17
|
+BUILDSTDERR: OUT_VERTEX(dstX, dstY);
|
|
18
|
+BUILDSTDERR: ^~~~~~~~~~
|
|
19
|
+
|
|
20
|
+The bug here appears to be that emit_vertex() is declared 'sse2' but
|
|
21
|
+vertex_emit_2s is merely always_inline. gcc8 decides that since you said
|
|
22
|
+always_inline you need to have explicitly cloned it for every
|
|
23
|
+permutation of targets. Merely saying inline seems to do the job of
|
|
24
|
+cloning vertex_emit_2s as much as necessary.
|
|
25
|
+
|
|
26
|
+So to reiterate: if you say always-inline, it won't, but if you just say
|
|
27
|
+maybe inline, it will. Thanks gcc, that's helpful.
|
|
28
|
+
|
|
29
|
+- ajax
|
|
30
|
+---
|
|
31
|
+ src/sna/compiler.h | 2 +-
|
|
32
|
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
33
|
+
|
|
34
|
+diff --git a/src/sna/compiler.h b/src/sna/compiler.h
|
|
35
|
+index 3c176a16..bc447c7a 100644
|
|
36
|
+--- a/src/sna/compiler.h
|
|
37
|
++++ b/src/sna/compiler.h
|
|
38
|
+@@ -32,7 +32,7 @@
|
|
39
|
+ #define likely(expr) (__builtin_expect (!!(expr), 1))
|
|
40
|
+ #define unlikely(expr) (__builtin_expect (!!(expr), 0))
|
|
41
|
+ #define noinline __attribute__((noinline))
|
|
42
|
+-#define force_inline inline __attribute__((always_inline))
|
|
43
|
++#define force_inline inline
|
|
44
|
+ #define fastcall __attribute__((regparm(3)))
|
|
45
|
+ #define must_check __attribute__((warn_unused_result))
|
|
46
|
+ #define constant __attribute__((const))
|
|
47
|
+--
|
|
48
|
+2.16.2
|
|
49
|
+
|