From 946e0515bbae993f3ee091c848fdae2bda51e97a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 9 Apr 2015 01:38:43 +0000 Subject: Work around GCC < 4.2 bug that causes compile failure git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2455 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pm_config.in.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pm_config.in.h') diff --git a/pm_config.in.h b/pm_config.in.h index c64fc093..9d0dc303 100644 --- a/pm_config.in.h +++ b/pm_config.in.h @@ -240,6 +240,20 @@ #endif #endif +#ifndef HAVE_WORKING_SSE2 +#if defined(__SSE2__) && ( GCCVERSION >=402 || defined(__clang__) ) + #define HAVE_WORKING_SSE2 1 + /* We can use SSE2 builtin functions to exploit SSE2 instructions. GCC + version 4.2 or newer is required; older GCC ostensibly has these SSE2 + builtins, but the compiler aborts with an error. Note that __SSE2__ + means not only that the compiler has the capability, but that the user + has not disabled it via compiler options. + */ +#else + #define HAVE_WORKING_SSE2 0 +#endif +#endif + /* UNALIGNED_OK means it's OK to do unaligned memory access, e.g. loading an 8-byte word from an address that is not a multiple of 8. On some systems, such an access causes a trap and a signal. -- cgit 1.4.1