Fix #76825: Undefined symbols ___cpuid_count#3639
Conversation
Apparently, the presence of `cpuid.h` is not necessarily sufficient to guarantee the availability of `__cpuid_count()`. We therefore test for the latter explicitly.
|
The test failure is unrelated to this patch. |
|
I would appreciate if someone more accustomed to autoconf could review this pull request. Particularly, I wonder whether we should drop the check for cpuid.h which has been introduced in an earlier attempt to fix bug 76825. |
|
I don't know much about autoconf, but I'm pretty sure you can drop the check for the header :) |
| ]], [[ | ||
| unsigned eax, ebx, ecx, edx; | ||
| __cpuid_count(0, 0, eax, ebx, ecx, edx); | ||
| ]])], [ |
There was a problem hiding this comment.
The double [ and ] might not be needed for the program body. See https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Quotation-Rule-Of-Thumb.html, but otherwise is fine, too.
There was a problem hiding this comment.
Hmm, the examples in the AC_LANG_PROGRAM docs as well as the already existing occurrences of AC_LANG_PROGRAM in Zend.m4 use double quotes for the first two arguments.
|
The PR looks fine, as for me. The header check might be excessive, but doesn't hurt, too. Thanks. |
|
Comment on behalf of cmb at php.net: Applied as 7625f97. I've committed the patch as is, so that we have at least some fix in 7.3.0RC5. We could still improve (at least for master). |
Apparently, the presence of
cpuid.his not necessarily sufficient toguarantee the availability of
__cpuid_count(). We therefore test forthe latter explicitly.