Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #76825: Undefined symbols ___cpuid_count #3639

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Contributor

@cmb69 cmb69 commented Oct 27, 2018

Apparently, the presence of cpuid.h is not necessarily sufficient to
guarantee the availability of __cpuid_count(). We therefore test for
the latter explicitly.

Apparently, the presence of `cpuid.h` is not necessarily sufficient to
guarantee the availability of `__cpuid_count()`.  We therefore test for
the latter explicitly.
@petk petk added the Bug label Oct 27, 2018
@cmb69
Copy link
Contributor Author

cmb69 commented Oct 27, 2018

The test failure is unrelated to this patch.

@cmb69
Copy link
Contributor Author

cmb69 commented Oct 28, 2018

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.

@nikic
Copy link
Member

nikic commented Oct 29, 2018

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);
]])], [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@weltling
Copy link
Contributor

The PR looks fine, as for me. The header check might be excessive, but doesn't hurt, too.

Thanks.

@php-pulls
Copy link

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).

@php-pulls php-pulls closed this Nov 5, 2018
@cmb69 cmb69 deleted the bug-76825 branch November 5, 2018 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants