The following is causing compile errors for me because gcc 4.5 does not have the -Ofast option #if HAS_GCC(4, 5) && defined(__OPTIMIZE__) #define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops"))) #else #define fast_memcpy #endif It could be corrected if this is done instead #if HAS_GCC(4, 6) && defined(__OPTIMIZE__) #define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops"))) #if HAS_GCC(4, 5) && defined(__OPTIMIZE__) #define fast_memcpy __attribute__((target("inline-all-stringops"))) #else #define fast_memcpy #endif
Whoops the corrected code should actually be: #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
Created attachment 82249 [details] [review] patch that fixes the problem
commit a18f4ba9033cec3cc435c29878b12ceef1defc1f Author: Chris Wilson <chris@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@utoronto.ca> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Bah, missed the bugzilla tag.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.