pcre2: Add JIT-support for select architectures in PCRE2

- This commit adds a config-option for JIT in libpcre2.

  According to research published on
  https://rust-leipzig.github.io/regex/2017/03/28/comparison-of-regex-engines/
  this should give a 10x performance increase on JIT operations
  which can be desireable for high performance Apache mod_rewrite
  or haproxy reqrep operations.

  This option is available on all officially supported architecutres
  which are listed on https://pcre.org/current/doc/html/pcre2jit.html#SEC2.
  Furthermore, it is enabled by default on the following
  architectures: arm, i686, x86_64.

Signed-off-by: Christian Lachner <gladiac@gmail.com>
This commit is contained in:
Christian Lachner
2019-11-26 16:16:17 +01:00
parent e1bb703a66
commit 21bee17652
2 changed files with 40 additions and 2 deletions
+10 -2
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=pcre2
PKG_VERSION:=10.32
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
@@ -25,6 +25,9 @@ PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:=\
CONFIG_PCRE2_JIT_ENABLED
include $(INCLUDE_DIR)/package.mk
define Package/libpcre2/default
@@ -33,6 +36,10 @@ define Package/libpcre2/default
URL:=https://www.pcre.org/
endef
define Package/libpcre2/config
source "$(SOURCE)/Config.in"
endef
define Package/libpcre2
$(call Package/libpcre2/default)
TITLE:=A Perl Compatible Regular Expression library
@@ -53,7 +60,8 @@ TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-pcre2-16 \
--enable-pcre2-32
--enable-pcre2-32 \
$(if $(CONFIG_PCRE2_JIT_ENABLED),--enable-jit,--disable-jit)
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"