All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] php: fix how PCRE JIT is disabled
@ 2018-04-06  8:54 Thomas Petazzoni
  2018-04-06 19:31 ` Thomas Petazzoni
  2018-04-08 19:44 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-04-06  8:54 UTC (permalink / raw)
  To: buildroot

When the internal PCRE library of PHP is used, it tries to use a JIT
engine, which is only available on some architectures.

However, the mechanism used to disable JIT has changed in recent PHP
versions, and it now has a proper --without-pcre-jit option. Switch
over to that to properly disable JIT on unsupported platforms.

It has been tested to fix the build of PHP on ARC and Microblaze.

Fixes:

  http://autobuild.buildroot.net/results/e1359fcad7bc57e3c5a7ecc37abaa2cf6a6a9ffa/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/php/php.mk | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/package/php/php.mk b/package/php/php.mk
index bfd25de875..91756794ee 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -228,10 +228,6 @@ ifneq ($(BR2_PACKAGE_PHP_EXT_MYSQLI)$(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),)
 PHP_CONF_OPTS += --with-mysql-sock=$(MYSQL_SOCKET)
 endif
 
-define PHP_DISABLE_PCRE_JIT
-	$(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h
-endef
-
 define PHP_DISABLE_VALGRIND
 	$(SED) '/^#define HAVE_VALGRIND/d' $(@D)/main/php_config.h
 endef
@@ -249,8 +245,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
 PHP_CFLAGS += -DSLJIT_SINGLE_THREADED=1
 endif
 # check ext/pcre/pcrelib/sljit/sljitConfigInternal.h for supported archs
-ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),)
-PHP_POST_CONFIGURE_HOOKS += PHP_DISABLE_PCRE_JIT
+ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),y)
+PHP_CONF_OPTS += --with-pcre-jit
+else
+PHP_CONF_OPTS += --without-pcre-jit
 endif
 endif
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] php: fix how PCRE JIT is disabled
  2018-04-06  8:54 [Buildroot] [PATCH] php: fix how PCRE JIT is disabled Thomas Petazzoni
@ 2018-04-06 19:31 ` Thomas Petazzoni
  2018-04-08 19:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-04-06 19:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  6 Apr 2018 10:54:03 +0200, Thomas Petazzoni wrote:
> When the internal PCRE library of PHP is used, it tries to use a JIT
> engine, which is only available on some architectures.
> 
> However, the mechanism used to disable JIT has changed in recent PHP
> versions, and it now has a proper --without-pcre-jit option. Switch
> over to that to properly disable JIT on unsupported platforms.
> 
> It has been tested to fix the build of PHP on ARC and Microblaze.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/e1359fcad7bc57e3c5a7ecc37abaa2cf6a6a9ffa/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/php/php.mk | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] php: fix how PCRE JIT is disabled
  2018-04-06  8:54 [Buildroot] [PATCH] php: fix how PCRE JIT is disabled Thomas Petazzoni
  2018-04-06 19:31 ` Thomas Petazzoni
@ 2018-04-08 19:44 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-04-08 19:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > When the internal PCRE library of PHP is used, it tries to use a JIT
 > engine, which is only available on some architectures.

 > However, the mechanism used to disable JIT has changed in recent PHP
 > versions, and it now has a proper --without-pcre-jit option. Switch
 > over to that to properly disable JIT on unsupported platforms.

 > It has been tested to fix the build of PHP on ARC and Microblaze.

 > Fixes:

 >   http://autobuild.buildroot.net/results/e1359fcad7bc57e3c5a7ecc37abaa2cf6a6a9ffa/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2018.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-08 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06  8:54 [Buildroot] [PATCH] php: fix how PCRE JIT is disabled Thomas Petazzoni
2018-04-06 19:31 ` Thomas Petazzoni
2018-04-08 19:44 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.