diff --git a/Add-loongarch-support.patch b/Add-loongarch-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..6ef5022e858b34743b5bcd4e8d2f5f86b7ffd783 --- /dev/null +++ b/Add-loongarch-support.patch @@ -0,0 +1,61 @@ +From b87dad459825a407084c9acde88f42d86139715e Mon Sep 17 00:00:00 2001 +From: GuoCe +Date: Wed, 6 Mar 2024 18:17:32 +0800 +Subject: [PATCH] Add loongarch support + +--- + config.guess | 3 +++ + config.sub | 2 ++ + configure.ac | 2 ++ + 3 files changed, 7 insertions(+) + +diff --git a/config.guess b/config.guess +index 256083a..33fafea 100755 +--- a/config.guess ++++ b/config.guess +@@ -970,6 +970,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 ba37cf9..d971b78 100755 +--- a/config.sub ++++ b/config.sub +@@ -265,6 +265,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 \ +@@ -394,6 +395,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 c2e9fbb..b83fdcf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -779,6 +779,8 @@ cat >> conftest.c <=6) && defined(_MIPSEL) +-- +2.27.0 + diff --git a/python3.spec b/python3.spec index 82b28693cff3a8c97e9ae49a70aba311a8b82b4a..35a2576430985d5d547278dbf6292732623679dd 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.7.9 -Release: 38 +Release: 39 License: Python-2.0 %global branchversion 3.7 @@ -73,7 +73,9 @@ BuildRequires: tcl-devel BuildRequires: tix-devel BuildRequires: tk-devel +%ifnarch loongarch64 BuildRequires: valgrind-devel +%endif BuildRequires: xz-devel BuildRequires: zlib-devel @@ -179,6 +181,7 @@ Patch9002: fix-CVE-2023-24329.patch Patch9003: backport-Fix-parsing-errors-in-email-_parseaddr.py.patch Patch9004: backport-Revert-fixes-for-CVE-2023-27043.patch Patch9005: backport-CVE-2023-27043.patch +Patch9006: Add-loongarch-support.patch Provides: python%{branchversion} = %{version}-%{release} Provides: python(abi) = %{branchversion} @@ -342,6 +345,7 @@ rm Lib/ensurepip/_bundled/*.whl %patch9003 -p1 %patch9004 -p1 %patch9005 -p1 +%patch9006 -p1 sed -i "s/generic_os/%{_vendor}/g" Lib/platform.py rm configure pyconfig.h.in @@ -387,7 +391,9 @@ pushd ${DebugBuildDir} --enable-loadable-sqlite-extensions \ --with-dtrace \ --with-ssl-default-suites=openssl \ +%ifnarch loongarch64 --with-valgrind \ +%endif --without-ensurepip \ --with-pydebug @@ -411,7 +417,9 @@ pushd ${OptimizedBuildDir} --enable-loadable-sqlite-extensions \ --with-dtrace \ --with-ssl-default-suites=openssl \ +%ifnarch loongarch64 --with-valgrind \ +%endif --without-ensurepip \ %{optimizations_flag} @@ -943,6 +951,12 @@ export BEP_GTDLIST="$BEP_GTDLIST_TMP" %{_mandir}/*/* %changelog +* Wed Mar 06 GuoCe - 3.7.9-39 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: add loongarch64 support and disable valgrind-devel for loongarch64 + * Tue Mar 05 GuoCe - 3.7.9-38 - Type:CVE - CVE:CVE-2023-27043