aboutsummaryrefslogtreecommitdiffstats
path: root/main/xf86-video-intel/gcc5-workaround.patch
blob: dd832546e4f68b280fcaabb84a2b02f464595aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- ./src/sna/compiler.h.orig
+++ ./src/sna/compiler.h
@@ -65,16 +65,14 @@
 #define avx2 __attribute__((target("avx2,sse4.2,sse2,fpmath=sse")))
 #endif
 
-#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
+#if HAS_GCC(4, 6) && !HAS_GCC(5,0) && defined(__OPTIMIZE__)
 #define fast __attribute__((optimize("Ofast")))
 #else
 #define fast
 #endif
 
-#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
-#define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops")))
-#elif HAS_GCC(4, 5) && defined(__OPTIMIZE__)
-#define fast_memcpy __attribute__((target("inline-all-stringops")))
+#if HAS_GCC(4, 5) && defined(__OPTIMIZE__)
+#define fast_memcpy fast __attribute__((target("inline-all-stringops")))
 #else
 #define fast_memcpy
 #endif