diff --git a/ChangeLog b/ChangeLog index 20d0899..a092e02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ read from files via the -f option. 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 ------------------------------ diff --git a/README b/README index 52859a9..66b756b 100644 --- a/README +++ b/README @@ -171,10 +171,12 @@ library. They are also documented in the pcre2build man page. 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 @@ -883,4 +885,4 @@ The distribution should contain the files listed below. Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 12 September 2017 +Last updated: 25 February 2018 diff --git a/configure.ac b/configure.ac index ae4ca15..5349257 100644 --- a/configure.ac +++ b/configure.ac @@ -142,6 +142,18 @@ AC_ARG_ENABLE(jit, 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, diff --git a/doc/pcre2build.3 b/doc/pcre2build.3 index 7586d22..0d34d23 100644 --- a/doc/pcre2build.3 +++ b/doc/pcre2build.3 @@ -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 @@ The following sections include descriptions of "on/off" options whose names 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,8 +157,15 @@ Just-in-time (JIT) compiler support is included in the build by specifying --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 @@ -582,6 +590,6 @@ Cambridge, England. .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