Blame SOURCES/0001-Fix-build-on-i686.patch

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