mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix bundled libpcre2 build regarding the -fcf-protection
gcc flag
Cf. <https://bugs.exim.org/show_bug.cgi?id=2578>.
This commit is contained in:
parent
33069575d5
commit
f3ea88bff7
1 changed files with 21 additions and 3 deletions
|
@ -68,9 +68,6 @@ else
|
|||
pcre2lib/pcre2_tables.c pcre2lib/pcre2_ucd.c pcre2lib/pcre2_valid_utf.c pcre2lib/pcre2_xclass.c \
|
||||
pcre2lib/pcre2_find_bracket.c pcre2lib/pcre2_convert.c pcre2lib/pcre2_extuni.c pcre2lib/pcre2_script_run.c"
|
||||
PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/pcre2lib)
|
||||
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcre2lib/])
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
|
||||
AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ])
|
||||
|
||||
|
@ -78,10 +75,31 @@ else
|
|||
if test "$PHP_PCRE_JIT" != "no"; then
|
||||
AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ])
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
AC_CACHE_CHECK([whether Intel CET is enabled], ac_cv_have_pcre2_intel_cet, [
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
#ifndef __CET__
|
||||
# error CET is not enabled
|
||||
#endif
|
||||
]])], [
|
||||
ac_cv_have_pcre2_intel_cet=yes
|
||||
], [
|
||||
ac_cv_have_pcre2_intel_cet=no
|
||||
])
|
||||
if test "$ac_cv_have_pcre2_intel_cet" = yes; then
|
||||
PHP_PCRE_CFLAGS="-mshstk $PHP_PCRE_CFLAGS"
|
||||
fi
|
||||
])
|
||||
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/pcre2lib)
|
||||
PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcre2lib/])
|
||||
|
||||
if test "$PHP_VALGRIND" != "no" && test "$have_valgrind" = "yes"; then
|
||||
dnl Enable pcre valgrind support only in DEBUG build (it affects performance)
|
||||
if test "$ZEND_DEBUG" = "yes"; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue