summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 65b3e9ffb8..fe6ad575f7 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 0000000000..dfe71a5552
--- /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 b8fa9d66e7..c9ea72cf6e 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 0940b93c25..10672bd376 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)