diff --git a/0001-Add-back-support-for-Python-3.6.patch b/0001-Add-back-support-for-Python-3.6.patch new file mode 100644 index 0000000..154e587 --- /dev/null +++ b/0001-Add-back-support-for-Python-3.6.patch @@ -0,0 +1,50 @@ +From fea6f0e31253ad0f335eea2e4718bacd5930d6d4 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Fri, 19 Jul 2024 14:52:49 +0200 +Subject: [PATCH] Add back support for Python 3.6 + +--- + llvm/CMakeLists.txt | 2 +- + llvm/utils/update_test_body.py | 6 ++++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt +index 12618966c4ad..9c4df0082a9a 100644 +--- a/llvm/CMakeLists.txt ++++ b/llvm/CMakeLists.txt +@@ -932,7 +932,7 @@ set(LLVM_PROFDATA_FILE "" CACHE FILEPATH + + if(LLVM_INCLUDE_TESTS) + # All LLVM Python files should be compatible down to this minimum version. +- set(LLVM_MINIMUM_PYTHON_VERSION 3.8) ++ set(LLVM_MINIMUM_PYTHON_VERSION 3.6) + else() + # FIXME: it is unknown if this is the actual minimum bound + set(LLVM_MINIMUM_PYTHON_VERSION 3.0) +diff --git a/llvm/utils/update_test_body.py b/llvm/utils/update_test_body.py +index 661b0270d783..152d0c5f8476 100755 +--- a/llvm/utils/update_test_body.py ++++ b/llvm/utils/update_test_body.py +@@ -57,7 +57,8 @@ def process(args, path): + input="\n".join( + prolog[:-1] if prolog[-1].startswith(".endif") else prolog + ).encode(), +- capture_output=True, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, + check=True, + ) + except subprocess.CalledProcessError as ex: +@@ -71,7 +72,8 @@ def process(args, path): + + sub = subprocess.run( + ["sh", "-eu", "gen"], +- capture_output=True, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, + # Don't encode the directory information to the Clang output. + # Remove unneeded details (.ident) as well. + env=dict( +-- +2.45.2 + diff --git a/patches.spec.inc b/patches.spec.inc index 06a0480..c4f1a75 100644 --- a/patches.spec.inc +++ b/patches.spec.inc @@ -16,5 +16,8 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch # Source2006: 0001-Produce-DWARF4-by-default.patch #region RHEL patches -Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch +# All RHEL +Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch +# RHEL 8 only +Patch9002: 0001-Add-back-support-for-Python-3.6.patch #endregion diff --git a/prep.spec.inc b/prep.spec.inc index 9a4cd2f..9fbbc4d 100644 --- a/prep.spec.inc +++ b/prep.spec.inc @@ -15,8 +15,11 @@ %autopatch -M9000 -p1 %if %{defined rhel} +%patch -p1 -P9001 +%if %rhel == 8 %patch -p1 -P9002 %endif +%endif #region LLVM preparation