From 44397f6701e71b070fe86929a339a40ce37fcd4d Mon Sep 17 00:00:00 2001 From: Jingyun Hua Date: Sat, 19 Nov 2022 03:13:42 +0000 Subject: [PATCH] add loongarch64 support and disable valgrind-devel for loongarch64 Signed-off-by: Jingyun Hua (cherry picked from commit 7e3b51603ac583531e3792db5f33ea00bf02be15) --- Add-loongarch-support.patch | 62 +++++++++++++++++++++++++++++++++++++ python3.spec | 16 +++++++++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 Add-loongarch-support.patch diff --git a/Add-loongarch-support.patch b/Add-loongarch-support.patch new file mode 100644 index 0000000..3c2b74a --- /dev/null +++ b/Add-loongarch-support.patch @@ -0,0 +1,62 @@ +From bb723e61067ebc2499b47a2d83dc18a9a1df11f9 Mon Sep 17 00:00:00 2001 +From: Jingyun Hua +Date: Tue, 29 Nov 2022 09:00:25 +0000 +Subject: [PATCH] Add loongarch support + +Signed-off-by: Jingyun Hua +--- + config.guess | 3 +++ + config.sub | 2 ++ + configure.ac | 2 ++ + 3 files changed, 7 insertions(+) + +diff --git a/config.guess b/config.guess +index 1579317..87298db 100755 +--- a/config.guess ++++ b/config.guess +@@ -978,6 +978,9 @@ EOF + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +diff --git a/config.sub b/config.sub +index bd82c7b..0410e5f 100755 +--- a/config.sub ++++ b/config.sub +@@ -266,6 +266,7 @@ case $basic_machine in + | k1om \ + | le32 | le64 \ + | lm32 \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ +@@ -396,6 +397,7 @@ case $basic_machine in + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ +diff --git a/configure.ac b/configure.ac +index 1d04561..a5b69e6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -781,6 +781,8 @@ cat >> conftest.c <=6) && defined(_MIPSEL) +-- +2.33.0 + diff --git a/python3.spec b/python3.spec index 5c0ae15..8d5111a 100644 --- a/python3.spec +++ b/python3.spec @@ -3,7 +3,7 @@ Summary: Interpreter of the Python3 programming language URL: https://www.python.org/ Version: 3.9.9 -Release: 19 +Release: 20 License: Python-2.0 %global branchversion 3.9 @@ -69,8 +69,10 @@ BuildRequires: tix-devel BuildRequires: tk-devel %ifarch %{valgrind_arches} +%ifnarch loongarch64 BuildRequires: valgrind-devel %endif +%endif BuildRequires: xz-devel BuildRequires: zlib-devel @@ -104,6 +106,7 @@ Patch6012: backport-CVE-2022-37454.patch Patch9000: add-the-sm3-method-for-obtaining-the-salt-value.patch Patch9001: python3-Add-sw64-architecture.patch +Patch9002: Add-loongarch-support.patch Provides: python%{branchversion} = %{version}-%{release} Provides: python(abi) = %{branchversion} @@ -203,6 +206,7 @@ rm -r Modules/expat %patch9000 -p1 %patch9001 -p1 +%patch9002 -p1 rm Lib/ensurepip/_bundled/*.whl rm configure pyconfig.h.in @@ -251,7 +255,9 @@ pushd ${DebugBuildDir} --with-dtrace \ --with-ssl-default-suites=openssl \ %ifarch %{valgrind_arches} +%ifnarch loongarch64 --with-valgrind \ +%endif %endif --without-ensurepip \ --with-pydebug @@ -279,7 +285,9 @@ pushd ${OptimizedBuildDir} --with-dtrace \ --with-ssl-default-suites=openssl \ %ifarch %{valgrind_arches} +%ifnarch loongarch64 --with-valgrind \ +%endif %endif --without-ensurepip \ %{optimizations_flag} @@ -817,6 +825,12 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %{_mandir}/*/* %changelog +* Thu Nov 10 2022 huajingyun - 3.9.9-20 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: add loongarch64 support and disable valgrind-devel for loongarch64 + * Mon Nov 28 zhuofeng - 3.9.9-19 - Type:CVE - CVE:CVE-2022-37454 -- Gitee