Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Sep 5, 2025

Backport of #29678.

This PR fixes the regex patterns used to detect VSX3 and VSX4 CPU features
in the ppc64 Meson build scripts. Previously, the regex used a character
class:

'.*[mcpu=|vsx].*'

This incorrectly matched individual characters instead of the intended
substrings "mcpu=" or "vsx".

Changes made:

  • Updated the regex to use a non-capturing group with alternation:

    '.*(?:mcpu=|vsx).*'
    
  • No changes were made to feature hierarchy, test code, extra tests, or
    compiler flags.

This ensures that the build system correctly detects VSX3/VSX4 features
on both GCC and Clang compilers on ppc64 platforms.


Before:

  • VSX3/VSX4 detection could fail or mis-detect features because of
    improper regex.

After:

  • Regex properly matches either "mcpu=" or "vsx" as intended.
  • Extra tests and compiler flags remain unchanged.

@charris charris added this to the 2.3.3 release milestone Sep 5, 2025
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs 36 - Build Build related PR labels Sep 5, 2025
@charris charris merged commit 9284569 into numpy:maintenance/2.3.x Sep 5, 2025
75 checks passed
@charris charris deleted the backport-29678 branch September 5, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs 36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants