php: update fix for opcache link issue in 7.4.4

The source of the issue is the update for PHP 7.4 support in
0001-opcache-config.m4-enable-opcache.patch (commit 7cc7a9ec).  Instead
of working around the issue in the recipe file, update the patch to
restore the call to PHP_ADD_LIBRARY().

Signed-off-by: Claude Bing <cbing@cybernetics.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 3cfd16be4e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Claude Bing
2020-05-08 15:52:46 -04:00
committed by Armin Kuster
parent 5c91e3aa46
commit a6c9ad397b
2 changed files with 13 additions and 11 deletions
@@ -110,11 +110,6 @@ export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
# link against librt (libc) if opcache is specified in order to avoid the
# following error:
# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink
LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }"
# Adding these flags enables dynamic library support, which is disabled by
# default when cross compiling
# See https://bugs.php.net/bug.php?id=60109