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

ENH: Detect CPU features on FreeBSD/powerpc64* #22967

Merged
merged 1 commit into from Jan 9, 2023

Conversation

charris
Copy link
Member

@charris charris commented Jan 8, 2023

Backport of #22777.

  1. FreeBSD uses elf_aux_info() instead of getauxval.
  2. Switch to using compiler macros for detecting POWER platform FreeBSD sets the machine name (what uname -m prints) on all powerpc* to just powerpc. To identify actual architecture, uname -p should be used, but this is not present in uname() function. Thus, the only way to correctly detect platform is to use what uname prints and also check compiler defines.

1. FreeBSD uses elf_aux_info() instead of getauxval.
2. Switch to using compiler macros for detecting POWER platform
FreeBSD sets the machine name (what uname -m prints) on all powerpc* to
just powerpc. To identify actual architecture, uname -p should be used,
but this is not present in uname() function. Thus, the only way to
correctly detect platform is to use what uname prints and also check
compiler defines.
@charris charris added 08 - Backport Used to tag backport PRs component: SIMD Issues in SIMD (fast instruction sets) code or machinery 36 - Build Build related PR labels Jan 8, 2023
@charris charris added this to the 1.24.2 release milestone Jan 8, 2023
@charris charris merged commit 4b53673 into numpy:maintenance/1.24.x Jan 9, 2023
@charris charris deleted the backport-22777 branch January 9, 2023 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement 08 - Backport Used to tag backport PRs 36 - Build Build related PR component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants