Disable JIT on RHEL

For now on, until we figure out a way of building the JIT with pre-built stencils,
we disable the JIT on RHEL to avoid a dependency on a specific LLVM+clang version.

https://discuss.python.org/t/building-the-jit-with-pre-built-stencils/91838
https://src.fedoraproject.org/rpms/python3.14/pull-request/40
https://github.com/fedora-eln/eln/issues/207

----------

This was cherry-picked from https://src.fedoraproject.org/rpms/python3.14/c/ef2d703504cf0039fe5dc82e21e20053cc827c10
for https://github.com/fedora-eln/eln/issues/258#issuecomment-3085727051

With one difference: We build this package on EPEL and we have clang18 there.
This commit is contained in:
Miro Hrončok 2025-05-20 11:54:21 +00:00
commit aef12e770a

View file

@ -81,7 +81,7 @@ License: Python-2.0.1
# We can only have this on Fedora 40+, where clang 18+ is available
# And only on certain architectures: https://peps.python.org/pep-0744/#support
# The freethreading build (when enabled) does not support JIT yet
%bcond jit %[(0%{?fedora} >= 40 || 0%{?rhel} >= 10) && ("%{_arch}" == "x86_64" || "%{_arch}" == "aarch64")]
%bcond jit %[(0%{?fedora} >= 40 || 0%{?epel} >= 10) && ("%{_arch}" == "x86_64" || "%{_arch}" == "aarch64")]
%if %{with jit}
# When built with JIT, it still needs to be enabled on runtime via PYTHON_JIT=1
%global jit_flag --enable-experimental-jit=yes-off