summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Na <44800775+loongson-zn@users.noreply.github.com>2023-05-09 09:19:40 (GMT)
committerGitHub <noreply@github.com>2023-05-09 09:19:40 (GMT)
commit03029ace924f7dac7ef49eee3417e0af6623060d (patch)
treeebf8d54d03a0730d93cdecdf7d1e24b8e1b22f5f
parent9a9b176eb7e052af84c01c0cfb3231e51f980f2d (diff)
downloadcpython-03029ace924f7dac7ef49eee3417e0af6623060d.zip
cpython-03029ace924f7dac7ef49eee3417e0af6623060d.tar.gz
cpython-03029ace924f7dac7ef49eee3417e0af6623060d.tar.bz2
gh-90656: Add platform triplets for 64-bit LoongArch (LA64) (#30939)
Signed-off-by: Zhang Na <zhangna@loongson.cn> Co-authored-by: WANG Xuerui <git@xen0n.name>
-rw-r--r--Doc/whatsnew/3.12.rst8
-rw-r--r--Misc/NEWS.d/next/Build/2022-06-20-15-15-11.gh-issue-90656.kFBbKe.rst7
-rwxr-xr-xconfigure14
-rw-r--r--configure.ac14
4 files changed, 43 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 65b3e9f..fe6ad57 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -1169,6 +1169,14 @@ Build Changes
optimization levels (0, 1, 2) at once.
(Contributed by Victor Stinner in :gh:`99289`.)
+* Add platform triplets for 64-bit LoongArch:
+
+ * loongarch64-linux-gnusf
+ * loongarch64-linux-gnuf32
+ * loongarch64-linux-gnu
+
+ (Contributed by Zhang Na in :gh:`90656`.)
+
C API Changes
=============
diff --git a/Misc/NEWS.d/next/Build/2022-06-20-15-15-11.gh-issue-90656.kFBbKe.rst b/Misc/NEWS.d/next/Build/2022-06-20-15-15-11.gh-issue-90656.kFBbKe.rst
new file mode 100644
index 0000000..dfe71a5
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-06-20-15-15-11.gh-issue-90656.kFBbKe.rst
@@ -0,0 +1,7 @@
+Add platform triplets for 64-bit LoongArch:
+
+* loongarch64-linux-gnusf
+* loongarch64-linux-gnuf32
+* loongarch64-linux-gnu
+
+Patch by Zhang Na.
diff --git a/configure b/configure
index b8fa9d6..c9ea72c 100755
--- a/configure
+++ b/configure
@@ -6143,6 +6143,20 @@ cat > conftest.c <<EOF
hppa-linux-gnu
# elif defined(__ia64__)
ia64-linux-gnu
+# elif defined(__loongarch__)
+# if defined(__loongarch_lp64)
+# if defined(__loongarch_soft_float)
+ loongarch64-linux-gnusf
+# elif defined(__loongarch_single_float)
+ loongarch64-linux-gnuf32
+# elif defined(__loongarch_double_float)
+ loongarch64-linux-gnu
+# else
+# error unknown platform triplet
+# endif
+# else
+# error unknown platform triplet
+# endif
# elif defined(__m68k__) && !defined(__mcoldfire__)
m68k-linux-gnu
# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
diff --git a/configure.ac b/configure.ac
index 0940b93..10672bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -959,6 +959,20 @@ cat > conftest.c <<EOF
hppa-linux-gnu
# elif defined(__ia64__)
ia64-linux-gnu
+# elif defined(__loongarch__)
+# if defined(__loongarch_lp64)
+# if defined(__loongarch_soft_float)
+ loongarch64-linux-gnusf
+# elif defined(__loongarch_single_float)
+ loongarch64-linux-gnuf32
+# elif defined(__loongarch_double_float)
+ loongarch64-linux-gnu
+# else
+# error unknown platform triplet
+# endif
+# else
+# error unknown platform triplet
+# endif
# elif defined(__m68k__) && !defined(__mcoldfire__)
m68k-linux-gnu
# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)