xf86-video-intel: src/sna/compiler.h

Chris Wilson ickle at kemper.freedesktop.org
Wed Jul 10 04:06:29 PDT 2013


 src/sna/compiler.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a18f4ba9033cec3cc435c29878b12ceef1defc1f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jul 10 11:56:50 2013 +0100

    sna: Ofast was introduced with gcc-4.6
    
    Thomas Jones reported that the build was failing with gcc-4.5 due to the
    memcpy routines requesting an unsupported optimisation mode (-Ofast) and
    supplied this patch to only enable Ofast for gcc-4.6+
    
    Reported-by: Thomas Jones <thomas.jones at utoronto.ca>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/compiler.h b/src/sna/compiler.h
index 641b490..9c1b2f1 100644
--- a/src/sna/compiler.h
+++ b/src/sna/compiler.h
@@ -65,8 +65,10 @@
 #define avx2 __attribute__((target("avx2,sse4.2,sse2,fpmath=sse")))
 #endif
 
-#if HAS_GCC(4, 5) && defined(__OPTIMIZE__)
+#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")))
 #else
 #define fast_memcpy
 #endif


More information about the xorg-commit mailing list