summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-06-21 21:14:33 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-26 14:53:36 +0200
commit0db3d6a247faf4d9761b9fc9019266b80bec4956 (patch)
treeac15a3eb54af77570a8cc834e575b2003c6c45a7
parent92455dad4d698520691c42a1b4d90f87e2f726ec (diff)
Fix PCRE build under non-__GNUC__ compilers
PCRE's JIT has several paths that end in a #error under compilers that don't #define __GNUC__. This is because either - those platforms were unavailable to PCRE devs so they were not tested; - the #ifdef guards inline assembly fragments in GCC (AT&T) syntax; - the #ifdef guards functions present f.i. in ARM's EABI and unavailable f.i. under WinCE. This commit disables PCRE's JIT under ARM and MIPS unless __GCC__ is defined. The MIPS #define from MSVC (_M_MRX000) is also dropped. Change-Id: I59f959c321413845ffbdf1ac32740b400422e0ee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
-rw-r--r--src/3rdparty/pcre/config.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/3rdparty/pcre/config.h b/src/3rdparty/pcre/config.h
index fede0dcbb0..6dda704f68 100644
--- a/src/3rdparty/pcre/config.h
+++ b/src/3rdparty/pcre/config.h
@@ -16,17 +16,19 @@
/*
man 3 pcrejit for a list of supported platforms;
as PCRE 8.30, stable JIT support is available for:
- - ARM v5, v7, and Thumb2
+ - ARM v5, v7, and Thumb2 (__GNUC__ compilers only)
- x86/x86-64
- - MIPS 32bit
+ - MIPS 32bit (__GNUC__ compilers only)
*/
#if \
/* ARM */ \
- defined(__arm__) || defined(__TARGET_ARCH_ARM) \
+ (defined(__GNUC__) && (defined(__arm__) || defined(__TARGET_ARCH_ARM))) \
/* x86 32/64 */ \
|| defined(__i386) || defined(__i386__) || defined(_M_IX86) \
|| defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) \
/* MIPS32 */ \
- || defined(__mips) || defined(__mips__) || defined(_M_MRX000) && !(defined(_MIPS_ARCH_MIPS64) || defined(__mips64))
+ || (defined(__GNUC__) \
+ && (defined(__mips) || defined(__mips__)) \
+ && !(defined(_MIPS_ARCH_MIPS64) || defined(__mips64)))
# define SUPPORT_JIT
#endif