From 0db3d6a247faf4d9761b9fc9019266b80bec4956 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 21 Jun 2012 21:14:33 +0200 Subject: Fix PCRE build under non-__GNUC__ compilers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Björn Breitmeyer Reviewed-by: Giuseppe D'Angelo Reviewed-by: Andreas Holzammer --- src/3rdparty/pcre/config.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/3rdparty/pcre') 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 -- cgit v1.2.3