From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] libpcre: enable JIT
Date: Wed, 27 Feb 2019 18:33:55 +0000 [thread overview]
Message-ID: <20190227183355.19346-2-ross.burton@intel.com> (raw)
In-Reply-To: <20190227183355.19346-1-ross.burton@intel.com>
PCRE has an optional JIT for performance.
Add a PACKAGECONFIG for this, enabled by default.
Also add a patch so that auto-detection of JIT availablity, which is required to
enable the JIT by default, works with out-of-tree builds.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../libpcre/libpcre/out-of-tree.patch | 26 ++++++++++++++++++++++
meta/recipes-support/libpcre/libpcre_8.43.bb | 4 +++-
2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/libpcre/libpcre/out-of-tree.patch
diff --git a/meta/recipes-support/libpcre/libpcre/out-of-tree.patch b/meta/recipes-support/libpcre/libpcre/out-of-tree.patch
new file mode 100644
index 00000000000..687dcc034da
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/out-of-tree.patch
@@ -0,0 +1,26 @@
+In out-of-tree builds the #include fails because $srcdir isn't in the include path. Set CPPFLAGS so that it is.
+
+Upstream-Status: Submitted [https://bugs.exim.org/show_bug.cgi?id=2379]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: configure.ac
+===================================================================
+--- a/configure.ac (revision 1749)
++++ b/configure.ac (working copy)
+@@ -159,6 +159,8 @@
+
+ if test "$enable_jit" = "auto"; then
+ AC_LANG(C)
++ SAVE_CPPFLAGS=$CPPFLAGS
++ CPPFLAGS=-I$srcdir
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #define SLJIT_CONFIG_AUTO 1
+ #include "sljit/sljitConfigInternal.h"
+@@ -165,6 +167,7 @@
+ #if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+ #error unsupported
+ #endif]])], enable_jit=yes, enable_jit=no)
++ CPPFLAGS=$SAVE_CPPFLAGS
+ fi
+
+ # Handle --disable-pcregrep-jit (enabled by default)
diff --git a/meta/recipes-support/libpcre/libpcre_8.43.bb b/meta/recipes-support/libpcre/libpcre_8.43.bb
index e28615a8ba7..08314efb9e4 100644
--- a/meta/recipes-support/libpcre/libpcre_8.43.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.43.bb
@@ -9,6 +9,7 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENCE;md5=91bee59d1b327eb1599b4c673e2fb3d1"
SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
file://fix-pcre-name-collision.patch \
+ file://out-of-tree.patch \
file://run-ptest \
file://Makefile \
"
@@ -23,13 +24,14 @@ S = "${WORKDIR}/pcre-${PV}"
PROVIDES += "pcre"
DEPENDS += "bzip2 zlib"
-PACKAGECONFIG ??= "pcre8 unicode-properties"
+PACKAGECONFIG ??= "pcre8 unicode-properties jit"
PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
+PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit"
BINCONFIG = "${bindir}/pcre-config"
--
2.11.0
prev parent reply other threads:[~2019-02-27 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 18:33 [PATCH 1/2] libpcre: recipe cleanup Ross Burton
2019-02-27 18:33 ` Ross Burton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190227183355.19346-2-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox