--- /dev/null
+config PCRE_JIT_ENABLED
+ bool
+ depends on PACKAGE_libpcre && (arm || i386 || i686 || x86_64 || mips || mipsel || powerpc || sparc)
+ default y if (arm || i686 || x86_64)
+ prompt "Enable JIT compiler support"
+ help
+ Enable JIT (Just-In-Time) compiler support.
+
+ Enabling this option can give an about 10x performance increase on JIT operations. It can be desireable for e.g. high performance Apache mod_rewrite or HA-Proxy reqrep operations.
+
+ However, JIT should _only_ be enabled on architectures that are supported. Enabling JIT on unsupported platforms will result in a compilation failure. A list of supported architectures can be found here: https://pcre.org/original/doc/html/pcrejit.html#SEC3 .
PKG_NAME:=pcre
PKG_VERSION:=8.43
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_INSTALL:=1
-PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_libpcrecpp
+PKG_CONFIG_DEPENDS:=\
+ CONFIG_PACKAGE_libpcrecpp \
+ CONFIG_PCRE_JIT_ENABLED
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
URL:=https://www.pcre.org/
endef
+define Package/libpcre/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/libpcre
$(call Package/libpcre/default)
TITLE:=A Perl Compatible Regular Expression library
--enable-utf8 \
--enable-unicode-properties \
--enable-pcre16 \
+ $(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \
--with-match-limit-recursion=16000 \
$(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp