Revision: 922
http://www.exim.org/viewvc/pcre2?view=rev&revision=922
Author: ph10
Date: 2018-02-25 18:00:29 +0000 (Sun, 25 Feb 2018)
Log Message:
-----------
Add --enable-jit=auto support.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/README
code/trunk/configure.ac
code/trunk/doc/pcre2build.3
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2018-02-25 12:12:48 UTC (rev 921)
+++ code/trunk/ChangeLog 2018-02-25 18:00:29 UTC (rev 922)
@@ -30,7 +30,9 @@
6. A small fix to pcre2grep to avoid compiler warnings for -Wformat-overflow=2.
+7. Added --enable-jit=auto support to configure.ac.
+
Version 10.31 12-February-2018
------------------------------
Modified: code/trunk/README
===================================================================
--- code/trunk/README 2018-02-25 12:12:48 UTC (rev 921)
+++ code/trunk/README 2018-02-25 18:00:29 UTC (rev 922)
@@ -171,11 +171,13 @@
give large performance improvements on certain platforms, add --enable-jit to
the "configure" command. This support is available only for certain hardware
architectures. If you try to enable it on an unsupported architecture, there
- will be a compile time error. If you are running under SELinux you may also
- want to add --enable-jit-sealloc, which enables the use of an execmem
- allocator in JIT that is compatible with SELinux. This has no effect if JIT
- is not enabled.
+ will be a compile time error. If in doubt, use --enable-jit=auto, which
+ enables JIT only if the current hardware is supported.
+. If you are enabling JIT under SELinux you may also want to add
+ --enable-jit-sealloc, which enables the use of an execmem allocator in JIT
+ that is compatible with SELinux. This has no effect if JIT is not enabled.
+
. If you do not want to make use of the default support for UTF-8 Unicode
character strings in the 8-bit library, UTF-16 Unicode character strings in
the 16-bit library, or UTF-32 Unicode character strings in the 32-bit
@@ -883,4 +885,4 @@
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 12 September 2017
+Last updated: 25 February 2018
Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac 2018-02-25 12:12:48 UTC (rev 921)
+++ code/trunk/configure.ac 2018-02-25 18:00:29 UTC (rev 922)
@@ -142,6 +142,18 @@
AS_HELP_STRING([--enable-jit],
[enable Just-In-Time compiling support]),
, enable_jit=no)
+
+# This code enables JIT if the hardware supports it.
+if test "$enable_jit" = "auto"; then
+ AC_LANG(C)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #define SLJIT_CONFIG_AUTO 1
+ #include "src/sljit/sljitConfigInternal.h"
+ #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+ #error unsupported
+ #endif]])], enable_jit=yes, enable_jit=no)
+ echo checking for JIT support on this hardware... $enable_jit
+fi
# Handle --enable-jit-sealloc (disabled by default)
AC_ARG_ENABLE(jit-sealloc,
Modified: code/trunk/doc/pcre2build.3
===================================================================
--- code/trunk/doc/pcre2build.3 2018-02-25 12:12:48 UTC (rev 921)
+++ code/trunk/doc/pcre2build.3 2018-02-25 18:00:29 UTC (rev 922)
@@ -1,4 +1,4 @@
-.TH PCRE2BUILD 3 "18 July 2017" "PCRE2 10.30"
+.TH PCRE2BUILD 3 "25 February 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.
@@ -59,7 +59,8 @@
begin with --enable or --disable. Because of the way that \fBconfigure\fP
works, --enable and --disable always come in pairs, so the complementary option
always exists as well, but as it specifies the default, it is not described.
-Options that specify values have names that start with --with.
+Options that specify values have names that start with --with. At the end of a
+\fBconfigure\fP run, a summary of the configuration is output.
.
.
.SH "BUILDING 8-BIT, 16-BIT AND 32-BIT LIBRARIES"
@@ -156,9 +157,16 @@
--enable-jit
.sp
This support is available only for certain hardware architectures. If this
-option is set for an unsupported architecture, a building error occurs. If you
-are running under SELinux you may also want to add
+option is set for an unsupported architecture, a building error occurs.
+If in doubt, use
.sp
+ --enable-jit=auto
+.sp
+which enables JIT only if the current hardware is supported. You can check
+if JIT is enabled in the configuration summary that is output at the end of a
+\fBconfigure\fP run. If you are enabling JIT under SELinux you may also want to
+add
+.sp
--enable-jit-sealloc
.sp
which enables the use of an execmem allocator in JIT that is compatible with
@@ -582,6 +590,6 @@
.rs
.sp
.nf
-Last updated: 18 July 2017
-Copyright (c) 1997-2017 University of Cambridge.
+Last updated: 25 February 2018
+Copyright (c) 1997-2018 University of Cambridge.
.fi