# Bug report ### Bug description: I initially encountered [this build issue on Gentoo](https://bugs.gentoo.org/931838). Currently the regex in `Tools/jit/_llvm.py` only allows strings of the form `version MAJOR.MINOR.PATCH` ```python _LLVM_VERSION_PATTERN = re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\s+") ``` However if LLVM was built with e.g. `-DLLVM_VERSION_SUFFIX=+libcxx` ([as is the case on Gentoo](https://github.com/gentoo/gentoo/blob/11725d2f812440fecba12ef63172af4eadacd907/sys-devel/llvm/llvm-18.1.7.ebuild#L428)) `clang --version` would return `clang version 18.1.7+libcxx` which is a valid version but doesn't match. My proposed fix would be to simply allow a non-whitespace string of arbitrary length after the version, i.e.: ```python _LLVM_VERSION_PATTERN = re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+") ``` ### CPython versions tested on: 3.13 ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-120604 * gh-120768 <!-- /gh-linked-prs -->