From: Anatol Belski Date: Tue, 16 Jan 2018 10:55:19 +0000 (+0100) Subject: The cpu setup is still needed when ifunc is supported X-Git-Tag: php-7.3.0alpha1~615 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74de5461eb97536ef774fb61ce373d2edbe8d82a;p=php The cpu setup is still needed when ifunc is supported --- diff --git a/Zend/zend.c b/Zend/zend.c index effc95deb2..ba84f84def 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -753,7 +753,9 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) / extern zend_php_scanner_globals language_scanner_globals; #endif +#ifndef HAVE_FUNC_ATTRIBUTE_IFUNC zend_cpu_startup(); +#endif #ifdef ZEND_WIN32 php_win32_cp_set_by_id(65001); diff --git a/Zend/zend_cpuinfo.c b/Zend/zend_cpuinfo.c index ce92460fb4..2b087afaef 100644 --- a/Zend/zend_cpuinfo.c +++ b/Zend/zend_cpuinfo.c @@ -68,6 +68,10 @@ void zend_cpu_startup(void) } ZEND_API int zend_cpu_supports(zend_cpu_feature feature) { +#ifdef HAVE_FUNC_ATTRIBUTE_IFUNC + /* The resolver is invoked before zend_startup(). */ + zend_cpu_startup(); +#endif if (feature & ZEND_CPU_EDX_MASK) { return (cpuinfo.edx & (feature & ~ZEND_CPU_EDX_MASK)); } else {