mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-28 21:11:41 -09:00
php: add opcache option
Add a Zend OPcache option and tweak the build system into being cross-compile friendly. The OPcache extension allows for a neat intermediate bytecode cache in memory to avoid reinterpreting/recompiling php scripts on multiple runs. Make it an option since this takes up valuable RAM. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
4959dabe7d
commit
e054764917
@@ -38,6 +38,19 @@ PHP_CONFIG_SCRIPTS = php-config
|
||||
|
||||
PHP_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
# The OPcache extension isn't cross-compile friendly
|
||||
# Throw some defines here to avoid patching heavily
|
||||
ifeq ($(BR2_PACKAGE_PHP_EXT_OPCACHE),y)
|
||||
PHP_CONF_OPTS += --enable-opcache
|
||||
PHP_CONF_ENV += ac_cv_func_mprotect=yes
|
||||
PHP_CFLAGS += \
|
||||
-DHAVE_SHM_IPC \
|
||||
-DHAVE_SHM_MMAP_ANON \
|
||||
-DHAVE_SHM_MMAP_ZERO \
|
||||
-DHAVE_SHM_MMAP_POSIX \
|
||||
-DHAVE_SHM_MMAP_FILE
|
||||
endif
|
||||
|
||||
# We need to force dl "detection"
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
PHP_CONF_ENV += ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes
|
||||
|
||||
Reference in New Issue
Block a user